1 00:00:00,330 --> 00:00:03,510 Here is a simple application of the law of iterated 2 00:00:03,510 --> 00:00:04,780 expectations. 3 00:00:04,780 --> 00:00:08,150 We revisit the stick-breaking example, which we have seen 4 00:00:08,150 --> 00:00:10,190 sometime in the past. 5 00:00:10,190 --> 00:00:12,700 So in this example, we start with a stick that has a 6 00:00:12,700 --> 00:00:16,340 certain length and which we break at a point that's chosen 7 00:00:16,340 --> 00:00:20,980 uniformly at random throughout the length of the stick. 8 00:00:20,980 --> 00:00:25,880 And we call the point at which we cut the stick capital Y. 9 00:00:25,880 --> 00:00:29,090 So the random variable Y has a uniform distribution on the 10 00:00:29,090 --> 00:00:32,320 interval from 0 to l, and is described by 11 00:00:32,320 --> 00:00:34,210 this particular PDF. 12 00:00:34,210 --> 00:00:38,090 Then we take the piece of the stick that's left and we break 13 00:00:38,090 --> 00:00:42,390 it at a point that's chosen uniformly over the length of 14 00:00:42,390 --> 00:00:43,910 the stick that's left. 15 00:00:43,910 --> 00:00:49,670 So the stick that was left has a length Y, and the place at 16 00:00:49,670 --> 00:00:54,420 which we cut it, X, is chosen uniformly over that interval. 17 00:00:54,420 --> 00:00:57,390 So in particular, X-- or rather the conditional 18 00:00:57,390 --> 00:00:59,880 distribution of X given Y-- 19 00:00:59,880 --> 00:01:03,150 is uniform on that interval. 20 00:01:03,150 --> 00:01:06,740 So in this example, what is the expected value of X if I 21 00:01:06,740 --> 00:01:08,210 tell you the value of Y? 22 00:01:08,210 --> 00:01:11,590 Well, given the value of Y, the random variable X is 23 00:01:11,590 --> 00:01:12,930 uniform on that range. 24 00:01:12,930 --> 00:01:16,370 So the expected value is going to be at the midpoint that is 25 00:01:16,370 --> 00:01:19,400 equal to y over 2. 26 00:01:19,400 --> 00:01:22,080 This is an equality between numbers. 27 00:01:22,080 --> 00:01:24,480 For any particular number, little y, 28 00:01:24,480 --> 00:01:26,680 we have this equality. 29 00:01:26,680 --> 00:01:31,700 Now let us convert this concrete equality between 30 00:01:31,700 --> 00:01:34,600 numbers to a more abstract equality 31 00:01:34,600 --> 00:01:36,840 between random variables. 32 00:01:36,840 --> 00:01:40,910 This object is a random variable that takes this value 33 00:01:40,910 --> 00:01:43,410 whenever capital Y is little y. 34 00:01:43,410 --> 00:01:47,580 So this is an object that takes the value little y over 35 00:01:47,580 --> 00:01:51,509 2 whenever the random variable capital Y happens 36 00:01:51,509 --> 00:01:53,200 to be little y. 37 00:01:53,200 --> 00:01:55,690 But that's the same as the random variable 38 00:01:55,690 --> 00:01:57,780 capital Y over 2. 39 00:01:57,780 --> 00:02:02,790 This is a random variable that takes this value whenever 40 00:02:02,790 --> 00:02:07,400 capital Y happens to be the same as little y. 41 00:02:07,400 --> 00:02:09,478 So the conditional expectation-- 42 00:02:09,478 --> 00:02:11,890 the abstract conditional expectation is a random 43 00:02:11,890 --> 00:02:15,710 variable because its value is determined by the random 44 00:02:15,710 --> 00:02:19,960 variable capital Y, and it is this particular function of 45 00:02:19,960 --> 00:02:22,470 the random variable capital Y. 46 00:02:22,470 --> 00:02:25,820 And now we can proceed and calculate the expected value 47 00:02:25,820 --> 00:02:30,150 of X using the law of iterated expectations. 48 00:02:30,150 --> 00:02:35,060 The law of iterated expectations takes this form. 49 00:02:35,060 --> 00:02:39,350 We have already calculated what this random variable is. 50 00:02:39,350 --> 00:02:45,400 It is the random variable that's equal to Y over 2. 51 00:02:45,400 --> 00:02:51,120 So this is the same as 1/2 the expected value of Y. And since 52 00:02:51,120 --> 00:02:55,460 Y is uniform in the range from 0 to l, the expected value of 53 00:02:55,460 --> 00:03:00,880 Y is equal to l over 2, which gives us an 54 00:03:00,880 --> 00:03:03,900 answer of l over 4. 55 00:03:03,900 --> 00:03:07,160 This is the same as the answer that we got in the past where 56 00:03:07,160 --> 00:03:11,900 we actually found it using the total expectation theorem. 57 00:03:11,900 --> 00:03:16,450 The calculations were exactly the same as what went on here 58 00:03:16,450 --> 00:03:19,880 except that here we carry out the calculation in a more 59 00:03:19,880 --> 00:03:21,310 abstract form. 60 00:03:21,310 --> 00:03:25,120 And what is important to appreciate from this example 61 00:03:25,120 --> 00:03:29,470 is the distinction between these two lines. 62 00:03:29,470 --> 00:03:33,970 This is an equality between numbers, which is true for any 63 00:03:33,970 --> 00:03:36,140 specific little y. 64 00:03:36,140 --> 00:03:40,910 Whereas this is an equality between random variables. 65 00:03:40,910 --> 00:03:44,650 This quantity is random and this quantity is also random, 66 00:03:44,650 --> 00:03:47,730 meaning that their values are not known until the experiment 67 00:03:47,730 --> 00:03:49,980 is carried out and the specific value of 68 00:03:49,980 --> 00:03:51,329 capital Y is realized.