1
00:00:00,550 --> 00:00:03,440
We will now go through an
example, which is essentially
2
00:00:03,440 --> 00:00:06,290
a drill, to consolidate our
understanding of the
3
00:00:06,290 --> 00:00:09,890
conditional expectation and
the conditional variance.
4
00:00:09,890 --> 00:00:12,870
Consider a random variable X,
which is continuous and is
5
00:00:12,870 --> 00:00:16,079
described by a PDF
of this form.
6
00:00:16,079 --> 00:00:19,890
Whenever we have a PDF that
seems to consist of different
7
00:00:19,890 --> 00:00:23,930
pieces, it's always useful
to divide and conquer.
8
00:00:23,930 --> 00:00:26,490
And the way we will do that
will be to consider two
9
00:00:26,490 --> 00:00:27,610
different scenarios.
10
00:00:27,610 --> 00:00:29,940
That X falls in this range.
11
00:00:29,940 --> 00:00:32,910
And in that scenario, we say
that the certain random
12
00:00:32,910 --> 00:00:34,880
variable Y is equal to 1.
13
00:00:34,880 --> 00:00:38,450
And another scenario in which X
falls in this range, and in
14
00:00:38,450 --> 00:00:42,850
that case, we say that
Y is equal to 2.
15
00:00:42,850 --> 00:00:45,600
Let us now look at the
conditional expectation of X
16
00:00:45,600 --> 00:00:47,760
given Y. What is it?
17
00:00:47,760 --> 00:00:51,210
Well, it is a random variable
which can take a different
18
00:00:51,210 --> 00:00:53,960
values depending on what Y is.
19
00:00:53,960 --> 00:00:57,980
If Y happens to take
a value of 1, then
20
00:00:57,980 --> 00:00:59,560
we are in this range.
21
00:00:59,560 --> 00:01:03,380
And the conditional PDF of X,
given that Y falls in this
22
00:01:03,380 --> 00:01:06,270
range, keeps the same
shape, it's uniform.
23
00:01:06,270 --> 00:01:10,390
And so it's mean is going to
be equal to the midpoint of
24
00:01:10,390 --> 00:01:14,260
this interval, which is 1/2.
25
00:01:14,260 --> 00:01:18,320
And this is something that
happens when Y is equal to 1.
26
00:01:18,320 --> 00:01:20,340
What is the probability
of this happening?
27
00:01:20,340 --> 00:01:24,020
The probability that Y is equal
to 1 is the area under
28
00:01:24,020 --> 00:01:26,610
the PDF in this range.
29
00:01:26,610 --> 00:01:29,730
And since the height of
the PDF is 1/2, this
30
00:01:29,730 --> 00:01:31,260
probability is 1/2.
31
00:01:33,830 --> 00:01:37,180
The alternative scenario is
that Y happens to take the
32
00:01:37,180 --> 00:01:38,020
value of 2.
33
00:01:38,020 --> 00:01:41,650
In which case, X lives
in this interval.
34
00:01:41,650 --> 00:01:46,690
Given that X has fallen in this
interval, the conditional
35
00:01:46,690 --> 00:01:50,509
expectation of X is the midpoint
of this interval.
36
00:01:50,509 --> 00:01:56,229
And the midpoint of this
interval is at 2.
37
00:01:56,229 --> 00:01:59,170
And this is an event that,
again, happens with
38
00:01:59,170 --> 00:02:03,610
probability 1/2, because the
area under the PDF in this
39
00:02:03,610 --> 00:02:06,520
region is equal to 1/2.
40
00:02:06,520 --> 00:02:09,720
So the conditional expectation
is a random variable that
41
00:02:09,720 --> 00:02:12,730
takes these values with
these probabilities.
42
00:02:12,730 --> 00:02:16,060
Since we now have a complete
probabilistic description of
43
00:02:16,060 --> 00:02:19,250
this random variable, we're
able to calculate the
44
00:02:19,250 --> 00:02:21,250
expectation of this
random variable.
45
00:02:21,250 --> 00:02:22,230
What is it?
46
00:02:22,230 --> 00:02:25,840
With probability 1/2, the random
variable takes the
47
00:02:25,840 --> 00:02:27,610
value of 1/2.
48
00:02:27,610 --> 00:02:31,970
And with probability 1/2,
it takes a value of 2.
49
00:02:31,970 --> 00:02:34,500
And so the expected value
of the conditional
50
00:02:34,500 --> 00:02:37,840
expectation is 5/4.
51
00:02:37,840 --> 00:02:40,720
But the law of iterated
expectations tells us that
52
00:02:40,720 --> 00:02:45,620
this quantity is also the same
as the expected value of X. So
53
00:02:45,620 --> 00:02:48,730
we have managed to find the
expected value of X by the
54
00:02:48,730 --> 00:02:52,670
divide and conquer method, by
considering different cases.
55
00:02:52,670 --> 00:02:55,820
Let us now turn to the
conditional variance of X
56
00:02:55,820 --> 00:03:00,160
given Y. Once more, this
quantity is a random variable.
57
00:03:00,160 --> 00:03:03,370
The value of that quantity
depends on what Y
58
00:03:03,370 --> 00:03:04,780
turns out to be.
59
00:03:04,780 --> 00:03:06,930
And we have, again, the same
two possibilities.
60
00:03:06,930 --> 00:03:10,510
Y could be equal to 1, or
Y could be equal to 2.
61
00:03:10,510 --> 00:03:13,660
And these possibilities happen
with equal probabilities.
62
00:03:16,820 --> 00:03:20,850
If Y is equal to 1, conditional
on that event, X
63
00:03:20,850 --> 00:03:25,170
has a uniform PDF on this
range, on an interval of
64
00:03:25,170 --> 00:03:25,970
length one.
65
00:03:25,970 --> 00:03:29,550
And we know that the variance
of a uniform PDF on an
66
00:03:29,550 --> 00:03:32,440
interval of length
one is 1/12.
67
00:03:32,440 --> 00:03:37,380
If on the other hand, Y takes
a value of 2, then X is a
68
00:03:37,380 --> 00:03:42,030
uniform random variable on
an interval of length 2.
69
00:03:42,030 --> 00:03:47,790
And the variance in this case
is 2 squared, where this 2
70
00:03:47,790 --> 00:03:51,750
stands for the length of the
interval, divided by 12, which
71
00:03:51,750 --> 00:03:53,755
is the same as 4/12.
72
00:03:57,880 --> 00:04:01,210
So we now have a complete
probabilistic description of
73
00:04:01,210 --> 00:04:03,580
the conditional variance
as a random variable.
74
00:04:03,580 --> 00:04:06,890
It's a random variable that
with these probabilities,
75
00:04:06,890 --> 00:04:09,630
takes these two particular
values.
76
00:04:09,630 --> 00:04:12,570
Since we know the distribution
of this random variable, we
77
00:04:12,570 --> 00:04:15,640
can certainly calculate
its expected value.
78
00:04:15,640 --> 00:04:17,790
And the expected value
is found as follows.
79
00:04:17,790 --> 00:04:21,170
With probability 1/2, the random
variable of interest
80
00:04:21,170 --> 00:04:24,000
takes a value of 1/12.
81
00:04:24,000 --> 00:04:28,000
And with probability 1/2,
this random variable
82
00:04:28,000 --> 00:04:29,465
takes a value of 4/12.
83
00:04:32,690 --> 00:04:34,770
And this number happens
to be 5/24.
84
00:04:38,590 --> 00:04:42,130
Finally, let us calculate the
variance of the conditional
85
00:04:42,130 --> 00:04:43,480
expectation.
86
00:04:43,480 --> 00:04:45,790
Since we have complete
information about the
87
00:04:45,790 --> 00:04:48,340
distribution of the conditional
expectation,
88
00:04:48,340 --> 00:04:52,750
calculating its variance is
not going to be difficult.
89
00:04:52,750 --> 00:04:54,380
So what is it?
90
00:04:54,380 --> 00:04:59,780
With probability 1/2, the
conditional expectation takes
91
00:04:59,780 --> 00:05:02,380
a value of 1/2.
92
00:05:02,380 --> 00:05:05,990
We subtract from this is the
mean of the conditional
93
00:05:05,990 --> 00:05:09,600
expectation, which is 5/4.
94
00:05:09,600 --> 00:05:12,120
And we take the square
of that.
95
00:05:12,120 --> 00:05:18,360
So this term is the square or
the deviation of the value of
96
00:05:18,360 --> 00:05:21,730
the random variable of
1/2 from the mean
97
00:05:21,730 --> 00:05:23,610
of that random variable.
98
00:05:23,610 --> 00:05:25,900
And we get a similar term.
99
00:05:25,900 --> 00:05:29,540
If Y happens to be equal to 2.
100
00:05:29,540 --> 00:05:34,470
With probability 1/2 half, our
random variable takes a value
101
00:05:34,470 --> 00:05:38,500
of 2, which is so much
away from the mean
102
00:05:38,500 --> 00:05:41,400
of the random variable.
103
00:05:41,400 --> 00:05:43,720
And then we square
that quantity.
104
00:05:43,720 --> 00:05:46,770
If we carry out the algebra,
the answer turns out
105
00:05:46,770 --> 00:05:50,240
to be 9 over 16.
106
00:05:50,240 --> 00:05:54,170
And now we can go back to the
law of the total variance and
107
00:05:54,170 --> 00:05:57,560
calculate that the total
variance is equal to the
108
00:05:57,560 --> 00:06:00,625
expected value of the variance,
which is 5/24.
109
00:06:03,230 --> 00:06:05,960
And then we have the variance
of the expected
110
00:06:05,960 --> 00:06:07,900
value, which is 9/16.
111
00:06:11,070 --> 00:06:14,653
And this number evaluates
to 37/48.
112
00:06:19,860 --> 00:06:22,730
So we have managed to find the
variance of this random
113
00:06:22,730 --> 00:06:26,930
variable using the divide and
conquer methods and the law of
114
00:06:26,930 --> 00:06:28,180
the total variance.