WEBVTT

00:00:00.550 --> 00:00:03.440
We will now go through an
example, which is essentially

00:00:03.440 --> 00:00:06.290
a drill, to consolidate our
understanding of the

00:00:06.290 --> 00:00:09.890
conditional expectation and
the conditional variance.

00:00:09.890 --> 00:00:12.870
Consider a random variable X,
which is continuous and is

00:00:12.870 --> 00:00:16.079
described by a PDF
of this form.

00:00:16.079 --> 00:00:19.890
Whenever we have a PDF that
seems to consist of different

00:00:19.890 --> 00:00:23.930
pieces, it's always useful
to divide and conquer.

00:00:23.930 --> 00:00:26.490
And the way we will do that
will be to consider two

00:00:26.490 --> 00:00:27.610
different scenarios.

00:00:27.610 --> 00:00:29.940
That X falls in this range.

00:00:29.940 --> 00:00:32.910
And in that scenario, we say
that the certain random

00:00:32.910 --> 00:00:34.880
variable Y is equal to 1.

00:00:34.880 --> 00:00:38.450
And another scenario in which X
falls in this range, and in

00:00:38.450 --> 00:00:42.850
that case, we say that
Y is equal to 2.

00:00:42.850 --> 00:00:45.600
Let us now look at the
conditional expectation of X

00:00:45.600 --> 00:00:47.760
given Y. What is it?

00:00:47.760 --> 00:00:51.210
Well, it is a random variable
which can take a different

00:00:51.210 --> 00:00:53.960
values depending on what Y is.

00:00:53.960 --> 00:00:57.980
If Y happens to take
a value of 1, then

00:00:57.980 --> 00:00:59.560
we are in this range.

00:00:59.560 --> 00:01:03.380
And the conditional PDF of X,
given that Y falls in this

00:01:03.380 --> 00:01:06.270
range, keeps the same
shape, it's uniform.

00:01:06.270 --> 00:01:10.390
And so it's mean is going to
be equal to the midpoint of

00:01:10.390 --> 00:01:14.260
this interval, which is 1/2.

00:01:14.260 --> 00:01:18.320
And this is something that
happens when Y is equal to 1.

00:01:18.320 --> 00:01:20.340
What is the probability
of this happening?

00:01:20.340 --> 00:01:24.020
The probability that Y is equal
to 1 is the area under

00:01:24.020 --> 00:01:26.610
the PDF in this range.

00:01:26.610 --> 00:01:29.730
And since the height of
the PDF is 1/2, this

00:01:29.730 --> 00:01:31.260
probability is 1/2.

00:01:33.830 --> 00:01:37.180
The alternative scenario is
that Y happens to take the

00:01:37.180 --> 00:01:38.020
value of 2.

00:01:38.020 --> 00:01:41.650
In which case, X lives
in this interval.

00:01:41.650 --> 00:01:46.690
Given that X has fallen in this
interval, the conditional

00:01:46.690 --> 00:01:50.509
expectation of X is the midpoint
of this interval.

00:01:50.509 --> 00:01:56.229
And the midpoint of this
interval is at 2.

00:01:56.229 --> 00:01:59.170
And this is an event that,
again, happens with

00:01:59.170 --> 00:02:03.610
probability 1/2, because the
area under the PDF in this

00:02:03.610 --> 00:02:06.520
region is equal to 1/2.

00:02:06.520 --> 00:02:09.720
So the conditional expectation
is a random variable that

00:02:09.720 --> 00:02:12.730
takes these values with
these probabilities.

00:02:12.730 --> 00:02:16.060
Since we now have a complete
probabilistic description of

00:02:16.060 --> 00:02:19.250
this random variable, we're
able to calculate the

00:02:19.250 --> 00:02:21.250
expectation of this
random variable.

00:02:21.250 --> 00:02:22.230
What is it?

00:02:22.230 --> 00:02:25.840
With probability 1/2, the random
variable takes the

00:02:25.840 --> 00:02:27.610
value of 1/2.

00:02:27.610 --> 00:02:31.970
And with probability 1/2,
it takes a value of 2.

00:02:31.970 --> 00:02:34.500
And so the expected value
of the conditional

00:02:34.500 --> 00:02:37.840
expectation is 5/4.

00:02:37.840 --> 00:02:40.720
But the law of iterated
expectations tells us that

00:02:40.720 --> 00:02:45.620
this quantity is also the same
as the expected value of X. So

00:02:45.620 --> 00:02:48.730
we have managed to find the
expected value of X by the

00:02:48.730 --> 00:02:52.670
divide and conquer method, by
considering different cases.

00:02:52.670 --> 00:02:55.820
Let us now turn to the
conditional variance of X

00:02:55.820 --> 00:03:00.160
given Y. Once more, this
quantity is a random variable.

00:03:00.160 --> 00:03:03.370
The value of that quantity
depends on what Y

00:03:03.370 --> 00:03:04.780
turns out to be.

00:03:04.780 --> 00:03:06.930
And we have, again, the same
two possibilities.

00:03:06.930 --> 00:03:10.510
Y could be equal to 1, or
Y could be equal to 2.

00:03:10.510 --> 00:03:13.660
And these possibilities happen
with equal probabilities.

00:03:16.820 --> 00:03:20.850
If Y is equal to 1, conditional
on that event, X

00:03:20.850 --> 00:03:25.170
has a uniform PDF on this
range, on an interval of

00:03:25.170 --> 00:03:25.970
length one.

00:03:25.970 --> 00:03:29.550
And we know that the variance
of a uniform PDF on an

00:03:29.550 --> 00:03:32.440
interval of length
one is 1/12.

00:03:32.440 --> 00:03:37.380
If on the other hand, Y takes
a value of 2, then X is a

00:03:37.380 --> 00:03:42.030
uniform random variable on
an interval of length 2.

00:03:42.030 --> 00:03:47.790
And the variance in this case
is 2 squared, where this 2

00:03:47.790 --> 00:03:51.750
stands for the length of the
interval, divided by 12, which

00:03:51.750 --> 00:03:53.755
is the same as 4/12.

00:03:57.880 --> 00:04:01.210
So we now have a complete
probabilistic description of

00:04:01.210 --> 00:04:03.580
the conditional variance
as a random variable.

00:04:03.580 --> 00:04:06.890
It's a random variable that
with these probabilities,

00:04:06.890 --> 00:04:09.630
takes these two particular
values.

00:04:09.630 --> 00:04:12.570
Since we know the distribution
of this random variable, we

00:04:12.570 --> 00:04:15.640
can certainly calculate
its expected value.

00:04:15.640 --> 00:04:17.790
And the expected value
is found as follows.

00:04:17.790 --> 00:04:21.170
With probability 1/2, the random
variable of interest

00:04:21.170 --> 00:04:24.000
takes a value of 1/12.

00:04:24.000 --> 00:04:28.000
And with probability 1/2,
this random variable

00:04:28.000 --> 00:04:29.465
takes a value of 4/12.

00:04:32.690 --> 00:04:34.770
And this number happens
to be 5/24.

00:04:38.590 --> 00:04:42.130
Finally, let us calculate the
variance of the conditional

00:04:42.130 --> 00:04:43.480
expectation.

00:04:43.480 --> 00:04:45.790
Since we have complete
information about the

00:04:45.790 --> 00:04:48.340
distribution of the conditional
expectation,

00:04:48.340 --> 00:04:52.750
calculating its variance is
not going to be difficult.

00:04:52.750 --> 00:04:54.380
So what is it?

00:04:54.380 --> 00:04:59.780
With probability 1/2, the
conditional expectation takes

00:04:59.780 --> 00:05:02.380
a value of 1/2.

00:05:02.380 --> 00:05:05.990
We subtract from this is the
mean of the conditional

00:05:05.990 --> 00:05:09.600
expectation, which is 5/4.

00:05:09.600 --> 00:05:12.120
And we take the square
of that.

00:05:12.120 --> 00:05:18.360
So this term is the square or
the deviation of the value of

00:05:18.360 --> 00:05:21.730
the random variable of
1/2 from the mean

00:05:21.730 --> 00:05:23.610
of that random variable.

00:05:23.610 --> 00:05:25.900
And we get a similar term.

00:05:25.900 --> 00:05:29.540
If Y happens to be equal to 2.

00:05:29.540 --> 00:05:34.470
With probability 1/2 half, our
random variable takes a value

00:05:34.470 --> 00:05:38.500
of 2, which is so much
away from the mean

00:05:38.500 --> 00:05:41.400
of the random variable.

00:05:41.400 --> 00:05:43.720
And then we square
that quantity.

00:05:43.720 --> 00:05:46.770
If we carry out the algebra,
the answer turns out

00:05:46.770 --> 00:05:50.240
to be 9 over 16.

00:05:50.240 --> 00:05:54.170
And now we can go back to the
law of the total variance and

00:05:54.170 --> 00:05:57.560
calculate that the total
variance is equal to the

00:05:57.560 --> 00:06:00.625
expected value of the variance,
which is 5/24.

00:06:03.230 --> 00:06:05.960
And then we have the variance
of the expected

00:06:05.960 --> 00:06:07.900
value, which is 9/16.

00:06:11.070 --> 00:06:14.653
And this number evaluates
to 37/48.

00:06:19.860 --> 00:06:22.730
So we have managed to find the
variance of this random

00:06:22.730 --> 00:06:26.930
variable using the divide and
conquer methods and the law of

00:06:26.930 --> 00:06:28.180
the total variance.