1 00:00:01,870 --> 00:00:04,620 Conditional PDFs share most of the properties 2 00:00:04,620 --> 00:00:06,370 of conditional PMFs. 3 00:00:06,370 --> 00:00:09,950 All facts for the discrete case have continuous analogs. 4 00:00:09,950 --> 00:00:13,010 The intuition is more or less the same, although it is much 5 00:00:13,010 --> 00:00:15,760 easier to grasp in the discrete case. 6 00:00:15,760 --> 00:00:18,390 For example, we have seen this version of the total 7 00:00:18,390 --> 00:00:20,260 probability theorem. 8 00:00:20,260 --> 00:00:22,710 There is a continuous analog in which we 9 00:00:22,710 --> 00:00:25,660 replace sums by integrals. 10 00:00:25,660 --> 00:00:29,100 And we replace PMFs by PDFs. 11 00:00:29,100 --> 00:00:32,380 The proof of this fact is actually pretty simple. 12 00:00:32,380 --> 00:00:36,820 By the multiplication rule, the integrand, here, is just 13 00:00:36,820 --> 00:00:41,350 the joint PDF of X and Y. 14 00:00:41,350 --> 00:00:45,370 And we know that if we take the joint PDF and integrate 15 00:00:45,370 --> 00:00:50,880 with respect to one variable then we recover the marginal 16 00:00:50,880 --> 00:00:54,470 PDF of the other random variable. 17 00:00:54,470 --> 00:00:57,700 So this is one theorem that extends to 18 00:00:57,700 --> 00:01:00,150 the continuous case. 19 00:01:00,150 --> 00:01:03,470 Moving along, we have defined the conditional expectation in 20 00:01:03,470 --> 00:01:05,810 this manner in the discrete case. 21 00:01:05,810 --> 00:01:09,610 And we define it similarly for the continuous case. 22 00:01:09,610 --> 00:01:13,660 So actually here we now have a new definition. 23 00:01:13,660 --> 00:01:16,710 This definition is also consistent with the definition 24 00:01:16,710 --> 00:01:20,230 of the expectation of a continuous random variable. 25 00:01:20,230 --> 00:01:22,720 The expected value for continuous random variable is 26 00:01:22,720 --> 00:01:24,890 the integral of X times [a] 27 00:01:24,890 --> 00:01:25,830 density. 28 00:01:25,830 --> 00:01:28,440 Except that here we live in a conditional universe where 29 00:01:28,440 --> 00:01:30,770 we're conditioning on this event. 30 00:01:30,770 --> 00:01:32,479 And therefore, we need to use the 31 00:01:32,479 --> 00:01:35,670 corresponding conditional PDF. 32 00:01:35,670 --> 00:01:40,080 Finally, we have the total expectation theorem in the 33 00:01:40,080 --> 00:01:41,150 discrete case. 34 00:01:41,150 --> 00:01:44,289 And there is the obvious analog in the continuous case 35 00:01:44,289 --> 00:01:48,479 where we are using an integral and a density. 36 00:01:48,479 --> 00:01:52,490 The interpretation is that we consider all possibilities for 37 00:01:52,490 --> 00:01:56,960 Y. Under each possibility of Y we find the expected value of 38 00:01:56,960 --> 00:02:00,850 X. And then we weigh those different possibilities 39 00:02:00,850 --> 00:02:03,790 according to the corresponding values of the density. 40 00:02:03,790 --> 00:02:06,580 So we're taking a weighted average of these conditional 41 00:02:06,580 --> 00:02:09,600 expectations to obtain the overall expectation of the 42 00:02:09,600 --> 00:02:12,190 random variable X. 43 00:02:12,190 --> 00:02:17,640 The derivation of this fact is maybe a little instructive 44 00:02:17,640 --> 00:02:21,900 because it uses various facts that we have in our hands. 45 00:02:21,900 --> 00:02:24,060 So let's see how to derive it. 46 00:02:24,060 --> 00:02:27,010 We start from this expression in the right-hand side and we 47 00:02:27,010 --> 00:02:30,740 will show that it is equal to the expected value of X. The 48 00:02:30,740 --> 00:02:33,910 expression on the right-hand side is equal to the 49 00:02:33,910 --> 00:02:38,910 following, it's the integral of the density of Y. 50 00:02:38,910 --> 00:02:42,030 And then, inside here, we have the conditional expectation 51 00:02:42,030 --> 00:02:43,700 which is defined this way. 52 00:02:43,700 --> 00:02:46,079 So we just plug-in the definition. 53 00:02:54,590 --> 00:02:59,380 And then what we do, is we take this term and move it 54 00:02:59,380 --> 00:03:01,225 inside the integral. 55 00:03:04,030 --> 00:03:07,570 Which we can do because this integral is with respect to x. 56 00:03:07,570 --> 00:03:10,310 And therefore, this is like a constant. 57 00:03:21,750 --> 00:03:27,190 And we also interchange the order of integration. 58 00:03:27,190 --> 00:03:31,300 Now, the inner integration is with respect to y. 59 00:03:31,300 --> 00:03:36,650 As far as Y is concerned, this term, x, is a constant. 60 00:03:36,650 --> 00:03:43,020 So we can take it and move it outside this first integral 61 00:03:43,020 --> 00:03:45,350 and place it out there. 62 00:03:45,350 --> 00:03:49,390 So this term disappears and goes out there. 63 00:03:49,390 --> 00:03:52,850 What do we have here? 64 00:03:52,850 --> 00:03:58,940 This part, by the previous fact, the total probability 65 00:03:58,940 --> 00:04:03,600 theorem, is just the density of X. So we're left with the 66 00:04:03,600 --> 00:04:11,560 integral of x times the density of x dx. 67 00:04:11,560 --> 00:04:16,959 And this is the expected value of X. 68 00:04:16,959 --> 00:04:20,600 Finally, we have various forms of the expected value rule, 69 00:04:20,600 --> 00:04:22,380 which barely deserve writing down. 70 00:04:22,380 --> 00:04:25,460 Because they're exactly what you might expect. 71 00:04:25,460 --> 00:04:29,450 Consider, for example, an expression such as this one, 72 00:04:29,450 --> 00:04:32,330 the expected value of a function of the random 73 00:04:32,330 --> 00:04:38,270 variable X but conditioned on the value of the random 74 00:04:38,270 --> 00:04:41,909 variable Y. How do we calculate this quantity? 75 00:04:41,909 --> 00:04:44,840 Well, the expected value rule tells us that we should 76 00:04:44,840 --> 00:04:54,110 integrate g of x times the density of X. But because, 77 00:04:54,110 --> 00:04:57,740 here we live in a conditional universe, we should actually 78 00:04:57,740 --> 00:05:02,750 use the corresponding conditional PDF of X. And 79 00:05:02,750 --> 00:05:05,780 there are many other versions of the expected value rule. 80 00:05:05,780 --> 00:05:09,010 Any version that we have seen for the discrete case has, 81 00:05:09,010 --> 00:05:12,530 also, a continuous analog which looks about the same 82 00:05:12,530 --> 00:05:15,240 except that we integrate and that we use densities.