Probabilities from density curves

WEBVTT
Kind: captions
Language: en

00:00:00.423 --> 00:00:03.565
- [Instructor] Consider
the density curve below

00:00:03.565 --> 00:00:05.283
and so we have a density curve

00:00:05.283 --> 00:00:08.024
that describes the
probability distribution

00:00:08.024 --> 00:00:10.438
for a continuous random variable.

00:00:10.438 --> 00:00:13.747
This random variable can take
on values from one to five

00:00:13.747 --> 00:00:15.385
and has an equal probability

00:00:15.385 --> 00:00:19.142
of taking on any of these
values from one to five.

00:00:19.142 --> 00:00:22.684
Find the probability
that x is less than four.

00:00:22.684 --> 00:00:25.351
So x can go from one to four.

00:00:26.427 --> 00:00:29.851
There's no probability that
it'll be less than one.

00:00:29.851 --> 00:00:32.647
So we know the entire area
under the density curve

00:00:32.647 --> 00:00:34.121
is going to be one.

00:00:34.121 --> 00:00:36.903
So if we can find the fraction of the area

00:00:36.903 --> 00:00:38.661
that meets our criteria

00:00:38.661 --> 00:00:41.237
then we know the answer to the question.

00:00:41.237 --> 00:00:45.404
So what we're gonna look at is
we wanna go from one to four.

00:00:47.335 --> 00:00:48.725
The reason why I know we can start at one

00:00:48.725 --> 00:00:51.789
is there's no probability,
there's zero chances

00:00:51.789 --> 00:00:54.160
that I'll get a value less than one.

00:00:54.160 --> 00:00:56.798
We see that from the density curve

00:00:56.798 --> 00:00:59.882
and so we just need to think
about what is the area here?

00:00:59.882 --> 00:01:02.715
What is this area right over here?

00:01:04.019 --> 00:01:08.186
Well, this is just a rectangle
where the height is 0.25

00:01:09.297 --> 00:01:11.914
and the width is one, two, three.

00:01:11.914 --> 00:01:15.414
So our area's going to be 0.25 times three

00:01:16.718 --> 00:01:18.635
which is equal to 0.75.

00:01:19.632 --> 00:01:23.799
So the probability that x
is less than four is 0.75

00:01:24.663 --> 00:01:28.142
or you could say it's a 75% probability.

00:01:28.142 --> 00:01:29.285
Let's do another one of these

00:01:29.285 --> 00:01:33.675
with a slightly more
involved density curve.

00:01:33.675 --> 00:01:36.130
A set of middle school students' heights

00:01:36.130 --> 00:01:40.713
are normally distributed with
a mean of 150 centimeters

00:01:40.713 --> 00:01:43.864
and a standard deviation
of 20 centimeters.

00:01:43.864 --> 00:01:46.077
Let H be the height

00:01:46.077 --> 00:01:49.440
of a randomly selected
student from this set.

00:01:49.440 --> 00:01:52.508
Find and interpret the probability that H,

00:01:52.508 --> 00:01:55.528
that the height of a randomly
selected student from this set

00:01:55.528 --> 00:01:58.917
is greater than 170 centimeters.

00:01:58.917 --> 00:02:02.566
So let's first visualize
the density curve.

00:02:02.566 --> 00:02:05.387
It is a normal distribution.

00:02:05.387 --> 00:02:08.208
They tell us that the
mean is 150 centimeters.

00:02:08.208 --> 00:02:09.189
So let me draw that.

00:02:09.189 --> 00:02:11.189
So the mean, that is 150

00:02:13.638 --> 00:02:15.412
and they also say that we
have a standard deviation

00:02:15.412 --> 00:02:16.801
of 20 centimeters.

00:02:16.801 --> 00:02:19.252
So 20 centimeters above the mean,

00:02:19.252 --> 00:02:22.604
one standard deviation
above the mean is 170.

00:02:22.604 --> 00:02:26.863
One standard deviation
below the mean is 130

00:02:26.863 --> 00:02:29.242
and we want the probability of

00:02:29.242 --> 00:02:33.418
if we randomly select from
these middle school students,

00:02:33.418 --> 00:02:37.754
what's the probability that
the height is greater than 170?

00:02:37.754 --> 00:02:40.011
So that's going to be this area

00:02:40.011 --> 00:02:42.698
under this normal distribution curve.

00:02:42.698 --> 00:02:44.375
It's going to be that area.

00:02:44.375 --> 00:02:46.866
So how can we figure that out?

00:02:46.866 --> 00:02:48.711
Well, there's several ways to do it.

00:02:48.711 --> 00:02:51.411
We know that this is the area above,

00:02:51.411 --> 00:02:54.364
one standard deviation above the mean.

00:02:54.364 --> 00:02:56.120
You could use a Z-table

00:02:56.120 --> 00:02:59.146
or you could use some
generally useful knowledge

00:02:59.146 --> 00:03:02.787
about normal distributions
and that's that the area

00:03:02.787 --> 00:03:05.677
between one standard
deviation below the mean

00:03:05.677 --> 00:03:08.787
and one standard deviation above the mean.

00:03:08.787 --> 00:03:12.178
This area right over here is roughly 68%.

00:03:12.178 --> 00:03:14.218
It's closer to 68.2%.

00:03:14.218 --> 00:03:16.670
For our purposes, 68 will work fine

00:03:16.670 --> 00:03:18.589
and so if we're looking
at just from the mean

00:03:18.589 --> 00:03:20.555
to one standard deviation above the mean,

00:03:20.555 --> 00:03:21.823
it would be half of that.

00:03:21.823 --> 00:03:26.412
So this is going to be approximately 34%.

00:03:26.412 --> 00:03:29.833
Now, we also know that
for a normal distribution,

00:03:29.833 --> 00:03:34.459
the area below the mean
is going to be 50%.

00:03:34.459 --> 00:03:37.768
So we know all of that is 50%

00:03:37.768 --> 00:03:41.340
and so the combined area below 170,

00:03:41.340 --> 00:03:44.714
below one standard
deviation above the mean

00:03:44.714 --> 00:03:48.797
is going to be 84% or approximately 84%

00:03:50.007 --> 00:03:51.950
and so that helps us figure out

00:03:51.950 --> 00:03:55.366
what is the area above one
standard deviation above the mean

00:03:55.366 --> 00:03:57.371
which will answer our question.

00:03:57.371 --> 00:04:00.177
The entire area under this density curve,

00:04:00.177 --> 00:04:04.274
under any density curve is
going to be equal to one

00:04:04.274 --> 00:04:06.070
and so the entire area is one.

00:04:06.070 --> 00:04:09.070
This green area is 84% or 0.84.

00:04:10.116 --> 00:04:11.957
Well, then we just subtract that from one

00:04:11.957 --> 00:04:13.957
to get this blue area.

00:04:13.957 --> 00:04:17.040
So this is going to be one minus 0.84

00:04:18.092 --> 00:04:19.683
or I'll say approximately

00:04:19.683 --> 00:04:24.028
and so that's going to
be approximately 0.16.

00:04:24.028 --> 00:04:26.887
If you want a slightly more precise value,

00:04:26.887 --> 00:04:28.860
you could use a Z-table.

00:04:28.860 --> 00:04:32.116
The area below one standard
deviation above the mean

00:04:32.116 --> 00:04:34.608
will be closer to about 84.1%

00:04:34.608 --> 00:04:39.435
in which case this would
be about 15.9% or 0.159

00:04:39.435 --> 00:04:41.397
but you can see that we got pretty close

00:04:41.397 --> 00:04:44.919
by knowing the general
rule that it's roughly 68%

00:04:44.919 --> 00:04:47.166
between one standard
deviation below the mean

00:04:47.166 --> 00:04:49.902
and one standard deviation above the mean

00:04:49.902 --> 00:04:52.069
for a normal distribution.


Variance and standard deviation of a discrete random variable

WEBVTT
Kind: captions
Language: en

00:00:00.589 --> 00:00:01.797
- [Instructor] In a previous video,

00:00:01.797 --> 00:00:04.421
we defined this random variable x.

00:00:04.421 --> 00:00:05.837
It's a discrete random variable.

00:00:05.837 --> 00:00:08.020
It can only take on a
finite number of values,

00:00:08.020 --> 00:00:10.667
and I defined it as the number of workouts

00:00:10.667 --> 00:00:12.417
I might do in a week.

00:00:13.384 --> 00:00:15.915
And we calculated the
expected value of our

00:00:15.915 --> 00:00:17.401
random variable x,

00:00:17.401 --> 00:00:20.721
which we could also
denote as the mean of x,

00:00:20.721 --> 00:00:22.788
and we use the Greek letter mu,

00:00:22.788 --> 00:00:25.504
which we use for population mean.

00:00:25.504 --> 00:00:26.944
And all we did is,

00:00:26.944 --> 00:00:29.243
it's the probability-weighted sum

00:00:29.243 --> 00:00:32.006
of the various outcomes.

00:00:32.006 --> 00:00:34.583
And we got for this random variable

00:00:34.583 --> 00:00:36.627
with this probability distribution,

00:00:36.627 --> 00:00:40.737
we got an expected value or a mean of 2.1.

00:00:40.737 --> 00:00:42.501
What we're gonna do
now is extend this idea

00:00:42.501 --> 00:00:44.916
to measuring spread.

00:00:44.916 --> 00:00:46.263
And so we're going to think about

00:00:46.263 --> 00:00:49.119
what is the variance of
this random variable,

00:00:49.119 --> 00:00:50.837
and then we could take
the square root of that

00:00:50.837 --> 00:00:53.276
to find what is the standard deviation.

00:00:53.276 --> 00:00:54.878
The way we are going to do this

00:00:54.878 --> 00:00:57.130
has parallels with the
way that we've calculated

00:00:57.130 --> 00:00:59.266
variance in the past.

00:00:59.266 --> 00:01:01.240
So the variance

00:01:01.240 --> 00:01:03.492
of our random variable x,

00:01:03.492 --> 00:01:04.886
what we're going to do
is take the difference

00:01:04.886 --> 00:01:08.090
between each outcome and the mean,

00:01:08.090 --> 00:01:09.831
square that difference,

00:01:09.831 --> 00:01:12.107
and then we're gonna multiply
it by the probability

00:01:12.107 --> 00:01:13.440
of that outcome.

00:01:15.845 --> 00:01:18.214
So for example for this first data point,

00:01:18.214 --> 00:01:22.135
you're going to have
zero minus 2.1 squared

00:01:22.135 --> 00:01:24.550
times the probability of getting zero,

00:01:24.550 --> 00:01:25.383
times 0.1.

00:01:27.475 --> 00:01:29.797
Then you're going to get

00:01:29.797 --> 00:01:31.964
plus one minus 2.1 squared

00:01:34.883 --> 00:01:37.483
times the probability that you get one,

00:01:37.483 --> 00:01:38.400
times 0.15.

00:01:41.315 --> 00:01:43.451
Then you're going to get

00:01:43.451 --> 00:01:45.618
plus two minus 2.1 squared

00:01:47.863 --> 00:01:49.604
times the probability that you get a two,

00:01:49.604 --> 00:01:50.437
times 0.4.

00:01:52.576 --> 00:01:54.202
Then you have plus

00:01:54.202 --> 00:01:56.119
three minus 2.1 squared

00:01:57.685 --> 00:01:58.602
times 0.25.

00:02:00.866 --> 00:02:03.002
And then last but not least you have

00:02:03.002 --> 00:02:05.252
plus four minus 2.1 squared

00:02:08.226 --> 00:02:09.059
times 0.1.

00:02:10.990 --> 00:02:12.035
So once again,

00:02:12.035 --> 00:02:13.590
the difference between each outcome

00:02:13.590 --> 00:02:14.673
and the mean,

00:02:15.518 --> 00:02:17.282
we square it and we multiply times

00:02:17.282 --> 00:02:19.326
the probability of that outcome.

00:02:19.326 --> 00:02:23.134
So this is going to be
negative 2.1 squared,

00:02:23.134 --> 00:02:24.457
which is just 2.1 squared,

00:02:24.457 --> 00:02:27.963
so I'll just write this as 2.1 squared,

00:02:27.963 --> 00:02:28.796
times .1.

00:02:30.912 --> 00:02:32.515
That's the first term.

00:02:32.515 --> 00:02:34.511
And then we're going to have plus

00:02:34.511 --> 00:02:35.844
one minus 2.1 is

00:02:36.903 --> 00:02:37.986
negative 1.1,

00:02:39.388 --> 00:02:41.524
and then we're going to square that,

00:02:41.524 --> 00:02:44.496
so that's just going to be
the same thing as 1.1 squared,

00:02:44.496 --> 00:02:46.702
which is 1.21 but I'll just write it out,

00:02:46.702 --> 00:02:47.619
1.1 squared

00:02:49.767 --> 00:02:50.600
times .15.

00:02:53.552 --> 00:02:57.052
And then this is going to be two minus 2.1

00:02:58.010 --> 00:02:59.984
is negative .1.

00:02:59.984 --> 00:03:04.233
When you square it is
going to be equal to.

00:03:04.233 --> 00:03:05.233
So plus .01.

00:03:08.317 --> 00:03:11.823
If you have negative .1 times negative .1,

00:03:11.823 --> 00:03:13.406
it's .01 times 0.4,

00:03:16.420 --> 00:03:17.253
times .4.

00:03:19.880 --> 00:03:23.061
And then plus we this is going to be

00:03:23.061 --> 00:03:25.311
0.9 squared, so that is .81

00:03:28.518 --> 00:03:29.351
times .25.

00:03:31.606 --> 00:03:32.860
And then we're almost there.

00:03:32.860 --> 00:03:35.943
This is going to be plus 1.9 squared,

00:03:36.854 --> 00:03:38.604
1.9 squared times .1.

00:03:42.055 --> 00:03:43.388
And we get 1.19.

00:03:46.699 --> 00:03:50.298
So this is all going to be equal to

00:03:50.298 --> 00:03:51.131
1.19.

00:03:53.178 --> 00:03:55.453
And if we wanna get the standard deviation

00:03:55.453 --> 00:03:57.195
for this random variable,

00:03:57.195 --> 00:03:59.795
we would denote that with
the Greek letter sigma.

00:03:59.795 --> 00:04:02.140
The standard deviation
for the random variable x

00:04:02.140 --> 00:04:05.484
is going to be equal to the
square root of the variance.

00:04:05.484 --> 00:04:07.876
Square root of 1.19,

00:04:07.876 --> 00:04:12.043
which is equal to, just get
the calculator back here,

00:04:12.961 --> 00:04:15.306
so we are just going
to take the square root

00:04:15.306 --> 00:04:18.889
of what we just, let's
type it again, 1.19.

00:04:20.066 --> 00:04:21.924
And that gives us,

00:04:21.924 --> 00:04:24.174
so it's approximately 1.09.

00:04:25.523 --> 00:04:27.106
Approximately 1.09.

00:04:28.820 --> 00:04:30.539
So let's see if this makes sense.

00:04:30.539 --> 00:04:33.929
Let me put this all on a
number line right over here.

00:04:33.929 --> 00:04:36.111
So you have the outcome

00:04:36.111 --> 00:04:36.944
zero, one,

00:04:38.201 --> 00:04:39.118
two, three,

00:04:40.709 --> 00:04:41.542
and four.

00:04:42.915 --> 00:04:47.350
So you have a 10% chance
of getting a zero.

00:04:47.350 --> 00:04:48.905
So I will draw that like this,

00:04:48.905 --> 00:04:51.808
let's just say this is a height of 10%.

00:04:51.808 --> 00:04:54.803
You have a 15% chance of getting one,

00:04:54.803 --> 00:04:59.029
so that would be 1 1/2 times higher.

00:04:59.029 --> 00:05:01.398
So it would look something like this.

00:05:01.398 --> 00:05:03.975
You have a 40% chance of getting a two.

00:05:03.975 --> 00:05:05.475
That's going to be

00:05:06.831 --> 00:05:07.664
like this.

00:05:09.502 --> 00:05:11.870
You have a 40% chance of getting a two.

00:05:11.870 --> 00:05:15.957
You have a 25% chance of getting a three.

00:05:15.957 --> 00:05:16.790
Like this.

00:05:18.256 --> 00:05:23.225
And then you have a 10%
chance of getting a four.

00:05:23.225 --> 00:05:24.308
So like that.

00:05:25.291 --> 00:05:27.590
So this is a visualization
of this discrete

00:05:27.590 --> 00:05:29.680
probability distribution where

00:05:29.680 --> 00:05:31.096
I didn't draw the vertical axis here,

00:05:31.096 --> 00:05:34.509
but this would be .1, this would be .15,

00:05:34.509 --> 00:05:37.435
this would be .25, and that is .4.

00:05:37.435 --> 00:05:41.127
And then we see that the mean is at 2.1.

00:05:41.127 --> 00:05:43.794
The mean is, the mean is at 2.1,

00:05:45.005 --> 00:05:46.723
which makes sense.

00:05:46.723 --> 00:05:48.604
Even though this random
variable only takes on

00:05:48.604 --> 00:05:50.926
integer values, you can have a mean

00:05:50.926 --> 00:05:53.782
that takes on a non-integer value.

00:05:53.782 --> 00:05:57.033
And then the standard deviation is 1.09.

00:05:57.033 --> 00:05:59.935
So 1.09 above the mean is going to get us

00:05:59.935 --> 00:06:01.018
close to 3.2,

00:06:02.977 --> 00:06:07.144
and 1.09 below the mean is
gonna get us close to one.

00:06:08.434 --> 00:06:12.288
And so this all at least
intuitively feels reasonable.

00:06:12.288 --> 00:06:14.494
This mean does seem to be indicative

00:06:14.494 --> 00:06:18.511
of the central tendency
of this distribution.

00:06:18.511 --> 00:06:20.276
And the standard deviation does seem

00:06:20.276 --> 00:06:22.087
to be a decent measure

00:06:22.087 --> 00:06:23.254
of the spread.


Mean (expected value) of a discrete random variable

WEBVTT
Kind: captions
Language: en

00:00:00.562 --> 00:00:03.395
- [Instructor] So, I'm
defining the random variable x

00:00:03.395 --> 00:00:07.670
as the number of workouts that
I will do in a given week.

00:00:07.670 --> 00:00:08.789
Now right over here,

00:00:08.789 --> 00:00:13.063
this table describes the
probability distribution for x.

00:00:13.063 --> 00:00:14.073
And as you can see,

00:00:14.073 --> 00:00:17.502
x can take on only a
finite number of values,

00:00:17.502 --> 00:00:19.859
zero, one, two, three, or four.

00:00:19.859 --> 00:00:22.520
And so, because there's a
finite number of values here,

00:00:22.520 --> 00:00:26.364
we would call this a
discrete random variable.

00:00:26.364 --> 00:00:28.130
And you can see that this is a valid

00:00:28.130 --> 00:00:30.255
probability distribution because

00:00:30.255 --> 00:00:33.084
the combined probability is one.

00:00:33.084 --> 00:00:34.167
.1 plus 0.15,

00:00:35.339 --> 00:00:38.219
plus 0.4, plus 0.25, plus 0.1

00:00:38.219 --> 00:00:39.290
is one.

00:00:39.290 --> 00:00:42.703
And none of these are
negative probabilities,

00:00:42.703 --> 00:00:44.528
which wouldn't have made sense.

00:00:44.528 --> 00:00:47.800
But what we care about in
this video is the notion of

00:00:47.800 --> 00:00:51.208
an expected value of a
discrete random variable,

00:00:51.208 --> 00:00:53.505
which we would just note this way.

00:00:53.505 --> 00:00:55.125
And one way to think about it is,

00:00:55.125 --> 00:00:58.513
once we calculate the expected
value of this variable,

00:00:58.513 --> 00:01:00.275
of this random variable,

00:01:00.275 --> 00:01:03.048
that in a given week, that
would give you a sense

00:01:03.048 --> 00:01:06.492
of the expected number of workouts.

00:01:06.492 --> 00:01:10.084
This is also sometimes
referred to as the mean

00:01:10.084 --> 00:01:11.699
of a random variable.

00:01:11.699 --> 00:01:14.619
This, right over here,
is the Greek letter mu,

00:01:14.619 --> 00:01:17.738
which is often used to denote the mean.

00:01:17.738 --> 00:01:20.510
So, this is the mean of
the random variable x.

00:01:20.510 --> 00:01:23.230
But how do we actually compute it?

00:01:23.230 --> 00:01:25.895
To compute this, we essentially just take

00:01:25.895 --> 00:01:28.969
the weighted sum of the various outcomes,

00:01:28.969 --> 00:01:31.367
and we weight them by the probabilities.

00:01:31.367 --> 00:01:34.201
So, for example, this is going to be,

00:01:34.201 --> 00:01:36.791
the first outcome here is zero,

00:01:36.791 --> 00:01:39.981
and we'll weight it by
its probability of 0.1.

00:01:39.981 --> 00:01:41.526
So, it's zero

00:01:41.526 --> 00:01:42.359
times 0.1.

00:01:44.990 --> 00:01:47.641
Plus, the next outcome is one,

00:01:47.641 --> 00:01:51.518
and it'd be weighted by
its probability of 0.15.

00:01:51.518 --> 00:01:52.518
So, plus one

00:01:53.357 --> 00:01:54.274
times 0.15.

00:01:56.632 --> 00:01:59.381
Plus, the next outcome is

00:01:59.381 --> 00:02:02.313
two and has a probability of 0.4,

00:02:02.313 --> 00:02:03.501
plus two

00:02:03.501 --> 00:02:04.334
times 0.4.

00:02:06.483 --> 00:02:08.112
Plus,

00:02:08.112 --> 00:02:12.384
the outcome three has
a probability of 0.25,

00:02:12.384 --> 00:02:13.904
plus three

00:02:13.904 --> 00:02:14.821
times 0.25.

00:02:16.880 --> 00:02:19.111
And then last but not least,

00:02:19.111 --> 00:02:22.310
we have the outcome
four workouts in a week,

00:02:22.310 --> 00:02:24.730
that has a probability of 0.1,

00:02:24.730 --> 00:02:26.263
plus four

00:02:26.263 --> 00:02:27.096
times 0.1.

00:02:28.976 --> 00:02:31.339
Well, we can simplify this a little bit.

00:02:31.339 --> 00:02:34.082
Zero times anything is just zero.

00:02:34.082 --> 00:02:35.582
So, one times 0.15

00:02:37.344 --> 00:02:38.177
is 0.15.

00:02:39.899 --> 00:02:41.524
Two times 0.4

00:02:41.524 --> 00:02:42.357
is 0.8.

00:02:44.272 --> 00:02:46.321
Three times 0.25

00:02:46.321 --> 00:02:47.154
is 0.75.

00:02:49.232 --> 00:02:51.732
And then four times .1 is 0.4.

00:02:52.969 --> 00:02:55.921
And so, we just have to
add up these numbers.

00:02:55.921 --> 00:02:57.095
So, we get

00:02:57.095 --> 00:02:57.928
0.15,

00:03:00.199 --> 00:03:01.032
plus .8,

00:03:03.455 --> 00:03:04.288
plus .75,

00:03:07.494 --> 00:03:08.327
plus .4,

00:03:10.170 --> 00:03:11.670
and let's say 0.4,

00:03:12.979 --> 00:03:13.812
0.75,

00:03:15.123 --> 00:03:15.956
0.8.

00:03:16.855 --> 00:03:18.602
Let's add 'em all together.

00:03:18.602 --> 00:03:21.869
And so, let's see, five plus five is 10.

00:03:21.869 --> 00:03:24.148
And then this is two plus eight is 10,

00:03:24.148 --> 00:03:26.981
plus seven is 17, plus four is 21.

00:03:28.687 --> 00:03:32.854
So, we get all of this is
going to be equal to 2.1.

00:03:33.985 --> 00:03:35.859
So, one way to think about it is

00:03:35.859 --> 00:03:38.186
the expected value of x,

00:03:38.186 --> 00:03:41.512
the expected number of
workouts for me in a week,

00:03:41.512 --> 00:03:45.963
given this probability
distribution, is 2.1.

00:03:45.963 --> 00:03:48.374
Now you might be saying,
wait, hold on a second.

00:03:48.374 --> 00:03:51.224
All of the outcomes
here are whole numbers.

00:03:51.224 --> 00:03:53.836
How can you have 2.1 workouts in a week?

00:03:53.836 --> 00:03:55.959
What is .1 of a workout?

00:03:55.959 --> 00:03:58.580
Well, this isn't saying
that in a given week,

00:03:58.580 --> 00:04:01.957
you would expect me to
work out exactly 2.1 times.

00:04:01.957 --> 00:04:04.286
But this is valuable
because you could say, well,

00:04:04.286 --> 00:04:06.867
in 10 weeks, you would expect me

00:04:06.867 --> 00:04:09.034
to do roughly 21 workouts.

00:04:10.025 --> 00:04:12.714
Sometimes I might do zero
workouts, sometimes one,

00:04:12.714 --> 00:04:15.217
sometimes two, sometimes
three, sometimes four.

00:04:15.217 --> 00:04:16.566
But in 100 weeks,

00:04:16.566 --> 00:04:20.559
you might expect me to do 210 workouts.

00:04:20.559 --> 00:04:22.199
So, even for a random variable

00:04:22.199 --> 00:04:25.460
that can only take on integer values,

00:04:25.460 --> 00:04:29.209
you can still have a
non-integer expected value,

00:04:29.209 --> 00:04:30.996
and it is still useful.


Probability with discrete random variable example

WEBVTT
Kind: captions
Language: en

00:00:00.664 --> 00:00:03.725
- [Lecturer] Hugo plans to
buy packs of baseball cards

00:00:03.725 --> 00:00:06.881
until he gets the card
of his favorite player,

00:00:06.881 --> 00:00:11.057
but he only has enough money
to buy at most four packs.

00:00:11.057 --> 00:00:15.379
Suppose that each pack has probability 0.2

00:00:15.379 --> 00:00:19.313
of containing the card Hugo is hoping for.

00:00:19.313 --> 00:00:21.198
Let the random variable X

00:00:21.198 --> 00:00:24.487
be the number of packs of cards Hugo buys.

00:00:24.487 --> 00:00:28.893
Here is the probability
distribution for X.

00:00:28.893 --> 00:00:32.638
So it looks like there
is a 0.2 probability

00:00:32.638 --> 00:00:35.725
that he buys one pack,
and that makes sense

00:00:35.725 --> 00:00:39.589
because that first pack,
there is a 0.2 probability

00:00:39.589 --> 00:00:42.100
that it contains his
favorite player's card,

00:00:42.100 --> 00:00:43.987
and if it does, at that
point he'll just stop,

00:00:43.987 --> 00:00:46.646
he won't buy any more packs.

00:00:46.646 --> 00:00:49.479
Now what about the probability
that he buys two packs?

00:00:49.479 --> 00:00:53.575
Well, over here they give it
a 0.16, and that makes sense,

00:00:53.575 --> 00:00:57.228
there is a .8 probability
that he does not get the card

00:00:57.228 --> 00:00:58.890
he wants on the first one,

00:00:58.890 --> 00:01:00.751
and then there's another .2

00:01:00.751 --> 00:01:02.409
that he gets it on the second one.

00:01:02.409 --> 00:01:05.742
So 0.8 times 0.2 does indeed equal 0.16.

00:01:10.188 --> 00:01:12.312
But they're not asking
us to calculate that,

00:01:12.312 --> 00:01:13.938
they give it to us.

00:01:13.938 --> 00:01:18.462
Then, the probability that
he gets three packs is 0.128,

00:01:18.462 --> 00:01:20.289
and then they've left
blank the probability

00:01:20.289 --> 00:01:22.001
that he gets four packs.

00:01:22.001 --> 00:01:25.491
But this is the entire discrete
probability distribution,

00:01:25.491 --> 00:01:28.191
because Hugo has to stop at four,

00:01:28.191 --> 00:01:31.701
even if he doesn't get
the card he wants at four

00:01:31.701 --> 00:01:35.527
on the fourth pack, he's just
going to stop over there.

00:01:35.527 --> 00:01:37.849
So we could actually figure
out this question mark

00:01:37.849 --> 00:01:40.936
by just realizing that
these four probabilities

00:01:40.936 --> 00:01:42.769
have to add up to one.

00:01:43.748 --> 00:01:45.751
But let's just first answer the question,

00:01:45.751 --> 00:01:47.735
find the indicated probability,

00:01:47.735 --> 00:01:50.445
what is the probability
that X is greater than

00:01:50.445 --> 00:01:51.957
or equal to two?

00:01:51.957 --> 00:01:53.184
What is the probability, remember,

00:01:53.184 --> 00:01:56.592
X is the number of packs
of cards Hugo buys.

00:01:56.592 --> 00:01:58.158
I encourage you to pause the video

00:01:58.158 --> 00:02:00.241
and try to figure it out.

00:02:01.231 --> 00:02:03.531
So let's look at the
scenarios we're talking about.

00:02:03.531 --> 00:02:06.327
Probability that our
discrete random variable X

00:02:06.327 --> 00:02:08.291
is greater than or equal to two,

00:02:08.291 --> 00:02:12.692
well, that's these three
scenarios right over here.

00:02:12.692 --> 00:02:15.856
And so what is their combined probability?

00:02:15.856 --> 00:02:17.216
Well you might want to say,

00:02:17.216 --> 00:02:19.652
hey we did figure out what the probability

00:02:19.652 --> 00:02:22.528
of getting exactly four packs are,

00:02:22.528 --> 00:02:26.667
but we have to remember that
these all add up to 100%.

00:02:26.667 --> 00:02:29.701
And so this right over here is 0.2

00:02:29.701 --> 00:02:32.528
and so this is 0.2, the
other three combined

00:02:32.528 --> 00:02:34.839
have to add up to 0.8.

00:02:34.839 --> 00:02:37.672
0.8 plus 0.2 is one, or 100%.

00:02:38.703 --> 00:02:42.904
So just like that we
know that this is 0.8.

00:02:42.904 --> 00:02:45.451
If for kicks we wanted to figure out

00:02:45.451 --> 00:02:47.501
this question mark right over here

00:02:47.501 --> 00:02:50.925
we could just say that
look, have to add up to one.

00:02:50.925 --> 00:02:55.014
So, we could say, the
probability of exactly four

00:02:55.014 --> 00:02:56.549
is going to be equal to one

00:02:56.549 --> 00:02:59.299
minus 0.2 minus 0.16 minus 0.128.

00:03:05.006 --> 00:03:09.173
I get one minus .2 minus .16
minus .128 is equal to 0.512.

00:03:17.822 --> 00:03:19.905
Is equal to 0.512, 0.512.

00:03:23.684 --> 00:03:25.037
You might immediately say, wait, wait,

00:03:25.037 --> 00:03:27.486
this seems like a very high probability,

00:03:27.486 --> 00:03:32.324
there's more than a 50% chance
that he buys four packs,

00:03:32.324 --> 00:03:35.050
and you have to remember,
he has to stop at four.

00:03:35.050 --> 00:03:38.011
Even if on the fourth he
doesn't get the card he wants

00:03:38.011 --> 00:03:39.724
he still has to stop there.

00:03:39.724 --> 00:03:41.739
So, there's a high probability

00:03:41.739 --> 00:03:43.515
that that's where we end up.

00:03:43.515 --> 00:03:45.364
There's a little less than 50% chance

00:03:45.364 --> 00:03:49.270
that he gets the card he's
looking for before that point.


Valid discrete probability distribution examples

WEBVTT
Kind: captions
Language: en

00:00:00.416 --> 00:00:01.649
- [Instructor] Anthony DeNoon

00:00:01.649 --> 00:00:05.133
is analyzing his basketball statistics.

00:00:05.133 --> 00:00:08.257
The following table
shows a probability model

00:00:08.257 --> 00:00:12.048
for the results from his
next two free throws.

00:00:12.048 --> 00:00:15.067
And so he has various outcomes
of those two free throws,

00:00:15.067 --> 00:00:16.958
and then the corresponding probability.

00:00:16.958 --> 00:00:19.933
Missing both free throws, 0.2.

00:00:19.933 --> 00:00:23.417
Making exactly one free throw, 0.5.

00:00:23.417 --> 00:00:26.765
And making both free throws, 0.1.

00:00:26.765 --> 00:00:29.598
Is this a valid probability model?

00:00:30.516 --> 00:00:34.241
Pause this video and see if you
can make a conclusion there.

00:00:34.241 --> 00:00:38.150
So let's think about what makes
a valid probability model.

00:00:38.150 --> 00:00:40.599
One, the sum of the probabilities

00:00:40.599 --> 00:00:44.725
of all the scenarios
need to add up to 100%.

00:00:44.725 --> 00:00:47.808
So we would definitely want to check that.

00:00:47.808 --> 00:00:51.355
And also, they would all
have to be positive values

00:00:51.355 --> 00:00:54.675
or I guess I should say none
of them can be negative values.

00:00:54.675 --> 00:00:58.608
You could have a scenario
that has a 0% probability.

00:00:58.608 --> 00:01:02.267
And so all of these look
like positive probabilities,

00:01:02.267 --> 00:01:04.192
so we meet that second test

00:01:04.192 --> 00:01:07.732
that all the probabilities
are non-negative,

00:01:07.732 --> 00:01:10.700
but do they add up to 100%?

00:01:10.700 --> 00:01:13.450
So if I add .2 to .5, that is .7,

00:01:14.654 --> 00:01:16.904
plus .1, they add up to 0.8

00:01:18.084 --> 00:01:19.949
or they add up to 80%.

00:01:19.949 --> 00:01:22.700
So this is not a valid probability model.

00:01:22.700 --> 00:01:24.183
In order for it to be valid,

00:01:24.183 --> 00:01:26.458
they would all, all the various scenarios

00:01:26.458 --> 00:01:29.207
need to add up exactly to 100%.

00:01:29.207 --> 00:01:32.262
In this case, we only add up to 80%.

00:01:32.262 --> 00:01:35.013
If we add it up to 1.1 or 110%,

00:01:35.013 --> 00:01:37.083
then we would also have a problem.

00:01:37.083 --> 00:01:39.540
We can just write no.

00:01:39.540 --> 00:01:41.623
Let's do another example.

00:01:43.133 --> 00:01:46.633
So here we are told you are a space alien.

00:01:48.462 --> 00:01:52.137
You visit planet Earth
and abduct 97 chickens,

00:01:52.137 --> 00:01:54.054
47 cows, and 77 humans.

00:01:56.066 --> 00:01:58.483
Then you randomly select
one Earth creature

00:01:58.483 --> 00:02:00.732
from your sample to experiment on.

00:02:00.732 --> 00:02:05.458
Each creature has an equal
probability of getting selected.

00:02:05.458 --> 00:02:07.304
Create a probability model to show

00:02:07.304 --> 00:02:10.800
how likely you are to select
each type of Earth creature.

00:02:10.800 --> 00:02:12.350
Input your answers as fractions

00:02:12.350 --> 00:02:15.900
or as decimals rounded
to the nearest hundredth.

00:02:15.900 --> 00:02:18.224
So in the last example, we wanted to see

00:02:18.224 --> 00:02:22.605
whether the probability model
was valid, was legitimate.

00:02:22.605 --> 00:02:26.671
Here, we wanna construct a
legitimate probability model.

00:02:26.671 --> 00:02:28.166
Well, how would we do that?

00:02:28.166 --> 00:02:30.891
Well, the estimated probability
of getting a chicken

00:02:30.891 --> 00:02:33.491
is gonna be the fraction
that you're sampling from

00:02:33.491 --> 00:02:36.657
that is our chickens because
any one of the animals

00:02:36.657 --> 00:02:38.901
are equally likely to be selected.

00:02:38.901 --> 00:02:40.309
97

00:02:40.309 --> 00:02:41.142
of the 97

00:02:42.402 --> 00:02:43.235
plus 47

00:02:44.108 --> 00:02:47.066
plus 77 animals are chickens.

00:02:47.066 --> 00:02:48.058
And so what is this going to be?

00:02:48.058 --> 00:02:50.141
This is gonna be 97 over.

00:02:51.237 --> 00:02:52.070
97,

00:02:53.191 --> 00:02:54.108
47, and 77,

00:02:55.282 --> 00:02:56.454
you add 'em up.

00:02:56.454 --> 00:02:58.776
Three sevens is a 21.

00:02:58.776 --> 00:03:01.016
And then let's see, two plus nine is 11,

00:03:01.016 --> 00:03:02.341
plus four is 15,

00:03:02.341 --> 00:03:03.758
plus seven is 22,

00:03:05.124 --> 00:03:05.957
so 221.

00:03:07.083 --> 00:03:10.250
So 97 of the 221 animals are chickens.

00:03:11.449 --> 00:03:14.116
And so I'll just write 97, 221s.

00:03:14.957 --> 00:03:17.508
They say that we can answer as fractions,

00:03:17.508 --> 00:03:19.316
so I'm just gonna go that way.

00:03:19.316 --> 00:03:20.625
What about cows?

00:03:20.625 --> 00:03:22.074
Well, 47

00:03:22.074 --> 00:03:24.000
of the 221 are cows,

00:03:24.000 --> 00:03:26.833
so there's a 47, 221st probability

00:03:28.850 --> 00:03:30.182
of getting a cow.

00:03:30.182 --> 00:03:31.651
And then last but not least,

00:03:31.651 --> 00:03:34.484
you have 77 of the 221s are human.

00:03:36.299 --> 00:03:38.333
Is this a legitimate
probability distribution?

00:03:38.333 --> 00:03:40.216
We'll add these up.

00:03:40.216 --> 00:03:42.424
If you add these three fractions up,

00:03:42.424 --> 00:03:44.349
the denominator's gonna be 221

00:03:44.349 --> 00:03:48.857
and we already know that
97 plus 47 plus 77 is 221.

00:03:48.857 --> 00:03:50.707
So it definitely adds up to one,

00:03:50.707 --> 00:03:53.057
and none of these are negative,

00:03:53.057 --> 00:03:57.140
so this is a legitimate
probability distribution.


Conditional probability tree diagram example

WEBVTT
Kind: captions
Language: en

00:00:00.637 --> 00:00:02.708
- [Instructor] A company
screens job applicants

00:00:02.708 --> 00:00:05.360
for illegal drug use at a certain stage

00:00:05.360 --> 00:00:07.230
in their hiring process.

00:00:07.230 --> 00:00:11.867
The specific test they use
has a false positive rate

00:00:11.867 --> 00:00:16.611
of two percent and a false
negative rate of one percent.

00:00:16.611 --> 00:00:20.106
Suppose that five percent
of all their applicants

00:00:20.106 --> 00:00:22.942
are actually using illegal drugs

00:00:22.942 --> 00:00:25.713
and we randomly select an applicant.

00:00:25.713 --> 00:00:28.430
Giving the applicant test positive,

00:00:28.430 --> 00:00:33.353
what is the probability that
they are actually on drugs?

00:00:33.353 --> 00:00:35.151
So let's work through this together.

00:00:35.151 --> 00:00:36.868
So first let's make sure we understand

00:00:36.868 --> 00:00:38.059
what they're telling us.

00:00:38.059 --> 00:00:40.615
So there is this drug test
for the job applicants

00:00:40.615 --> 00:00:44.782
and then the test has a false
positive rate of two percent.

00:00:45.841 --> 00:00:47.056
What does that mean?

00:00:47.056 --> 00:00:50.723
That means that in two
percent of the cases,

00:00:52.440 --> 00:00:54.994
when it should have read negative,

00:00:54.994 --> 00:00:57.201
that the person didn't do the drugs,

00:00:57.201 --> 00:00:59.313
it actually read positive.

00:00:59.313 --> 00:01:00.913
It is a false positive.

00:01:00.913 --> 00:01:03.891
It should have read negative
but it read positive.

00:01:03.891 --> 00:01:05.234
Another way to think about it.

00:01:05.234 --> 00:01:08.964
If someone did not do drugs
and you take this test,

00:01:08.964 --> 00:01:10.673
there's a two percent chance

00:01:10.673 --> 00:01:14.296
saying that you did do the illegal drugs.

00:01:14.296 --> 00:01:18.163
They also say that there
is a false negative rate

00:01:18.163 --> 00:01:19.594
of one percent.

00:01:19.594 --> 00:01:20.854
What does that mean?

00:01:20.854 --> 00:01:24.112
That means that one percent of the time

00:01:24.112 --> 00:01:27.979
if someone did actually
take the illegal drugs,

00:01:27.979 --> 00:01:29.593
it'll say that they didn't.

00:01:29.593 --> 00:01:32.335
It is falsely giving a negative result

00:01:32.335 --> 00:01:34.909
when it should have given a positive one.

00:01:34.909 --> 00:01:37.465
And then they say that five
percent of all their applicants

00:01:37.465 --> 00:01:39.849
are actually using illegal drugs.

00:01:39.849 --> 00:01:42.720
So there is several ways
that we can think about it.

00:01:42.720 --> 00:01:45.416
One of the easiest way
to conceptualize is just,

00:01:45.416 --> 00:01:48.205
let's just make up a large
number of applicants,

00:01:48.205 --> 00:01:50.904
and I'll use a number where
it's fairly straightforward

00:01:50.904 --> 00:01:53.193
to do the mathematics.

00:01:53.193 --> 00:01:57.360
So let's say that we start
of with 10,000 applicants.

00:01:58.651 --> 00:02:01.155
I will both talk in absolute numbers,

00:02:01.155 --> 00:02:02.591
and I just made this number up.

00:02:02.591 --> 00:02:04.644
It could have been 1,000,
it could have been 100,000,

00:02:04.644 --> 00:02:06.588
but I like this number 'cause
it's easy to do the math

00:02:06.588 --> 00:02:08.671
better than saying 9,785.

00:02:09.520 --> 00:02:14.188
This is also going to be
100% of the applicants.

00:02:14.188 --> 00:02:17.031
Now they give us some
crucial information here.

00:02:17.031 --> 00:02:19.949
They tell us that five percent
of all their applicants

00:02:19.949 --> 00:02:23.230
are actually using illegal drugs.

00:02:23.230 --> 00:02:26.440
So we can immediately
break this 10,000 group

00:02:26.440 --> 00:02:28.420
into the ones that are doing the drugs

00:02:28.420 --> 00:02:30.500
and the ones that are not.

00:02:30.500 --> 00:02:34.000
So five percent are actually on the drugs,

00:02:35.680 --> 00:02:38.955
95% are not on the drugs.

00:02:38.955 --> 00:02:41.705
So what's five percent of 10,000?

00:02:42.573 --> 00:02:44.323
So that would be 500.

00:02:45.399 --> 00:02:47.566
So 500 on drugs, on drugs.

00:02:51.251 --> 00:02:55.674
Once again, this is five percent
of our original population.

00:02:55.674 --> 00:02:57.616
And then how many are not on drugs?

00:02:57.616 --> 00:02:59.616
Well 9,500 not on drugs.

00:03:04.213 --> 00:03:08.380
And once again, this is 95%
of our group of applicants.

00:03:09.355 --> 00:03:12.105
So now let's administer the test.

00:03:13.134 --> 00:03:15.831
So what is going to
happen when we administer

00:03:15.831 --> 00:03:19.707
the test to the people who are on drugs?

00:03:19.707 --> 00:03:23.071
Well the test, ideally,
would give a positive result.

00:03:23.071 --> 00:03:24.886
It would say positive for all of them,

00:03:24.886 --> 00:03:26.895
but we know that it's not a perfect test.

00:03:26.895 --> 00:03:29.475
It's going to give
negative for some of them.

00:03:29.475 --> 00:03:32.663
It will falsely give a negative
result for some of them,

00:03:32.663 --> 00:03:35.203
and we know that because it
has a false negative rate

00:03:35.203 --> 00:03:36.534
of one percent.

00:03:36.534 --> 00:03:40.701
Of these 500, 99% is going
to get the correct result

00:03:43.650 --> 00:03:45.895
in that they're going to test positive.

00:03:45.895 --> 00:03:48.145
So what is 99% of 500?

00:03:50.172 --> 00:03:53.273
Well let's see, that would be 495.

00:03:53.273 --> 00:03:55.856
495 are going to test positive.

00:03:57.101 --> 00:04:00.987
I will just use a
positive right over there.

00:04:00.987 --> 00:04:04.404
And then we're going to have one percent,

00:04:06.165 --> 00:04:09.895
which is five, are going to test negative.

00:04:09.895 --> 00:04:12.141
They are going to falsely test negative.

00:04:12.141 --> 00:04:14.969
This is the false negative rate.

00:04:14.969 --> 00:04:18.816
If we say, what percent of
our original applicant pool

00:04:18.816 --> 00:04:22.105
is on drugs and tests positive,

00:04:22.105 --> 00:04:23.855
well 495 over 10,000.

00:04:24.757 --> 00:04:26.340
This is 4.95%.

00:04:29.694 --> 00:04:32.667
What percent is of the
original applicant pool

00:04:32.667 --> 00:04:36.514
that is on drugs but
tests negative for drugs?

00:04:36.514 --> 00:04:38.834
The test says that hey
they're not doing drugs.

00:04:38.834 --> 00:04:41.876
Well this is gonna be five out of 10,000.

00:04:41.876 --> 00:04:43.543
Which is 0.05%.

00:04:47.338 --> 00:04:50.354
Another way that you could
get these percentages.

00:04:50.354 --> 00:04:53.395
If you take five percent
and multiply by one percent,

00:04:53.395 --> 00:04:55.895
you're goin to get 0.05%.

00:04:57.116 --> 00:04:59.184
500ths of a percent.

00:04:59.184 --> 00:05:02.654
If you take five percent
and multiply by 99%,

00:05:02.654 --> 00:05:05.237
you're going to get 4.95%.

00:05:06.433 --> 00:05:07.599
Now let's keep going.

00:05:07.599 --> 00:05:09.612
Now let's go to the folks
who aren't taking the drugs.

00:05:09.612 --> 00:05:11.463
And this is where the false positive rate

00:05:11.463 --> 00:05:13.814
is going to come into effect.

00:05:13.814 --> 00:05:18.285
So we have a false positive
rate of two percent.

00:05:18.285 --> 00:05:21.785
So two percent are going to test positive.

00:05:22.836 --> 00:05:25.169
What's two percent of 9,500?

00:05:26.419 --> 00:05:28.752
It's 190 would test positive

00:05:32.193 --> 00:05:34.037
even though they're not on drugs.

00:05:34.037 --> 00:05:36.764
This is the false positive rate.

00:05:36.764 --> 00:05:39.159
So they are testing positive,

00:05:39.159 --> 00:05:43.958
and then the other 98% will
correctly come out negative.

00:05:43.958 --> 00:05:47.208
The other 98%, so 9,500 minus 190,

00:05:48.514 --> 00:05:52.681
that's gonna be 9,310 will
correctly test negative.

00:05:56.404 --> 00:06:00.199
Now what percent of the
original applicant pool is this?

00:06:00.199 --> 00:06:02.032
Well 190 is 1.9%,

00:06:06.191 --> 00:06:09.221
and we could calculate
it by 190 over 10,000

00:06:09.221 --> 00:06:13.661
or you could just say two
percent of 95% is 1.9%.

00:06:13.661 --> 00:06:16.596
Once again, multiply
the path along the tree.

00:06:16.596 --> 00:06:18.429
What percent is 9.310?

00:06:19.299 --> 00:06:22.382
Well that is going to be 93.10%.

00:06:24.597 --> 00:06:27.350
You could say this is 9,310 over 10,000

00:06:27.350 --> 00:06:29.915
or you can multiply by the path

00:06:29.915 --> 00:06:31.570
on our probability tree here.

00:06:31.570 --> 00:06:35.487
95% times 98% gets us to 93.10%.

00:06:36.800 --> 00:06:40.384
But now I think we are ready
to answer the question.

00:06:40.384 --> 00:06:42.877
Given that the applicant tests positive,

00:06:42.877 --> 00:06:46.722
what is the probability that
they are actually on drugs?

00:06:46.722 --> 00:06:49.106
So let's look at the first part.

00:06:49.106 --> 00:06:52.071
Given the applicant tests positive.

00:06:52.071 --> 00:06:55.220
So which applicants
actually tested positive?

00:06:55.220 --> 00:06:57.794
You have these 495 here tested positive,

00:06:57.794 --> 00:06:59.961
correctly tested positive,

00:07:01.674 --> 00:07:04.654
and then you have these
190 right over here

00:07:04.654 --> 00:07:06.301
incorrectly tested positive,

00:07:06.301 --> 00:07:07.969
but they did test positive.

00:07:07.969 --> 00:07:10.598
So how many tested positive?

00:07:10.598 --> 00:07:14.098
Well we have 495 plus 190 tested positive.

00:07:17.303 --> 00:07:19.657
That's the total number
that tested positive,

00:07:19.657 --> 00:07:23.340
and then which of them
were actually on the drugs?

00:07:23.340 --> 00:07:25.631
Well of the ones that tested positive,

00:07:25.631 --> 00:07:28.214
495 were actually on the drugs.

00:07:30.477 --> 00:07:32.310
We have 495 divided by

00:07:37.330 --> 00:07:38.330
495 plus 190

00:07:43.894 --> 00:07:45.477
is equal to 0.7226.

00:07:49.272 --> 00:07:51.911
So we could say approximately 72%.

00:07:51.911 --> 00:07:53.828
Approximately 72%.

00:07:56.692 --> 00:07:58.789
Now this is really interesting.

00:07:58.789 --> 00:08:00.527
Given the applicant tests positive,

00:08:00.527 --> 00:08:03.362
what is the probability that
they are actually on drugs?

00:08:03.362 --> 00:08:05.209
When you look at these false positive

00:08:05.209 --> 00:08:07.721
and false negative rates,
they seem quite low,

00:08:07.721 --> 00:08:10.847
but now when you actually
did the calculation,

00:08:10.847 --> 00:08:13.467
the probability that someone's
actually on drugs is,

00:08:13.467 --> 00:08:15.909
it's high, but it's not that high.

00:08:15.909 --> 00:08:18.292
It's not like if someone
were to test positive

00:08:18.292 --> 00:08:20.827
that you'd say oh they are
definitely taking the drugs.

00:08:20.827 --> 00:08:23.056
And you could also get to this result

00:08:23.056 --> 00:08:24.709
just by using the percentages.

00:08:24.709 --> 00:08:26.538
For example, you could think in terms of

00:08:26.538 --> 00:08:28.885
what percentage of the original applicants

00:08:28.885 --> 00:08:30.746
end up testing positive?

00:08:30.746 --> 00:08:34.090
Well that's 4.95% plus 1.9%.

00:08:34.090 --> 00:08:38.257
4.95, we'll just do it in
terms of percent, plus 1.9%,

00:08:40.765 --> 00:08:45.376
and of them, what percentage
were actually on the drugs?

00:08:45.376 --> 00:08:47.793
Well that was the 4.95%.

00:08:49.564 --> 00:08:54.072
And notice this would give
you the exact same result.

00:08:54.072 --> 00:08:56.995
Now there's an interesting takeaway here.

00:08:56.995 --> 00:08:58.294
Because this is saying,

00:08:58.294 --> 00:09:00.315
of the people that test positive,

00:09:00.315 --> 00:09:03.120
72% are actually on the drugs.

00:09:03.120 --> 00:09:05.252
You could think about
it the other way around.

00:09:05.252 --> 00:09:07.650
Of the people who test positive.

00:09:07.650 --> 00:09:12.146
495 plus 190, what
percentage aren't on drugs?

00:09:12.146 --> 00:09:14.002
Well that was 190,

00:09:14.002 --> 00:09:18.002
and this comes out to
be approximately 28%.

00:09:19.537 --> 00:09:21.620
100% minus 72%.

00:09:22.961 --> 00:09:25.760
If we were in a court of law

00:09:25.760 --> 00:09:27.610
and let's say the prosecuting attorney,

00:09:27.610 --> 00:09:29.792
let's say I got tested positive for drugs

00:09:29.792 --> 00:09:31.681
and the prosecuting attorney says

00:09:31.681 --> 00:09:34.054
look, this test is very good.

00:09:34.054 --> 00:09:36.859
It only has a false
positive rate of two percent

00:09:36.859 --> 00:09:41.782
and Sal tested positive, he
is probably taking drugs.

00:09:41.782 --> 00:09:44.989
A jury who doesn't really
understand this well

00:09:44.989 --> 00:09:47.246
or go through the trouble
that we just did might say,

00:09:47.246 --> 00:09:50.582
oh yeah Sal probably took the drugs.

00:09:50.582 --> 00:09:51.964
But when we look at this,

00:09:51.964 --> 00:09:54.502
even if I test positive using this test,

00:09:54.502 --> 00:09:59.270
there's a 28% chance that
I'm not taking drugs.

00:09:59.270 --> 00:10:02.303
That I was just in this
false positive group,

00:10:02.303 --> 00:10:06.307
and the reason why this
number is a good bit larger

00:10:06.307 --> 00:10:07.465
than this number

00:10:07.465 --> 00:10:10.580
is because when we looked
at the original division

00:10:10.580 --> 00:10:12.705
between those who take
drugs and don't take drugs,

00:10:12.705 --> 00:10:14.953
most don't take the illegal drugs.

00:10:14.953 --> 00:10:17.930
Two percent of this larger group

00:10:17.930 --> 00:10:20.118
of the ones that don't take the drugs,

00:10:20.118 --> 00:10:22.316
well this is actually
a fairly large number

00:10:22.316 --> 00:10:25.415
relative to the percentage
that do take the drugs

00:10:25.415 --> 00:10:27.434
and test positive.

00:10:27.434 --> 00:10:29.294
So I will leave you there.

00:10:29.294 --> 00:10:32.148
This is fascinating not just
for this particular case,

00:10:32.148 --> 00:10:35.519
but you will see analysis
like this all the time

00:10:35.519 --> 00:10:38.023
when we're looking at
whether a certain medication

00:10:38.023 --> 00:10:40.485
is effective or a certain
procedure is effective.

00:10:40.485 --> 00:10:43.607
It's important to be
able to do this analysis.


Conditional probability and independence

WEBVTT
Kind: captions
Language: en

00:00:01.352 --> 00:00:03.620
- [Instructor] James is
interested in weather conditions

00:00:03.620 --> 00:00:04.897
and whether the downtown train

00:00:04.897 --> 00:00:07.588
he sometimes takes runs on time.

00:00:07.588 --> 00:00:10.504
For a year, James records
whether each day is sunny,

00:00:10.504 --> 00:00:13.752
cloudy, rainy or snowy, as
well as whether this train

00:00:13.752 --> 00:00:15.763
arrives on time or is delayed.

00:00:15.763 --> 00:00:18.630
His results are displayed
in the table below.

00:00:18.630 --> 00:00:20.083
Alright, this is interesting.

00:00:20.083 --> 00:00:23.622
These columns, on time,
delayed and the total,

00:00:23.622 --> 00:00:25.434
so for example, when it was sunny,

00:00:25.434 --> 00:00:28.161
there's a total of 170
sunny days that year,

00:00:28.161 --> 00:00:31.217
167 of which the train was on time,

00:00:31.217 --> 00:00:33.185
three of which the train was delayed,

00:00:33.185 --> 00:00:36.058
and we can look at that
by the different types

00:00:36.058 --> 00:00:39.744
of weather conditions, and
then they say for these days,

00:00:39.744 --> 00:00:43.262
are the events delayed
and snowy independent?

00:00:43.262 --> 00:00:45.469
So to think about this, and remember,

00:00:45.469 --> 00:00:46.867
we're only going to be able to figure out

00:00:46.867 --> 00:00:49.163
experimental probabilities,
and you should always view

00:00:49.163 --> 00:00:51.679
experimental probabilities
as somewhat suspect.

00:00:51.679 --> 00:00:54.928
The more experiments you're
able to take, the more likely

00:00:54.928 --> 00:00:59.017
it is to approximate the
true theoretical probability,

00:00:59.017 --> 00:01:00.955
but there's always some
chance that they might

00:01:00.955 --> 00:01:03.498
be different or even quite different.

00:01:03.498 --> 00:01:05.695
Let's use this data to try to calculate

00:01:05.695 --> 00:01:07.669
the experimental probability.

00:01:07.669 --> 00:01:09.204
So the key question here is what is

00:01:09.204 --> 00:01:12.704
the probability that the train is delayed?

00:01:14.223 --> 00:01:16.208
And then we wanna think
about what is the probability

00:01:16.208 --> 00:01:20.291
that the train is delayed
given that it is snowy?

00:01:23.858 --> 00:01:26.774
If we knew the theoretical probabilities

00:01:26.774 --> 00:01:28.666
and if they were exactly the same,

00:01:28.666 --> 00:01:31.511
if the probability of being
delayed was exactly the same

00:01:31.511 --> 00:01:34.413
as the probability of
being delayed given snowy,

00:01:34.413 --> 00:01:38.976
then being delayed or being
snowy would be independent,

00:01:38.976 --> 00:01:41.158
but if we knew the
theoretical probabilities

00:01:41.158 --> 00:01:44.173
and the probability of
being delayed given snowy

00:01:44.173 --> 00:01:46.879
were different than the
probability of being delayed,

00:01:46.879 --> 00:01:50.453
then we would not say that
these are independent variables.

00:01:50.453 --> 00:01:52.951
Now, we don't know the
theoretical probabilities.

00:01:52.951 --> 00:01:56.088
We're just going to calculate
the experimental probabilities

00:01:56.088 --> 00:02:00.171
and we do have a good
number of experiments here,

00:02:01.007 --> 00:02:03.577
so if these are quite different,

00:02:03.577 --> 00:02:06.642
I would feel confident saying
that they are dependent.

00:02:06.642 --> 00:02:09.985
If they are pretty close with
the experimental probability,

00:02:09.985 --> 00:02:12.413
I would say that it would be
hard to make the statement

00:02:12.413 --> 00:02:15.767
that they are dependent,
and that you would probably

00:02:15.767 --> 00:02:19.077
lean towards independence,
but let's calculate this.

00:02:19.077 --> 00:02:22.382
What is the probability that
the train is just delayed?

00:02:22.382 --> 00:02:25.636
Pause this video and
try to figure that out.

00:02:25.636 --> 00:02:26.762
Well, let's see.

00:02:26.762 --> 00:02:30.929
If we just think in general,
we have a total of 365 trials,

00:02:31.834 --> 00:02:34.501
or 365 experiments, and of them,

00:02:36.178 --> 00:02:38.761
the train was delayed 35 times.

00:02:40.551 --> 00:02:42.483
Now, what's the probability that the train

00:02:42.483 --> 00:02:44.484
is delayed given that it is snowy?

00:02:44.484 --> 00:02:47.329
Pause the video and
try to figure that out.

00:02:47.329 --> 00:02:48.513
Well, let's see.

00:02:48.513 --> 00:02:51.180
We have a total of 20 snowy days

00:02:52.023 --> 00:02:55.773
and we are delayed 12
of those 20 snowy days,

00:02:57.991 --> 00:03:01.408
and so this is going to be a probability,

00:03:02.391 --> 00:03:06.380
12/20 is the same thing
as, if we multiply both

00:03:06.380 --> 00:03:08.463
the numerator and the denominator by five,

00:03:08.463 --> 00:03:12.630
this is a 60% probability, or
I could say a 0.6 probability

00:03:14.638 --> 00:03:17.034
of being delayed when it is snowy.

00:03:17.034 --> 00:03:19.222
This is, of course, an
experimental probability,

00:03:19.222 --> 00:03:21.021
which is much higher than this.

00:03:21.021 --> 00:03:24.131
This is less than 10% right over here.

00:03:24.131 --> 00:03:27.050
This right over here is less than 0.1.

00:03:27.050 --> 00:03:29.413
I could get a calculator
to calculate it exactly.

00:03:29.413 --> 00:03:32.121
It'll be nine point something percent

00:03:32.121 --> 00:03:35.210
or zero point nine something, but clearly,

00:03:35.210 --> 00:03:37.601
this, you are much more likely,

00:03:37.601 --> 00:03:39.472
at least from the experimental data,

00:03:39.472 --> 00:03:42.061
it seems like you have
a much higher proportion

00:03:42.061 --> 00:03:44.240
of your snowy days are delayed

00:03:44.240 --> 00:03:46.531
than just general days in general,

00:03:46.531 --> 00:03:50.409
than just general days,
and so based on this data,

00:03:50.409 --> 00:03:52.450
because the experimental probability

00:03:52.450 --> 00:03:55.439
of being delayed given
snowy is so much higher

00:03:55.439 --> 00:03:58.312
than the experimental probability
of just being delayed,

00:03:58.312 --> 00:04:01.818
I would make the statement
that these are not independent,

00:04:01.818 --> 00:04:03.176
so for these days, are the events

00:04:03.176 --> 00:04:06.009
delayed and snowy independent? No.


Random numbers for experimental probability

WEBVTT
Kind: captions
Language: en

00:00:00.409 --> 00:00:02.883
- [Instructor] Pascale
Ricketts has invented a game

00:00:02.883 --> 00:00:05.574
called Three Rolls to 10.

00:00:05.574 --> 00:00:09.588
You roll a fair six-sided die three times.

00:00:09.588 --> 00:00:13.465
If the sum of the rolls
is 10 or greater, you win.

00:00:13.465 --> 00:00:16.876
If it is less than 10, you lose.

00:00:16.876 --> 00:00:21.043
What is the probability of
winning Three Rolls to 10?

00:00:22.221 --> 00:00:25.669
So, there is several ways
that you can approach this.

00:00:25.669 --> 00:00:28.068
The way we're going to
tackle it in this video

00:00:28.068 --> 00:00:29.762
is we're going to try to come up

00:00:29.762 --> 00:00:32.106
with an experimental probability.

00:00:32.106 --> 00:00:34.528
We're going to do many experiments

00:00:34.528 --> 00:00:37.022
trying to win Three Rolls to 10

00:00:37.022 --> 00:00:38.567
and figure out the proportion

00:00:38.567 --> 00:00:39.868
that we actually win

00:00:39.868 --> 00:00:42.181
and the more experiments we try,

00:00:42.181 --> 00:00:44.864
the better, the more
likely that we're gonna get

00:00:44.864 --> 00:00:48.969
a good approximation of
the actual probability.

00:00:48.969 --> 00:00:50.055
So, let's do that

00:00:50.055 --> 00:00:52.867
and to help us I'm
going to have a computer

00:00:52.867 --> 00:00:55.826
generate a string of random digits

00:00:55.826 --> 00:00:57.326
from zero to nine.

00:00:58.982 --> 00:01:02.298
And the way that we're going
to use this is remember,

00:01:02.298 --> 00:01:05.740
we're rolling a fair six-sided die,

00:01:05.740 --> 00:01:08.386
so the outcome could be
one, two, three, four,

00:01:08.386 --> 00:01:10.553
five or six for each roll.

00:01:11.645 --> 00:01:13.768
In this random number list

00:01:13.768 --> 00:01:15.448
that the computer has generated,

00:01:15.448 --> 00:01:17.708
I do get digits from one to six

00:01:17.708 --> 00:01:21.982
but I also get the digits
seven, eight, nine and zero

00:01:21.982 --> 00:01:24.224
and so what I'm going to
do for each experiment,

00:01:24.224 --> 00:01:26.689
I'm going to start at the top left

00:01:26.689 --> 00:01:29.407
and I'm gonna consider each digit a roll.

00:01:29.407 --> 00:01:32.295
If it gives me an invalid
result for a six-sided die,

00:01:32.295 --> 00:01:35.994
so if it's a zero, an
eight, a seven or a nine

00:01:35.994 --> 00:01:37.208
I will just ignore that,

00:01:37.208 --> 00:01:39.734
I will just say well,
that wasn't a valid roll.

00:01:39.734 --> 00:01:42.066
It's like, you roll the die
and it fell off the table

00:01:42.066 --> 00:01:43.562
or something like that.

00:01:43.562 --> 00:01:44.575
So, let's do that.

00:01:44.575 --> 00:01:46.376
Let's do multiple experiments

00:01:46.376 --> 00:01:49.018
of taking three rolls, sum them up

00:01:49.018 --> 00:01:50.867
and we'll see how many we can do

00:01:50.867 --> 00:01:53.360
to figure out an experimental probability

00:01:53.360 --> 00:01:56.356
of winning Pascale's game.

00:01:56.356 --> 00:01:59.418
So, let me set up a little table here,

00:01:59.418 --> 00:02:02.546
so I want space to show the sum,

00:02:02.546 --> 00:02:05.713
so this is going to be the experiment,

00:02:06.929 --> 00:02:10.105
experiment, actually let me write the sum

00:02:10.105 --> 00:02:13.522
and over here we're gonna say did we win?

00:02:15.091 --> 00:02:16.052
Alright.

00:02:16.052 --> 00:02:19.052
So, let's start with experiment one.

00:02:20.288 --> 00:02:22.955
So, our first roll we got a one.

00:02:24.640 --> 00:02:27.705
Our second roll we got a five.

00:02:27.705 --> 00:02:29.353
We're doing quite well

00:02:29.353 --> 00:02:33.250
and then our third roll we got a six.

00:02:33.250 --> 00:02:34.538
Did we win?

00:02:34.538 --> 00:02:37.272
Well, one plus five plus six is 12.

00:02:37.272 --> 00:02:38.272
Yes, we won.

00:02:40.090 --> 00:02:41.303
Let's do another experiment.

00:02:41.303 --> 00:02:43.075
This is going to be experiment two.

00:02:43.075 --> 00:02:44.090
We can just keep going here.

00:02:44.090 --> 00:02:46.370
These are random digits.

00:02:46.370 --> 00:02:50.007
So, we have a six in our first roll.

00:02:50.007 --> 00:02:52.674
We got a two in our second roll,

00:02:53.912 --> 00:02:56.579
we got a four in our third roll.

00:02:57.597 --> 00:02:58.582
Did we win?

00:02:58.582 --> 00:03:01.767
Yes, once again this summed up to 12.

00:03:01.767 --> 00:03:03.197
So, we won.

00:03:03.197 --> 00:03:05.851
Alright, let's do another experiment.

00:03:05.851 --> 00:03:08.371
So, experiment number three.

00:03:08.371 --> 00:03:11.517
So, this first thing is invalid,

00:03:11.517 --> 00:03:13.230
so this is our first roll.

00:03:13.230 --> 00:03:14.313
We got a six,

00:03:15.552 --> 00:03:17.345
and then this is invalid.

00:03:17.345 --> 00:03:19.928
Our second roll we get a three,

00:03:21.067 --> 00:03:23.207
this is invalid, that is invalid,

00:03:23.207 --> 00:03:26.249
that is invalid and then in our third roll

00:03:26.249 --> 00:03:28.926
we got a two, so we squeaked by.

00:03:28.926 --> 00:03:30.877
This adds up to 11.

00:03:30.877 --> 00:03:33.551
Yes, that looks like a win.

00:03:33.551 --> 00:03:37.024
Alright, let's do our
fourth experiment here.

00:03:37.024 --> 00:03:39.691
So, our first roll we got a one.

00:03:42.226 --> 00:03:43.431
This is invalid.

00:03:43.431 --> 00:03:45.514
Second roll we got a two.

00:03:47.112 --> 00:03:48.651
This is invalid.

00:03:48.651 --> 00:03:51.512
Third roll we get a five.

00:03:51.512 --> 00:03:52.806
Did we win?

00:03:52.806 --> 00:03:55.397
One plus two plus five is eight.

00:03:55.397 --> 00:03:56.980
No, we did not win.

00:03:58.215 --> 00:04:00.428
So, that was our first non-win.

00:04:00.428 --> 00:04:01.564
So, let's keep going.

00:04:01.564 --> 00:04:03.055
This is interesting.

00:04:03.055 --> 00:04:05.098
Alright, this is invalid,

00:04:05.098 --> 00:04:08.443
so we're going to have,
so this is trial five,

00:04:08.443 --> 00:04:12.480
we're going to have four
plus three plus one.

00:04:12.480 --> 00:04:14.873
Four plus three plus one,

00:04:14.873 --> 00:04:16.618
adds up to eight.

00:04:16.618 --> 00:04:17.995
Did we win?

00:04:17.995 --> 00:04:19.280
No.

00:04:19.280 --> 00:04:21.115
Let's just keep going here.

00:04:21.115 --> 00:04:23.422
So, I'm gonna keep going with my table

00:04:23.422 --> 00:04:24.798
where I have experiment,

00:04:24.798 --> 00:04:27.881
I'll do five more trials, experiment,

00:04:29.014 --> 00:04:30.514
sum and do we win?

00:04:33.192 --> 00:04:34.222
Let me make the table.

00:04:34.222 --> 00:04:36.782
This is just a continuation
of the table we had before.

00:04:36.782 --> 00:04:37.870
I don't want to go below the page

00:04:37.870 --> 00:04:40.579
'cause I wanna be able to look
at our random numbers here.

00:04:40.579 --> 00:04:43.162
So, we are onto experiment six.

00:04:44.645 --> 00:04:49.279
Experiment six, we are getting
a three in the first roll,

00:04:49.279 --> 00:04:50.909
a three in the second roll,

00:04:50.909 --> 00:04:52.218
this isn't looking good

00:04:52.218 --> 00:04:55.042
and then a two in our third roll.

00:04:55.042 --> 00:04:56.246
Did we win?

00:04:56.246 --> 00:04:59.078
No, this is less than 10.

00:04:59.078 --> 00:05:01.578
Now we go to experiment seven.

00:05:03.309 --> 00:05:05.352
Experiment seven.

00:05:05.352 --> 00:05:07.579
We get a two in our first roll.

00:05:07.579 --> 00:05:08.950
This is invalid.

00:05:08.950 --> 00:05:12.700
We get a three in our
second roll, plus three

00:05:13.637 --> 00:05:17.778
and we get a one in our
third roll, so plus one.

00:05:17.778 --> 00:05:20.422
Once again we did not win.

00:05:20.422 --> 00:05:22.422
Now we go to experiment,

00:05:23.824 --> 00:05:26.407
we will go to experiment eight.

00:05:27.830 --> 00:05:30.789
We get a one in our first roll,

00:05:30.789 --> 00:05:33.539
we get a three in our second row,

00:05:34.379 --> 00:05:37.042
this is invalid, the
die fell off the table,

00:05:37.042 --> 00:05:38.546
we could think of it that way

00:05:38.546 --> 00:05:42.532
and then in our third roll
we get a five, plus five.

00:05:42.532 --> 00:05:43.540
Did we win?

00:05:43.540 --> 00:05:46.021
No, this adds up to nine.

00:05:46.021 --> 00:05:47.751
So, we had a string of wins to begin with

00:05:47.751 --> 00:05:50.731
but now we're getting
a strong of non-wins.

00:05:50.731 --> 00:05:51.710
Alright.

00:05:51.710 --> 00:05:54.460
Now, let's go to experiment nine.

00:05:55.848 --> 00:05:58.776
So, we get a six in our first roll,

00:05:58.776 --> 00:06:01.439
we get a four in our second roll

00:06:01.439 --> 00:06:03.872
and then these are all invalid,

00:06:03.872 --> 00:06:07.170
and then we got a five in our third roll.

00:06:07.170 --> 00:06:08.277
Did we win here?

00:06:08.277 --> 00:06:10.033
Yes, we won over here.

00:06:10.033 --> 00:06:12.605
This is definitely going
to be greater than 10,

00:06:12.605 --> 00:06:14.017
this is 15 here.

00:06:14.017 --> 00:06:16.290
Alright, last experiment

00:06:16.290 --> 00:06:18.081
or at least for this
video, last experiment.

00:06:18.081 --> 00:06:19.244
You could keep going.

00:06:19.244 --> 00:06:20.898
In fact, I encourage you to after this

00:06:20.898 --> 00:06:23.348
and see if you can get a more accurate,

00:06:23.348 --> 00:06:26.578
a better approximation of
the theoretical probability

00:06:26.578 --> 00:06:28.865
of winning by doing more experiments

00:06:28.865 --> 00:06:31.598
to calculate an experimental probability.

00:06:31.598 --> 00:06:33.254
So, here experiment 10.

00:06:33.254 --> 00:06:35.337
First roll we get a five,

00:06:36.710 --> 00:06:39.441
second roll we get a two,

00:06:39.441 --> 00:06:42.547
this is invalid, invalid, invalid,

00:06:42.547 --> 00:06:44.582
then we get a six.

00:06:44.582 --> 00:06:46.499
Here we definitely won.

00:06:47.802 --> 00:06:50.969
So, with 10 trials, based on 10 trials

00:06:51.887 --> 00:06:53.255
or 10 experiments,

00:06:53.255 --> 00:06:57.074
what is our experimental
probability of winning this game?

00:06:57.074 --> 00:06:58.878
Well, out of the 10 experiments

00:06:58.878 --> 00:07:00.857
how many did we win?

00:07:00.857 --> 00:07:04.913
Well, it looks like we won
one, two, three, four, five.

00:07:04.913 --> 00:07:07.636
So, based on just these 10 experiments

00:07:07.636 --> 00:07:10.458
we got a pretty clean 50%.

00:07:10.458 --> 00:07:12.331
So, do you think the
theoretical probability

00:07:12.331 --> 00:07:14.364
is actually 50%?

00:07:14.364 --> 00:07:16.991
Maybe you'd want to continue
running these experiments

00:07:16.991 --> 00:07:17.824
over and over.

00:07:17.824 --> 00:07:19.725
Maybe we'd want to do a computer program

00:07:19.725 --> 00:07:21.869
that could run this experiment
instead of 10 times,

00:07:21.869 --> 00:07:23.697
maybe 10,000 times

00:07:23.697 --> 00:07:25.054
to see if we can get closer

00:07:25.054 --> 00:07:28.054
to the true theoretical probability.


Random number list to run experiment

WEBVTT
Kind: captions
Language: en

00:00:00.048 --> 00:00:00.955
- [Instructor] So we're told

00:00:00.955 --> 00:00:04.609
that Amanda Young wants
to win some prizes.

00:00:04.609 --> 00:00:07.465
A cereal company is giving away a prize

00:00:07.465 --> 00:00:11.238
in each box of cereal, and they advertise,

00:00:11.238 --> 00:00:13.830
"Collect all six prizes."

00:00:13.830 --> 00:00:16.745
Each box of cereal has one prize,

00:00:16.745 --> 00:00:19.622
and each prize is a
equally likely to appear

00:00:19.622 --> 00:00:21.791
in any given box.

00:00:21.791 --> 00:00:24.469
Amanda wonders how many boxes it takes

00:00:24.469 --> 00:00:27.219
on average to get all six prizes.

00:00:28.769 --> 00:00:32.460
So there's several ways to
approach this for Amanda.

00:00:32.460 --> 00:00:35.267
She could try to figure out a
mathematical way to determine

00:00:35.267 --> 00:00:36.714
what is the expected number

00:00:36.714 --> 00:00:38.752
of boxes she would need to collect

00:00:38.752 --> 00:00:41.734
on average to get all six prizes,

00:00:41.734 --> 00:00:44.808
or she could run some random numbers

00:00:44.808 --> 00:00:48.990
to simulate collecting box
after box after box and

00:00:48.990 --> 00:00:52.533
figure out multiple trials on
how many boxes does it take

00:00:52.533 --> 00:00:54.651
to win all six prizes.

00:00:54.651 --> 00:00:57.262
So for example, she could say, "All right,

00:00:57.262 --> 00:01:00.790
each box is gonna have one of six prizes,"

00:01:00.790 --> 00:01:02.097
so there could be...

00:01:02.097 --> 00:01:04.753
She could assign a number
for each of the prizes,

00:01:04.753 --> 00:01:07.503
one, two, three, four, five, six,

00:01:08.819 --> 00:01:12.082
and then she could have a
computer generate a random string

00:01:12.082 --> 00:01:16.684
of numbers, maybe something
that looks like this,

00:01:16.684 --> 00:01:19.561
and the general method, she
could start at the left here,

00:01:19.561 --> 00:01:22.449
and each new number she gets she can say,

00:01:22.449 --> 00:01:24.847
"Hey, this is like getting a cereal box,

00:01:24.847 --> 00:01:27.849
and then it's going to
tell me which prize I got."

00:01:27.849 --> 00:01:30.375
So she starts her first experiment.

00:01:30.375 --> 00:01:32.476
She'll start here at the
left, and she'll say,

00:01:32.476 --> 00:01:35.128
"Okay, the first cereal
box of this experiment

00:01:35.128 --> 00:01:38.992
of this simulation I
got prize number one,"

00:01:38.992 --> 00:01:40.045
and she'll keep going.

00:01:40.045 --> 00:01:42.210
The next one, she gets prize number five.

00:01:42.210 --> 00:01:44.252
Then the third one, she
gets prize number six.

00:01:44.252 --> 00:01:46.909
Then the fourth one, she
gets prize number six again,

00:01:46.909 --> 00:01:50.780
and she will keep going until
she gets all six prizes.

00:01:50.780 --> 00:01:51.615
You might say, "Well, look.

00:01:51.615 --> 00:01:54.709
There are numbers here that
aren't one through six."

00:01:54.709 --> 00:01:55.582
There's zero.

00:01:55.582 --> 00:01:56.415
There's seven.

00:01:56.415 --> 00:01:57.847
There's eight or nine.

00:01:57.847 --> 00:02:00.459
Well, for those numbers,
she could just ignore them.

00:02:00.459 --> 00:02:03.501
She could just pretend
like they aren't there and

00:02:03.501 --> 00:02:06.091
just keep going past them.

00:02:06.091 --> 00:02:08.224
So why don't you pause
this video and do it

00:02:08.224 --> 00:02:10.030
for the first experiment.

00:02:10.030 --> 00:02:12.591
On this first experiment,
using these numbers,

00:02:12.591 --> 00:02:15.264
assuming that this is the
first box that you are getting

00:02:15.264 --> 00:02:18.612
in your simulation, how
many boxes would you need

00:02:18.612 --> 00:02:21.929
in order to get all six prizes?

00:02:21.929 --> 00:02:24.413
So let me make a table here.

00:02:24.413 --> 00:02:26.580
So this is the experiment,

00:02:28.421 --> 00:02:30.595
and then in the second column,

00:02:30.595 --> 00:02:33.170
I'm gonna say number of boxes,

00:02:33.170 --> 00:02:37.337
number of boxes you would have
to get in that simulation.

00:02:38.454 --> 00:02:42.158
So maybe I'll do the first
one in this blue color.

00:02:42.158 --> 00:02:45.274
So we're in the first
simulation, so one box,

00:02:45.274 --> 00:02:46.532
we got the one.

00:02:46.532 --> 00:02:48.163
Actually, maybe I'll check things off,

00:02:48.163 --> 00:02:52.863
so we have to get a one,
a two, a three, a four,

00:02:52.863 --> 00:02:55.181
a five, and a six.

00:02:55.181 --> 00:02:56.390
So let's see.

00:02:56.390 --> 00:02:57.907
We have a one.

00:02:57.907 --> 00:02:59.585
I'll check that off.

00:02:59.585 --> 00:03:01.524
We have a five.

00:03:01.524 --> 00:03:03.167
I'll check that off.

00:03:03.167 --> 00:03:04.250
We get a six.

00:03:05.098 --> 00:03:06.981
I'll check that off.

00:03:06.981 --> 00:03:08.798
Well, the next box we got another six.

00:03:08.798 --> 00:03:09.978
We've already had that prize,

00:03:09.978 --> 00:03:11.986
but we're gonna keep getting boxes.

00:03:11.986 --> 00:03:14.653
Then the next box, we get a two.

00:03:15.896 --> 00:03:18.646
Then the next box, we get a four.

00:03:19.709 --> 00:03:22.207
Then the next box, the number is a seven,

00:03:22.207 --> 00:03:25.464
so we will just ignore
this right over here.

00:03:25.464 --> 00:03:27.609
The box after that, we get a six,

00:03:27.609 --> 00:03:29.774
but we already have that prize.

00:03:29.774 --> 00:03:31.714
Then we ignore the next box, zero.

00:03:31.714 --> 00:03:33.515
That doesn't give us a prize.

00:03:33.515 --> 00:03:36.187
We assume that that didn't even happen,

00:03:36.187 --> 00:03:38.098
and then we would go to the number three,

00:03:38.098 --> 00:03:41.067
which is the last prize that we need.

00:03:41.067 --> 00:03:44.344
So how many boxes did
we have to go through?

00:03:44.344 --> 00:03:46.620
Well, we would only count the valid ones,

00:03:46.620 --> 00:03:49.113
the ones that gave a valid prize

00:03:49.113 --> 00:03:52.680
between the numbers one through
six, including one and six.

00:03:52.680 --> 00:03:53.513
So let's see.

00:03:53.513 --> 00:03:57.680
We went through one, two,
three, four, five, six, seven,

00:03:59.409 --> 00:04:01.843
eight boxes in the first experiment,

00:04:01.843 --> 00:04:03.304
so experiment number one,

00:04:03.304 --> 00:04:07.220
it took us eight boxes
to get all six prizes.

00:04:07.220 --> 00:04:09.881
Let's do another experiment
'cause this doesn't tell us

00:04:09.881 --> 00:04:12.449
that on average she
would expect eight boxes.

00:04:12.449 --> 00:04:13.282
This just meant that

00:04:13.282 --> 00:04:15.594
on this first experiment
it took eight boxes.

00:04:15.594 --> 00:04:17.290
If you wanted to figure out on average,

00:04:17.290 --> 00:04:19.457
you want to do many experiments,

00:04:19.457 --> 00:04:21.437
and the more experiments you do,

00:04:21.437 --> 00:04:24.255
the better that that
average is going to...

00:04:24.255 --> 00:04:26.702
The more likely that your
average is going to predict

00:04:26.702 --> 00:04:30.155
what it actually takes on
average to get all six prizes.

00:04:30.155 --> 00:04:33.108
So now let's do our second
experiment, and remember,

00:04:33.108 --> 00:04:36.053
it's important that these
are truly random numbers,

00:04:36.053 --> 00:04:40.676
and so we will now start
at the first valid number.

00:04:40.676 --> 00:04:45.260
So we have a two, so this
is our second experiment,

00:04:45.260 --> 00:04:46.943
and we got a two.

00:04:46.943 --> 00:04:48.026
We got a one.

00:04:49.034 --> 00:04:50.951
We can ignore this eight.

00:04:50.951 --> 00:04:52.007
Then we get a two again.

00:04:52.007 --> 00:04:53.791
We've already had that prize.

00:04:53.791 --> 00:04:55.213
Ignore the nine.

00:04:55.213 --> 00:04:58.806
Five, that's a prize we
need in this experiment.

00:04:58.806 --> 00:05:01.191
Nine, we can ignore,

00:05:01.191 --> 00:05:04.022
and then four, haven't
gotten that prize yet

00:05:04.022 --> 00:05:05.909
in this experiment.

00:05:05.909 --> 00:05:09.339
Three, haven't gotten that
prize yet in this experiment.

00:05:09.339 --> 00:05:11.327
One, we already got that prize.

00:05:11.327 --> 00:05:13.334
Three, we already got that prize.

00:05:13.334 --> 00:05:14.792
Three, already got that prize.

00:05:14.792 --> 00:05:17.276
Two, two, already got those prizes.

00:05:17.276 --> 00:05:18.515
Zero.

00:05:18.515 --> 00:05:21.733
We already got all of
these prizes over here.

00:05:21.733 --> 00:05:22.967
We can ignore the zero.

00:05:22.967 --> 00:05:24.038
Already got that prize,

00:05:24.038 --> 00:05:27.690
and finally, we get prize number six.

00:05:27.690 --> 00:05:32.110
So how many boxes did we need
in that second experiment?

00:05:32.110 --> 00:05:32.943
Well, let's see.

00:05:32.943 --> 00:05:36.276
One, two, three, four, five, six, seven,

00:05:37.856 --> 00:05:40.189
eight, nine, 10, 11, 12, 13,

00:05:41.874 --> 00:05:43.624
14, 15, 16, 17 boxes,

00:05:47.123 --> 00:05:51.290
so in experiment 2, I needed
17, or Amanda, needed 17 boxes,

00:05:53.420 --> 00:05:55.014
and she can keep going.

00:05:55.014 --> 00:05:56.631
Let's do this one more time.

00:05:56.631 --> 00:05:59.255
This is strangely fun.

00:05:59.255 --> 00:06:01.811
So experiment three, and remember,

00:06:01.811 --> 00:06:03.721
we only want to look at the valid numbers.

00:06:03.721 --> 00:06:05.474
We'll ignore the invalid numbers,

00:06:05.474 --> 00:06:08.184
the ones that don't give
us a valid prize number.

00:06:08.184 --> 00:06:10.434
So four, we get that prize.

00:06:11.579 --> 00:06:13.220
These are all invalid, in fact,

00:06:13.220 --> 00:06:15.372
and then we go to five.

00:06:15.372 --> 00:06:17.047
We get that prize.

00:06:17.047 --> 00:06:18.738
Five, we already have it.

00:06:18.738 --> 00:06:20.637
We get the two prize.

00:06:20.637 --> 00:06:22.161
Seven and eight are invalid.

00:06:22.161 --> 00:06:23.526
Seven's invalid.

00:06:23.526 --> 00:06:25.812
Six, we get that prize.

00:06:25.812 --> 00:06:27.537
Seven's invalid.

00:06:27.537 --> 00:06:29.735
One, we got that prize.

00:06:29.735 --> 00:06:31.441
One, we already got it.

00:06:31.441 --> 00:06:33.098
Nine's invalid.

00:06:33.098 --> 00:06:34.473
Two, we already got it.

00:06:34.473 --> 00:06:36.414
Nine is invalid.

00:06:36.414 --> 00:06:38.921
One, we already got the one prize,

00:06:38.921 --> 00:06:41.404
and then finally, we
get prize number three,

00:06:41.404 --> 00:06:43.117
which was the missing prize.

00:06:43.117 --> 00:06:47.608
So how many boxes, valid boxes,
did we have to go through?

00:06:47.608 --> 00:06:48.441
Let's see.

00:06:48.441 --> 00:06:51.191
One, two, three, four, five, six,

00:06:52.303 --> 00:06:54.220
seven, eight, nine, 10.

00:06:56.855 --> 00:07:01.159
10, so with only three
experiments, what was our average?

00:07:01.159 --> 00:07:02.418
Well, with these three experiments,

00:07:02.418 --> 00:07:06.585
our average is going to be eight
plus 17 plus 10 over three,

00:07:07.738 --> 00:07:08.571
so let's see.

00:07:08.571 --> 00:07:10.738
This is 25, 35 over three,

00:07:11.883 --> 00:07:14.883
which is equal to 11 2/3.

00:07:16.421 --> 00:07:17.254
Now, do we know

00:07:17.254 --> 00:07:20.223
that this is the true theoretical
expected number of boxes

00:07:20.223 --> 00:07:21.452
that you would need to get?

00:07:21.452 --> 00:07:24.458
No, we don't know that, but
the more experiments we run,

00:07:24.458 --> 00:07:26.717
the closer our averages likely get

00:07:26.717 --> 00:07:29.384
to the true theoretical average.


Experimental versus theoretical probability simulation

WEBVTT
Kind: captions
Language: en

00:00:00.570 --> 00:00:03.140
- [Instructor] What we're
going to do in this video

00:00:03.140 --> 00:00:06.835
is explore how experimental
probability should get

00:00:06.835 --> 00:00:09.981
closer and closer to
theoretical probability

00:00:09.981 --> 00:00:13.063
as we conduct more and more experiments

00:00:13.063 --> 00:00:15.687
or as we conduct more and more trials.

00:00:15.687 --> 00:00:19.238
This is often referred to
as The Law of Large Numbers.

00:00:19.238 --> 00:00:22.842
If we only have a few
experiments, it's very possible

00:00:22.842 --> 00:00:25.288
that our experimental probability could be

00:00:25.288 --> 00:00:27.462
different than our theoretical probability

00:00:27.462 --> 00:00:29.209
or even very different.

00:00:29.209 --> 00:00:32.545
But as we have many many
more experiments, thousands,

00:00:32.545 --> 00:00:36.125
millions, billions of
experiments, the probability

00:00:36.125 --> 00:00:39.404
that the experimental and
the theoretical probabilities

00:00:39.404 --> 00:00:42.662
are very different,
goes down dramatically.

00:00:42.662 --> 00:00:44.877
But let's get an intuitive sense for it.

00:00:44.877 --> 00:00:47.154
This right over here is a simulation

00:00:47.154 --> 00:00:49.184
created by Macmillan USA.

00:00:49.184 --> 00:00:52.434
I'll provide the link as an annotation.

00:00:53.705 --> 00:00:55.915
And what it does is it
allows us to simulate

00:00:55.915 --> 00:00:58.150
many coin flips and figure out

00:00:58.150 --> 00:01:00.557
the proportion that are heads.

00:01:00.557 --> 00:01:02.721
So right over here, we can
decide if we want our coin

00:01:02.721 --> 00:01:03.556
to be fair or not.

00:01:03.556 --> 00:01:05.072
Right now, it says that we have a

00:01:05.072 --> 00:01:07.372
50% probability of getting heads.

00:01:07.372 --> 00:01:09.455
We can make it unfair by changing this

00:01:09.455 --> 00:01:11.915
but I'll stick with the 50% probability.

00:01:11.915 --> 00:01:14.301
If we wanna show that on this graph here,

00:01:14.301 --> 00:01:16.224
we can plot it.

00:01:16.224 --> 00:01:17.982
And what this says is at a time,

00:01:17.982 --> 00:01:20.159
how many tosses do we wanna take.

00:01:20.159 --> 00:01:22.768
So let's say, let's just
start with 10 tosses.

00:01:22.768 --> 00:01:26.512
So what this is going to
do is take 10 simulated

00:01:26.512 --> 00:01:28.437
flips of coins with each one having

00:01:28.437 --> 00:01:30.725
a 50% chance of being heads.

00:01:30.725 --> 00:01:32.700
And then as we flip, we're gonna see

00:01:32.700 --> 00:01:34.760
our total proportion that are heads.

00:01:34.760 --> 00:01:37.357
So let's just talk through this together.

00:01:37.357 --> 00:01:39.270
So starting to toss.

00:01:39.270 --> 00:01:43.478
And so what's going on
here after 10 flips?

00:01:43.478 --> 00:01:46.961
So as you see, the first
flip actually came out heads

00:01:46.961 --> 00:01:48.342
and if you wanted to, say what's your

00:01:48.342 --> 00:01:50.753
experimental probability
after that one flip,

00:01:50.753 --> 00:01:52.623
you'd say well, with only one experiment,

00:01:52.623 --> 00:01:56.382
I got one heads so it
looks like 100% were heads.

00:01:56.382 --> 00:01:59.170
But in the second flip, it
looks like it was a tails.

00:01:59.170 --> 00:02:01.203
Because now the proportion that was heads

00:02:01.203 --> 00:02:04.358
after two flips was 50%.

00:02:04.358 --> 00:02:07.062
But then the third flip, it
looks like it was tails again

00:02:07.062 --> 00:02:11.257
because now only one out of
three or 33% of the flips

00:02:11.257 --> 00:02:12.931
have resulted in heads.

00:02:12.931 --> 00:02:15.345
Now by the fourth flip,
we got a heads again,

00:02:15.345 --> 00:02:17.649
getting us back to 50th percentile.

00:02:17.649 --> 00:02:21.299
Now the fifth flip, it looks
like we got another heads

00:02:21.299 --> 00:02:25.796
and so now have three out
of five or 60% being heads.

00:02:25.796 --> 00:02:28.270
And so, the general takeaway
here is when you have

00:02:28.270 --> 00:02:31.972
one, two, three, four,
five, or six experiments,

00:02:31.972 --> 00:02:35.886
it's completely plausible that
your experimental proportion,

00:02:35.886 --> 00:02:38.256
your experimental probability diverges

00:02:38.256 --> 00:02:40.089
from the real probability.

00:02:40.089 --> 00:02:43.359
And this even continues
all the way until we get to

00:02:43.359 --> 00:02:45.240
our ninth or tenth tosses.

00:02:45.240 --> 00:02:48.131
But what happens if we do way more tosses.

00:02:48.131 --> 00:02:50.134
So now I'm gonna do another,

00:02:50.134 --> 00:02:53.687
well let's just do another 200
tosses and see what happens.

00:02:53.687 --> 00:02:56.313
So I'm just gonna keep tossing here

00:02:56.313 --> 00:02:59.263
and you can see, wow look
at this, there is a big run

00:02:59.263 --> 00:03:02.431
getting a lot of heads right over here,

00:03:02.431 --> 00:03:03.826
and then it looks like
there's actually a run of

00:03:03.826 --> 00:03:05.530
getting a bunch of tails right over here,

00:03:05.530 --> 00:03:07.797
then a little run of heads, tails,

00:03:07.797 --> 00:03:09.498
and then another run of heads and notice,

00:03:09.498 --> 00:03:13.829
even after 215 tosses, our
experimental probability

00:03:13.829 --> 00:03:16.913
has still, is still reasonably different

00:03:16.913 --> 00:03:18.735
than our theoretical probability.

00:03:18.735 --> 00:03:20.917
So let's do another 200 and see

00:03:20.917 --> 00:03:23.834
if we can converge these over time.

00:03:24.784 --> 00:03:27.102
And what we're seeing in real-time here

00:03:27.102 --> 00:03:29.466
should be The Law of Large Numbers.

00:03:29.466 --> 00:03:32.675
As our number of tosses get
larger and larger and larger,

00:03:32.675 --> 00:03:36.059
the probability that these
two are very different

00:03:36.059 --> 00:03:38.328
goes down and down and down.

00:03:38.328 --> 00:03:41.209
Yes, you will get moments
where you could even get

00:03:41.209 --> 00:03:44.174
10 heads in a row or
even 20 heads in a row,

00:03:44.174 --> 00:03:46.435
but over time, those will
be balanced by the times

00:03:46.435 --> 00:03:49.033
where you're getting
disproportionate number of tails.

00:03:49.033 --> 00:03:50.773
So I'm just gonna keep going, we're now at

00:03:50.773 --> 00:03:52.595
almost 800 tosses.

00:03:52.595 --> 00:03:55.428
And you see now we are converging.

00:03:56.373 --> 00:04:00.171
Now this is, we're gonna
cross 1,000 tosses soon.

00:04:00.171 --> 00:04:04.338
And you can see that our
proportion here is now 51%,

00:04:05.183 --> 00:04:09.485
it's getting close now, we're at 50.6%.

00:04:09.485 --> 00:04:11.719
And I could just keep
tossing, this is 1100,

00:04:11.719 --> 00:04:15.252
we're gonna approach 1200 or
1300 flips right over here.

00:04:15.252 --> 00:04:17.743
But as you can see, as we get
many many many more flips,

00:04:17.743 --> 00:04:20.582
it was actually valuable to
see even after 200 flips,

00:04:20.582 --> 00:04:22.606
that there was a difference
in the proportion

00:04:22.606 --> 00:04:24.455
between what we got from the experiment,

00:04:24.455 --> 00:04:26.763
and what you would theoretically expect.

00:04:26.763 --> 00:04:28.611
But as we get to many many more flips,

00:04:28.611 --> 00:04:32.004
now we're at 1,210, we're
getting pretty close

00:04:32.004 --> 00:04:34.318
to 50% of them turning out heads.

00:04:34.318 --> 00:04:38.326
But we could keep tossing
it more and more and more

00:04:38.326 --> 00:04:39.976
and what we'll see is, as we get

00:04:39.976 --> 00:04:42.228
larger and larger and larger, it is likely

00:04:42.228 --> 00:04:44.421
that we're gonna get closer
and closer and closer

00:04:44.421 --> 00:04:45.655
to 50%.

00:04:45.655 --> 00:04:49.008
It's not to say that it's
impossible that we diverge again,

00:04:49.008 --> 00:04:51.903
but the likelihood of
diverging gets lower and lower

00:04:51.903 --> 00:04:55.841
and lower the more tosses,
the more experiments you make.


Impact of removing outliers on regression lines

WEBVTT
Kind: captions
Language: en

00:00:00.475 --> 00:00:02.783
- [Instructor] The scatterplot
below displays a set of

00:00:02.783 --> 00:00:07.292
bivariate data along with its
least-squares regression line.

00:00:07.292 --> 00:00:10.844
Consider removing the
outlier 95 comma one.

00:00:10.844 --> 00:00:14.249
So 95 comma one, we're
talking about that outlier

00:00:14.249 --> 00:00:15.082
right over there.

00:00:15.082 --> 00:00:19.182
And calculating a new
least-squares regression line.

00:00:19.182 --> 00:00:22.376
What effects would
removing the outlier have?

00:00:22.376 --> 00:00:24.899
Choose all answers that apply.

00:00:24.899 --> 00:00:26.326
Like always, pause this video

00:00:26.326 --> 00:00:29.168
and see if you could figure it out.

00:00:29.168 --> 00:00:32.091
Well let's see, even
with this outlier here,

00:00:32.091 --> 00:00:35.591
we have an upward sloping regression line.

00:00:36.464 --> 00:00:40.599
And so, it looks like our r already

00:00:40.599 --> 00:00:43.736
is going to be greater than zero.

00:00:43.736 --> 00:00:46.240
And of course, it's going
to be less than one.

00:00:46.240 --> 00:00:50.810
So our r is going to be greater
than zero and less than one.

00:00:50.810 --> 00:00:53.725
We know it's not going to
be equal one because then

00:00:53.725 --> 00:00:56.494
we would go perfectly
through all of the dots

00:00:56.494 --> 00:00:59.444
and it's clear that this
point right over here

00:00:59.444 --> 00:01:01.449
is indeed an outlier.

00:01:01.449 --> 00:01:05.405
The residual between this point
and the line is quite high.

00:01:05.405 --> 00:01:08.373
We have a pretty big
distance right over here.

00:01:08.373 --> 00:01:10.866
It would be a negative residual and so,

00:01:10.866 --> 00:01:14.789
this point is definitely
bringing down the r

00:01:14.789 --> 00:01:18.132
and it's definitely
bringing down the slope

00:01:18.132 --> 00:01:19.504
of the regression line.

00:01:19.504 --> 00:01:22.274
If we were to remove this
point, we're more likely

00:01:22.274 --> 00:01:26.297
to have a line that looks
something like this,

00:01:26.297 --> 00:01:29.399
in which case, it looks
like we would get a much,

00:01:29.399 --> 00:01:31.694
a much much much better fit.

00:01:31.694 --> 00:01:33.347
The only reason why the
line isn't doing that

00:01:33.347 --> 00:01:36.853
is it's trying to get close
to this point right over here.

00:01:36.853 --> 00:01:41.116
So if we remove this outlier,
our r would increase.

00:01:41.116 --> 00:01:45.181
So, r would increase

00:01:45.181 --> 00:01:48.110
and also the slope of
our line would increase.

00:01:48.110 --> 00:01:50.425
And slope would increase.

00:01:50.425 --> 00:01:54.750
We'd have a better fit to this
positively correlated data

00:01:54.750 --> 00:01:57.443
and we would no longer
have this point dragging

00:01:57.443 --> 00:01:59.602
the slope down anymore.

00:01:59.602 --> 00:02:01.650
So let's see which choices apply.

00:02:01.650 --> 00:02:05.496
The coefficient of determination
r squared would increase.

00:02:05.496 --> 00:02:08.465
Well if r would increase,
then squaring that value

00:02:08.465 --> 00:02:09.669
would increase as well.

00:02:09.669 --> 00:02:11.833
So I will circle that.

00:02:11.833 --> 00:02:14.686
The coefficient, the
correlation coefficient r

00:02:14.686 --> 00:02:16.532
would get close to zero.

00:02:16.532 --> 00:02:18.811
No, in fact, it would get closer to one

00:02:18.811 --> 00:02:22.008
because we would have a better fit here.

00:02:22.008 --> 00:02:24.303
And so, I will rule that out.

00:02:24.303 --> 00:02:26.613
The slope of the
least-squares regression line

00:02:26.613 --> 00:02:27.937
would increase.

00:02:27.937 --> 00:02:28.966
Yes, indeed.

00:02:28.966 --> 00:02:31.661
This point, this
outlier's pulling it down.

00:02:31.661 --> 00:02:34.603
If you take it out, it'll
allow the slope to increase.

00:02:34.603 --> 00:02:36.941
So I will circle that as well.

00:02:36.941 --> 00:02:38.752
Let's do another example.

00:02:38.752 --> 00:02:41.586
The scatterplot below displays
a set of bivariate data

00:02:41.586 --> 00:02:44.131
along with its least-squares
regression line.

00:02:44.131 --> 00:02:45.275
Same idea.

00:02:45.275 --> 00:02:48.886
Consider removing the outlier
ten comma negative 18,

00:02:48.886 --> 00:02:50.518
so we're talking about that point there,

00:02:50.518 --> 00:02:53.636
and calculating a new
least-squares regression line.

00:02:53.636 --> 00:02:55.328
So what would happen this time?

00:02:55.328 --> 00:02:58.210
So as is without removing this outlier,

00:02:58.210 --> 00:03:01.590
we have a negative slope
for the regression line,

00:03:01.590 --> 00:03:04.946
so we're dealing with a negative r.

00:03:04.946 --> 00:03:08.573
So we already know that
negative one is less than r

00:03:08.573 --> 00:03:12.777
which is less than zero without
even removing the outlier.

00:03:12.777 --> 00:03:14.149
We know it's not going to be negative one.

00:03:14.149 --> 00:03:16.944
If it was negative, if r
was exactly negative one,

00:03:16.944 --> 00:03:18.667
then it would be in downward-sloping line

00:03:18.667 --> 00:03:21.763
that went exactly through
all of the points.

00:03:21.763 --> 00:03:25.020
But if we remove this point,
what's going to happen?

00:03:25.020 --> 00:03:27.658
Well, this least-squares
regression is being

00:03:27.658 --> 00:03:30.096
pulled down here by this outlier.

00:03:30.096 --> 00:03:32.006
So if you remove this point,

00:03:32.006 --> 00:03:34.660
the least-squares regression
line could move up

00:03:34.660 --> 00:03:37.088
on the left-hand side
and so you'll probably

00:03:37.088 --> 00:03:40.027
have a line that looks more like that.

00:03:40.027 --> 00:03:42.032
And I'm just hand drawing it.

00:03:42.032 --> 00:03:44.927
But even what I hand drew
looks like a better fit

00:03:44.927 --> 00:03:47.491
for the leftover points.

00:03:47.491 --> 00:03:50.776
And so, clearly the new line
that I drew after removing

00:03:50.776 --> 00:03:54.647
the outlier, this has
a more negative slope.

00:03:54.647 --> 00:03:59.293
So removing the outlier would decrease r,

00:03:59.293 --> 00:04:01.832
r would get closer to
negative one, it would be

00:04:01.832 --> 00:04:05.519
closer to being a perfect
negative correlation.

00:04:05.519 --> 00:04:09.429
And also, it would decrease the slope.

00:04:09.429 --> 00:04:11.525
Decrease the slope.

00:04:11.525 --> 00:04:13.196
Which choices match that?

00:04:13.196 --> 00:04:18.085
The coefficient of determination
r squared would decrease.

00:04:18.085 --> 00:04:19.492
So let's be very careful.

00:04:19.492 --> 00:04:21.851
R was already negative.

00:04:21.851 --> 00:04:25.561
If we decrease it, it's going
to become more negative.

00:04:25.561 --> 00:04:28.523
If you square something
that is more negative,

00:04:28.523 --> 00:04:30.161
it's not going to become smaller.

00:04:30.161 --> 00:04:32.880
Let's say before you
remove the data point,

00:04:32.880 --> 00:04:36.558
r was, I'm just gonna make up a value,

00:04:36.558 --> 00:04:40.445
let's say it was negative
0.4, and then after

00:04:40.445 --> 00:04:43.689
removing the outlier,
r becomes more negative

00:04:43.689 --> 00:04:47.146
and it's going to be
equal to negative 0.5.

00:04:47.146 --> 00:04:49.513
We'll if you square this, this would be

00:04:49.513 --> 00:04:52.205
positive 0.16 while this would be

00:04:52.205 --> 00:04:54.844
positive 0.25.

00:04:54.844 --> 00:04:56.422
So if r is already negative and if you

00:04:56.422 --> 00:05:00.072
make it more negative, it
would not decrease r squared,

00:05:00.072 --> 00:05:02.366
it actually would increase r squared.

00:05:02.366 --> 00:05:04.843
So I will rule this one out.

00:05:04.843 --> 00:05:07.025
The slope of the
least-squares regression line

00:05:07.025 --> 00:05:07.913
would increase.

00:05:07.913 --> 00:05:09.907
No, it's going to decrease.

00:05:09.907 --> 00:05:12.436
It's going to be a stronger
negative correlation.

00:05:12.436 --> 00:05:13.819
Rule that one out.

00:05:13.819 --> 00:05:16.415
The y-intercept of the
least-squares regression line

00:05:16.415 --> 00:05:17.623
would increase.

00:05:17.623 --> 00:05:20.355
Yes, by getting rid of this outlier,

00:05:20.355 --> 00:05:22.698
you could think of it as
the left side of this line

00:05:22.698 --> 00:05:24.211
is going to increase.

00:05:24.211 --> 00:05:25.759
Or another way to think about it,

00:05:25.759 --> 00:05:29.160
the slope of this line
is going to decrease,

00:05:29.160 --> 00:05:30.685
it's going to become more negative.

00:05:30.685 --> 00:05:32.409
We know that the
least-squares regression line

00:05:32.409 --> 00:05:35.995
will always go through the
mean of both variables.

00:05:35.995 --> 00:05:38.602
So we're just gonna pivot around
the mean of both variables

00:05:38.602 --> 00:05:41.841
which would mean that the
y-intercept will go higher.

00:05:41.841 --> 00:05:43.758
So I will fill that in.