WEBVTT

00:00:00.990 --> 00:00:04.200
We will now go through another
example to consolidate our

00:00:04.200 --> 00:00:07.580
intuition about the content
of the law of iterated

00:00:07.580 --> 00:00:10.710
expectations and the law
of the total variance.

00:00:10.710 --> 00:00:12.760
The example is as follows.

00:00:12.760 --> 00:00:16.250
We have a class, and that class
consists of 30 students

00:00:16.250 --> 00:00:19.650
in total who are divided
into sections--

00:00:19.650 --> 00:00:22.490
the first and the
second section.

00:00:22.490 --> 00:00:26.150
Let xi be the score of students
i, let's say the

00:00:26.150 --> 00:00:28.550
final grade in the class.

00:00:28.550 --> 00:00:31.900
We consider the following
probabilistic experiment.

00:00:31.900 --> 00:00:35.090
We pick a student at random,
uniformly, so that each

00:00:35.090 --> 00:00:37.620
student is equally likely
to be picked.

00:00:37.620 --> 00:00:39.720
And we define two random
variables--

00:00:39.720 --> 00:00:43.210
X is a numerical random variable
that gives us the

00:00:43.210 --> 00:00:45.180
score of the selected student.

00:00:45.180 --> 00:00:48.890
So if student i is selected,
the value of the random

00:00:48.890 --> 00:00:52.460
variable capital X is xi.

00:00:52.460 --> 00:00:57.350
And capital Y is defined as the
random variable, which is

00:00:57.350 --> 00:01:00.350
the section of the selected
student, so that y takes

00:01:00.350 --> 00:01:03.610
values 1 or 2.

00:01:03.610 --> 00:01:05.120
We're given some information.

00:01:05.120 --> 00:01:07.310
For the first section,
the average of the

00:01:07.310 --> 00:01:09.270
student scores is 90.

00:01:09.270 --> 00:01:11.150
For the second section,
the average of the

00:01:11.150 --> 00:01:14.000
student scores is 60.

00:01:14.000 --> 00:01:18.980
Given that information, what is
the expected value of the

00:01:18.980 --> 00:01:21.520
student score?

00:01:21.520 --> 00:01:25.520
Well, each student is equally
likely to be picked, so has

00:01:25.520 --> 00:01:28.450
probability 1 over
30 to be picked.

00:01:28.450 --> 00:01:33.630
And this multiplies the score of
the student, so this is the

00:01:33.630 --> 00:01:37.560
expected value of the random
variable of interest.

00:01:37.560 --> 00:01:38.860
What is this number?

00:01:38.860 --> 00:01:41.910
Well, we need to calculate
the sum of the xi's.

00:01:41.910 --> 00:01:48.600
The sum of the first 10 xi's is
equal to 90 times 10, and

00:01:48.600 --> 00:01:51.690
the sum of the xi's in
the other section is

00:01:51.690 --> 00:01:53.515
equal to 60 times 20.

00:01:56.590 --> 00:01:58.910
And we carry out the
calculation, and we find that

00:01:58.910 --> 00:02:01.050
the answer is 70.

00:02:01.050 --> 00:02:02.816
Now let us look at conditional
expectations.

00:02:05.700 --> 00:02:08.840
If Y is equal to 1, this means
that a student from section

00:02:08.840 --> 00:02:10.460
one was picked.

00:02:10.460 --> 00:02:14.920
And within that section, each
student is equally likely to

00:02:14.920 --> 00:02:18.200
be picked, so the outcome of
this random variable is

00:02:18.200 --> 00:02:20.850
equally likely to be any
one of these xi's.

00:02:20.850 --> 00:02:24.170
Each xi gets picked with
probability of 1 over 10.

00:02:24.170 --> 00:02:28.950
And so, the expected value of
this random variable is 90.

00:02:28.950 --> 00:02:32.990
Similarly for the second
section, the expected value of

00:02:32.990 --> 00:02:35.750
the score of a randomly selected
student, given that

00:02:35.750 --> 00:02:38.930
the student belongs in that
section, is equal to 60.

00:02:41.810 --> 00:02:45.200
With this information available,
now we can describe

00:02:45.200 --> 00:02:47.690
the abstract conditional
expectation,

00:02:47.690 --> 00:02:49.340
which is a random variable.

00:02:49.340 --> 00:02:54.410
This random variable takes the
value of 90 if a student from

00:02:54.410 --> 00:02:57.920
the first section was picked,
and the value of 60 if a

00:02:57.920 --> 00:03:00.350
student from the second
section was picked.

00:03:00.350 --> 00:03:03.360
What is the probability of this
event that the student

00:03:03.360 --> 00:03:05.310
from the first section
was picked?

00:03:05.310 --> 00:03:09.710
Given that the first section
has 10 out of a total of 30

00:03:09.710 --> 00:03:13.840
students, this probability is
1/3, and therefore, this

00:03:13.840 --> 00:03:16.210
probability is 2/3.

00:03:16.210 --> 00:03:18.610
Now that we have the
distribution of this random

00:03:18.610 --> 00:03:22.230
variable, we can calculate the
expected value of this random

00:03:22.230 --> 00:03:31.460
variable, which is 1/3 times
90 plus 2/3 times 60.

00:03:31.460 --> 00:03:36.800
And this number evaluates to 70,
which of course, it's no

00:03:36.800 --> 00:03:39.710
coincidence, it's the
same as the average

00:03:39.710 --> 00:03:41.320
over the entire class.

00:03:41.320 --> 00:03:43.980
By the law of iterated
expectations, we know that

00:03:43.980 --> 00:03:47.490
this quantity should be the
same as this quantity.

00:03:47.490 --> 00:03:50.550
So the law of iterated
expectations allows us to

00:03:50.550 --> 00:03:56.515
calculate the overall average in
the entire class by taking

00:03:56.515 --> 00:04:01.840
the section averages, and weigh
them according to the

00:04:01.840 --> 00:04:04.790
sizes of the different
sections.

00:04:04.790 --> 00:04:07.950
It's a divide and conquer
method, and it is similar to

00:04:07.950 --> 00:04:11.470
what we have been doing when we
use the total expectation

00:04:11.470 --> 00:04:14.210
theorem to divide and conquer.

00:04:14.210 --> 00:04:17.570
We continue with our example,
and here is a summary of what

00:04:17.570 --> 00:04:18.850
we found so far.

00:04:18.850 --> 00:04:21.649
The conditional expectation is
a random variable that takes

00:04:21.649 --> 00:04:24.630
these two values with certain
probabilities.

00:04:24.630 --> 00:04:28.790
And the mean of this random
variable is equal to 70.

00:04:28.790 --> 00:04:30.890
Let us now calculate
the variance

00:04:30.890 --> 00:04:32.740
of this random variable.

00:04:32.740 --> 00:04:37.430
This random variable, with
probability 1/3, takes a value

00:04:37.430 --> 00:04:43.210
90, which is this much away from
the mean of this random

00:04:43.210 --> 00:04:45.610
variable, which we square.

00:04:45.610 --> 00:04:51.050
And with probability 2/3, it
takes a value of 60, which is

00:04:51.050 --> 00:04:54.460
this much away from the mean
of the random variable.

00:04:54.460 --> 00:04:56.440
We square this, as well.

00:04:56.440 --> 00:04:59.330
And when we carry out the
calculation, we find that this

00:04:59.330 --> 00:05:02.580
number is equal to 200.

00:05:02.580 --> 00:05:03.850
Let us now continue.

00:05:03.850 --> 00:05:09.630
And suppose that somebody gave
us this piece of information.

00:05:09.630 --> 00:05:13.440
For the first section, this is
the deviation of the i-th

00:05:13.440 --> 00:05:16.800
student from the mean
of that section.

00:05:16.800 --> 00:05:20.380
So this is the sum of the
squares of the deviations and

00:05:20.380 --> 00:05:23.930
then we average over
all the students.

00:05:23.930 --> 00:05:28.460
We will use this data to
calculate certain quantities--

00:05:28.460 --> 00:05:31.080
for example, the variance
of the scores

00:05:31.080 --> 00:05:33.040
in the first section.

00:05:33.040 --> 00:05:37.409
Now in the first section, with
probability 1/10, we pick the

00:05:37.409 --> 00:05:39.720
ith student that
has this score.

00:05:39.720 --> 00:05:43.790
And this is the deviation of
that student from the mean of

00:05:43.790 --> 00:05:45.220
that section.

00:05:45.220 --> 00:05:52.000
So this is the same as the mean
squared deviation from

00:05:52.000 --> 00:05:55.090
the mean of the section.

00:05:55.090 --> 00:05:59.930
And this is exactly the variance
within that section.

00:05:59.930 --> 00:06:02.600
It is the variance of the random
variable, which is the

00:06:02.600 --> 00:06:07.630
score of a random student, given
that we are selecting a

00:06:07.630 --> 00:06:09.970
student from the
first section.

00:06:09.970 --> 00:06:12.050
For the second section,
the story similar.

00:06:12.050 --> 00:06:16.000
We're given this information,
and this tells us the variance

00:06:16.000 --> 00:06:20.040
of the student scores within
the second section.

00:06:20.040 --> 00:06:24.490
So now we can describe the
abstract conditional variance.

00:06:24.490 --> 00:06:28.840
It is a random variable that
takes this value with

00:06:28.840 --> 00:06:32.500
probability equal to the
probability of selecting

00:06:32.500 --> 00:06:35.790
someone from this section,
which is 1/3.

00:06:35.790 --> 00:06:40.860
Or it takes a value of 20, which
is the variance in the

00:06:40.860 --> 00:06:42.360
second section.

00:06:42.360 --> 00:06:46.940
And the second section is
selected with probability 2/3.

00:06:46.940 --> 00:06:49.680
With this information at hand,
now we can calculate the

00:06:49.680 --> 00:06:53.900
expected value of this random
variable, which is 1/3 times

00:06:53.900 --> 00:06:59.784
10 plus 2/3 times 20,
which is 50/3.

00:07:03.920 --> 00:07:08.600
At this point, we have the two
quantities that are necessary

00:07:08.600 --> 00:07:11.570
to apply the law of
total variance.

00:07:11.570 --> 00:07:14.750
According to the law of total
variance, the variance of the

00:07:14.750 --> 00:07:19.690
student scores throughout the
entire class is equal to this

00:07:19.690 --> 00:07:28.550
number, which is 50/3, plus
this number, which is 200.

00:07:28.550 --> 00:07:32.290
And this is the overall
variance.

00:07:32.290 --> 00:07:34.350
Now let us interpret
the law of total

00:07:34.350 --> 00:07:36.880
variance in this context.

00:07:36.880 --> 00:07:39.290
The interpretation
is as follows.

00:07:39.290 --> 00:07:43.159
The variance of the student
scores in the entire class

00:07:43.159 --> 00:07:46.900
consists of two pieces.

00:07:46.900 --> 00:07:53.400
The first piece looks at the
variance inside each section,

00:07:53.400 --> 00:07:56.180
which is 10 or 20, depending
on which section

00:07:56.180 --> 00:07:57.190
we're looking at.

00:07:57.190 --> 00:08:00.800
And we take the average over
the different sections.

00:08:00.800 --> 00:08:05.490
So we look at the variability of
the scores within a typical

00:08:05.490 --> 00:08:10.030
section, and then we average
over all the sections.

00:08:10.030 --> 00:08:15.190
The other term looks at the
means in the different

00:08:15.190 --> 00:08:20.880
sections, and figures out how
different are these means.

00:08:20.880 --> 00:08:26.280
How much do they vary from the
overall class average?

00:08:26.280 --> 00:08:30.310
It measures the variability
between different sections.

00:08:30.310 --> 00:08:34.570
So the overall randomness in the
test scores can be broken

00:08:34.570 --> 00:08:38.150
down into two pieces
of randomness.

00:08:38.150 --> 00:08:41.630
One source of randomness is that
the different sections

00:08:41.630 --> 00:08:43.690
have different means.

00:08:43.690 --> 00:08:47.680
The other source of randomness
is that inside each section,

00:08:47.680 --> 00:08:49.960
the students are different
from the

00:08:49.960 --> 00:08:52.060
means of their section.

00:08:52.060 --> 00:08:55.490
And these two pieces of
randomness together add up to

00:08:55.490 --> 00:08:59.460
the total randomness of the
student scores as measured by

00:08:59.460 --> 00:09:01.080
the variance of the
entire class.