1 00:00:00,000 --> 00:00:01,770 2 00:00:01,770 --> 00:00:05,330 In this problem, we're looking at a two stage process in 3 00:00:05,330 --> 00:00:08,730 which the first stage, we roll a fair die which has four 4 00:00:08,730 --> 00:00:19,030 faces to obtain a number N, where N belongs to the set 0, 5 00:00:19,030 --> 00:00:24,310 1, 2, and 3 with equal probability. 6 00:00:24,310 --> 00:00:28,420 Now, given the result of the die roll, N will toss a fair 7 00:00:28,420 --> 00:00:32,400 coin N times in getting K heads from the coin tosses. 8 00:00:32,400 --> 00:00:38,270 9 00:00:38,270 --> 00:00:42,050 For instance, if from the first die roll, we get N equal 10 00:00:42,050 --> 00:00:45,570 to 3, then we'll toss a coin 3 times. 11 00:00:45,570 --> 00:00:49,280 Let's say the outcome is heads, heads, and tails. 12 00:00:49,280 --> 00:00:54,270 And that will give us K equal to 2. 13 00:00:54,270 --> 00:00:59,800 For part A, we're asked to compute the PMF for N, which 14 00:00:59,800 --> 00:01:01,720 is a result of the first die roll. 15 00:01:01,720 --> 00:01:03,984 Now, since we had assumed the die roll was uniformly 16 00:01:03,984 --> 00:01:08,170 distributed in the set in the set 0, 1, 2, and 3, we have 17 00:01:08,170 --> 00:01:13,550 that the chance of N being equal to any little n is equal 18 00:01:13,550 --> 00:01:25,085 to 1/4 if n is in the set 0, 1, 2, 3, and 0 otherwise. 19 00:01:25,085 --> 00:01:28,390 If we were to plot this in a figure, we'll have the 20 00:01:28,390 --> 00:01:29,640 following plot. 21 00:01:29,640 --> 00:01:31,690 22 00:01:31,690 --> 00:01:35,130 For part B, things are getting a little more complicated. 23 00:01:35,130 --> 00:01:41,270 This time, we want to compute the joint PMF between N and K 24 00:01:41,270 --> 00:01:44,470 for N equal to little n and K equal to little k. 25 00:01:44,470 --> 00:01:47,490 What we'll do first is to use the law of conditional 26 00:01:47,490 --> 00:01:51,800 probability to break the joint probability into the product 27 00:01:51,800 --> 00:01:58,030 of probability of K is equal to little k conditional on N 28 00:01:58,030 --> 00:02:02,710 is equal to little n, multiply by the probability that N is 29 00:02:02,710 --> 00:02:04,030 equal to little n. 30 00:02:04,030 --> 00:02:07,380 Now, the second term right here is simply the PMF of N, 31 00:02:07,380 --> 00:02:09,270 which will be computed earlier. 32 00:02:09,270 --> 00:02:13,930 So this gives us 1/4 times probability K equal to little 33 00:02:13,930 --> 00:02:20,250 k, N equal to little n, for all N in the set 34 00:02:20,250 --> 00:02:23,290 0, 1, 2, and 3. 35 00:02:23,290 --> 00:02:27,410 Now, clearly if N is not one of those four values, this 36 00:02:27,410 --> 00:02:29,880 whole event couldn't have happened in the first place, 37 00:02:29,880 --> 00:02:34,980 and hence will have P and K equal to 0. 38 00:02:34,980 --> 00:02:38,620 We'll now go over all the cases for little n in this 39 00:02:38,620 --> 00:02:40,320 expression right here. 40 00:02:40,320 --> 00:02:42,050 The first case is the simplest. 41 00:02:42,050 --> 00:02:45,830 If we assume that little n is equal to 0, that means the die 42 00:02:45,830 --> 00:02:48,300 roll was 0, and hence we're not tossing any coins 43 00:02:48,300 --> 00:02:49,380 afterwards. 44 00:02:49,380 --> 00:02:54,760 And this implies that we must have K is equal to 0, which, 45 00:02:54,760 --> 00:02:58,120 mathematically speaking, is equivalent to saying 46 00:02:58,120 --> 00:03:01,840 probability of K equal to 0 conditional on N 47 00:03:01,840 --> 00:03:04,320 equal to 0 is 1. 48 00:03:04,320 --> 00:03:09,080 And K being any other value conditional N equal to 0 is 0. 49 00:03:09,080 --> 00:03:13,100 So we're done with the case that little n is equal to 0. 50 00:03:13,100 --> 00:03:19,850 Now, let's say little n is in the set 1, 2, and 3. 51 00:03:19,850 --> 00:03:23,150 In this case, we want to notice that after having 52 00:03:23,150 --> 00:03:28,130 observed the value of N, all the coin tosses for N times 53 00:03:28,130 --> 00:03:30,670 are conditionally independent from each other. 54 00:03:30,670 --> 00:03:34,610 What this means is now the total number of heads in the 55 00:03:34,610 --> 00:03:40,310 subsequent coin toss is equal in distribution to a binomial 56 00:03:40,310 --> 00:03:45,650 random variable with parameter n and 1/2. 57 00:03:45,650 --> 00:03:50,180 And here says the number of trials is n, and 1/2 is 58 00:03:50,180 --> 00:03:52,060 because the coin is fair. 59 00:03:52,060 --> 00:03:54,320 And the reason it is a binomial random variable, 60 00:03:54,320 --> 00:03:57,430 again, is because the coin tosses are independent 61 00:03:57,430 --> 00:03:59,720 conditional on the outcome of the die roll. 62 00:03:59,720 --> 00:04:01,970 And now we're done, since we know what the binomial 63 00:04:01,970 --> 00:04:06,020 distribution looks like given parameter n and 1/2. 64 00:04:06,020 --> 00:04:11,760 And we'll simply substitute based on the case of n the 65 00:04:11,760 --> 00:04:16,410 conditional distribution of K back into the product we had 66 00:04:16,410 --> 00:04:20,100 earlier, which in turn will give us the joint PMF. 67 00:04:20,100 --> 00:04:23,230 68 00:04:23,230 --> 00:04:26,450 This table summarizes the PMF we were computing earlier. 69 00:04:26,450 --> 00:04:30,670 P of N, K, little n, and little k. 70 00:04:30,670 --> 00:04:34,210 Now, as we saw before, if n equal to 0, the only 71 00:04:34,210 --> 00:04:36,920 possibility for k is equal to 0. 72 00:04:36,920 --> 00:04:40,330 And this is scaled by the probability of n equal to 0, 73 00:04:40,330 --> 00:04:41,810 which is 1/4. 74 00:04:41,810 --> 00:04:45,590 For any other values of n, we see that the distribution of 75 00:04:45,590 --> 00:04:50,750 k, conditional n, is the same as a binomial random variable 76 00:04:50,750 --> 00:04:52,650 with n trials. 77 00:04:52,650 --> 00:04:56,210 And again, every entry here is scaled by 1/4. 78 00:04:56,210 --> 00:04:58,000 And this completes part B. 79 00:04:58,000 --> 00:05:02,490 In part C, we're asked for the conditional PMF of K 80 00:05:02,490 --> 00:05:06,320 conditioning on the value of N being equal to 2. 81 00:05:06,320 --> 00:05:10,170 Now, as we discussed in part B, when N is equal to 2, we're 82 00:05:10,170 --> 00:05:13,530 essentially flipping a fair coin twice, and this should 83 00:05:13,530 --> 00:05:18,070 give us the same distribution as a binomial random variable 84 00:05:18,070 --> 00:05:21,060 with parameter 2 and 1/2. 85 00:05:21,060 --> 00:05:24,630 Now, 2 is the number of flips, and 1/2 is the chance of 86 00:05:24,630 --> 00:05:26,780 seeing a head in each flip. 87 00:05:26,780 --> 00:05:28,410 And that gives us the following distribution. 88 00:05:28,410 --> 00:05:31,720 89 00:05:31,720 --> 00:05:33,330 But there's another way to see this. 90 00:05:33,330 --> 00:05:39,330 It's to write P K given N, little k, and you go to 2 by 91 00:05:39,330 --> 00:05:44,430 using the law of conditional probability as P K, N, the 92 00:05:44,430 --> 00:05:51,030 joint PMF, k n2, divided by the probability that N is 93 00:05:51,030 --> 00:05:52,220 equal to 2. 94 00:05:52,220 --> 00:05:56,210 Now, we know that probability n equal to 2 is simply 1/4, so 95 00:05:56,210 --> 00:06:03,610 this gives us 4 times the joint density K, N, k, 2. 96 00:06:03,610 --> 00:06:07,690 In other words, in order to arrive at the distribution 97 00:06:07,690 --> 00:06:09,400 right here, [INAUDIBLE] 98 00:06:09,400 --> 00:06:13,010 to go back to the table we had earlier and look at the role 99 00:06:13,010 --> 00:06:17,380 where n is equal to 2 and multiply each number by 4. 100 00:06:17,380 --> 00:06:22,310 101 00:06:22,310 --> 00:06:24,640 Finally, in part D, we're asked for the conditional 102 00:06:24,640 --> 00:06:31,450 distribution of N, write as P N, given K of N equal to 103 00:06:31,450 --> 00:06:38,500 little n conditional on K is equal to 2. 104 00:06:38,500 --> 00:06:41,420 Again, we'll apply the formula for conditional probability. 105 00:06:41,420 --> 00:06:49,970 This is equal to the joint PMF evaluated at n and 2 divided 106 00:06:49,970 --> 00:06:54,050 by the probability of K being equal to 2. 107 00:06:54,050 --> 00:06:57,790 Since we have computed the entire table of the joint PMF, 108 00:06:57,790 --> 00:06:59,110 this shouldn't be too difficult. 109 00:06:59,110 --> 00:07:04,055 In particular, for the denominator, the probability 110 00:07:04,055 --> 00:07:08,410 that k is ever equal to 2, we just look at the 111 00:07:08,410 --> 00:07:10,150 column right here. 112 00:07:10,150 --> 00:07:13,560 So the entries in this column shows all the cases where k 113 00:07:13,560 --> 00:07:15,250 can be equal to 2. 114 00:07:15,250 --> 00:07:19,640 And in fact, we can see that k can be equal to 2 only if n is 115 00:07:19,640 --> 00:07:21,280 equal to 2 or 3. 116 00:07:21,280 --> 00:07:24,740 Clearly, if you toss the coin fewer than 2 times, there's no 117 00:07:24,740 --> 00:07:26,760 chance that we'll get 2 heads. 118 00:07:26,760 --> 00:07:30,340 So to get this probability right here, we'll add up the 119 00:07:30,340 --> 00:07:34,310 number in these two cells. 120 00:07:34,310 --> 00:07:39,980 So we get P N, K, little n, and 2 divided 121 00:07:39,980 --> 00:07:43,295 by 1/16 plus 3/32. 122 00:07:43,295 --> 00:07:45,910 123 00:07:45,910 --> 00:07:49,980 Now, the numerator, again, can be read off from the table 124 00:07:49,980 --> 00:07:51,080 right here. 125 00:07:51,080 --> 00:07:54,170 In particular, this tells us that there are only two 126 00:07:54,170 --> 00:07:55,670 possibilities. 127 00:07:55,670 --> 00:07:59,140 Either n is equal to 2 or n equal to 3. 128 00:07:59,140 --> 00:08:03,370 When n is equal to 2, we know this quantity gives us 1/16 129 00:08:03,370 --> 00:08:12,290 reading off this cell divided by 1/16 plus 3/32 130 00:08:12,290 --> 00:08:14,590 for n equal to 2. 131 00:08:14,590 --> 00:08:18,780 And the remaining probability goes to the case where n is 132 00:08:18,780 --> 00:08:19,430 equal to 3. 133 00:08:19,430 --> 00:08:27,770 So this is 3 divided by 32, 1/16 plus 3/32, which 134 00:08:27,770 --> 00:08:31,980 simplifies to 2/5 and 3/5. 135 00:08:31,980 --> 00:08:34,539 136 00:08:34,539 --> 00:08:38,450 And this distribution gives us the following plot. 137 00:08:38,450 --> 00:08:39,780 And this completes our problem. 138 00:08:39,780 --> 00:08:42,567