WEBVTT

00:00:01.770 --> 00:00:05.330
In this problem, we're looking
at a two stage process in

00:00:05.330 --> 00:00:08.730
which the first stage, we roll
a fair die which has four

00:00:08.730 --> 00:00:19.030
faces to obtain a number N,
where N belongs to the set 0,

00:00:19.030 --> 00:00:24.310
1, 2, and 3 with equal
probability.

00:00:24.310 --> 00:00:28.420
Now, given the result of the die
roll, N will toss a fair

00:00:28.420 --> 00:00:32.400
coin N times in getting K heads
from the coin tosses.

00:00:38.270 --> 00:00:42.050
For instance, if from the first
die roll, we get N equal

00:00:42.050 --> 00:00:45.570
to 3, then we'll toss
a coin 3 times.

00:00:45.570 --> 00:00:49.280
Let's say the outcome is heads,
heads, and tails.

00:00:49.280 --> 00:00:54.270
And that will give
us K equal to 2.

00:00:54.270 --> 00:00:59.800
For part A, we're asked to
compute the PMF for N, which

00:00:59.800 --> 00:01:01.720
is a result of the
first die roll.

00:01:01.720 --> 00:01:03.984
Now, since we had assumed the
die roll was uniformly

00:01:03.984 --> 00:01:08.170
distributed in the set in the
set 0, 1, 2, and 3, we have

00:01:08.170 --> 00:01:13.550
that the chance of N being equal
to any little n is equal

00:01:13.550 --> 00:01:25.085
to 1/4 if n is in the set 0,
1, 2, 3, and 0 otherwise.

00:01:25.085 --> 00:01:28.390
If we were to plot this in
a figure, we'll have the

00:01:28.390 --> 00:01:29.640
following plot.

00:01:31.690 --> 00:01:35.130
For part B, things are getting
a little more complicated.

00:01:35.130 --> 00:01:41.270
This time, we want to compute
the joint PMF between N and K

00:01:41.270 --> 00:01:44.470
for N equal to little n and
K equal to little k.

00:01:44.470 --> 00:01:47.490
What we'll do first is to use
the law of conditional

00:01:47.490 --> 00:01:51.800
probability to break the joint
probability into the product

00:01:51.800 --> 00:01:58.030
of probability of K is equal to
little k conditional on N

00:01:58.030 --> 00:02:02.710
is equal to little n, multiply
by the probability that N is

00:02:02.710 --> 00:02:04.030
equal to little n.

00:02:04.030 --> 00:02:07.380
Now, the second term right here
is simply the PMF of N,

00:02:07.380 --> 00:02:09.270
which will be computed
earlier.

00:02:09.270 --> 00:02:13.930
So this gives us 1/4 times
probability K equal to little

00:02:13.930 --> 00:02:20.250
k, N equal to little n,
for all N in the set

00:02:20.250 --> 00:02:23.290
0, 1, 2, and 3.

00:02:23.290 --> 00:02:27.410
Now, clearly if N is not one
of those four values, this

00:02:27.410 --> 00:02:29.880
whole event couldn't have
happened in the first place,

00:02:29.880 --> 00:02:34.980
and hence will have P
and K equal to 0.

00:02:34.980 --> 00:02:38.620
We'll now go over all the cases
for little n in this

00:02:38.620 --> 00:02:40.320
expression right here.

00:02:40.320 --> 00:02:42.050
The first case is
the simplest.

00:02:42.050 --> 00:02:45.830
If we assume that little n is
equal to 0, that means the die

00:02:45.830 --> 00:02:48.300
roll was 0, and hence we're
not tossing any coins

00:02:48.300 --> 00:02:49.380
afterwards.

00:02:49.380 --> 00:02:54.760
And this implies that we must
have K is equal to 0, which,

00:02:54.760 --> 00:02:58.120
mathematically speaking,
is equivalent to saying

00:02:58.120 --> 00:03:01.840
probability of K equal
to 0 conditional on N

00:03:01.840 --> 00:03:04.320
equal to 0 is 1.

00:03:04.320 --> 00:03:09.080
And K being any other value
conditional N equal to 0 is 0.

00:03:09.080 --> 00:03:13.100
So we're done with the case that
little n is equal to 0.

00:03:13.100 --> 00:03:19.850
Now, let's say little n is
in the set 1, 2, and 3.

00:03:19.850 --> 00:03:23.150
In this case, we want to notice
that after having

00:03:23.150 --> 00:03:28.130
observed the value of N, all
the coin tosses for N times

00:03:28.130 --> 00:03:30.670
are conditionally independent
from each other.

00:03:30.670 --> 00:03:34.610
What this means is now the total
number of heads in the

00:03:34.610 --> 00:03:40.310
subsequent coin toss is equal in
distribution to a binomial

00:03:40.310 --> 00:03:45.650
random variable with parameter
n and 1/2.

00:03:45.650 --> 00:03:50.180
And here says the number of
trials is n, and 1/2 is

00:03:50.180 --> 00:03:52.060
because the coin is fair.

00:03:52.060 --> 00:03:54.320
And the reason it is a binomial
random variable,

00:03:54.320 --> 00:03:57.430
again, is because the coin
tosses are independent

00:03:57.430 --> 00:03:59.720
conditional on the outcome
of the die roll.

00:03:59.720 --> 00:04:01.970
And now we're done, since we
know what the binomial

00:04:01.970 --> 00:04:06.020
distribution looks like given
parameter n and 1/2.

00:04:06.020 --> 00:04:11.760
And we'll simply substitute
based on the case of n the

00:04:11.760 --> 00:04:16.410
conditional distribution of K
back into the product we had

00:04:16.410 --> 00:04:20.100
earlier, which in turn will
give us the joint PMF.

00:04:23.230 --> 00:04:26.450
This table summarizes the PMF
we were computing earlier.

00:04:26.450 --> 00:04:30.670
P of N, K, little
n, and little k.

00:04:30.670 --> 00:04:34.210
Now, as we saw before, if
n equal to 0, the only

00:04:34.210 --> 00:04:36.920
possibility for k
is equal to 0.

00:04:36.920 --> 00:04:40.330
And this is scaled by the
probability of n equal to 0,

00:04:40.330 --> 00:04:41.810
which is 1/4.

00:04:41.810 --> 00:04:45.590
For any other values of n, we
see that the distribution of

00:04:45.590 --> 00:04:50.750
k, conditional n, is the same as
a binomial random variable

00:04:50.750 --> 00:04:52.650
with n trials.

00:04:52.650 --> 00:04:56.210
And again, every entry here
is scaled by 1/4.

00:04:56.210 --> 00:04:58.000
And this completes part B.

00:04:58.000 --> 00:05:02.490
In part C, we're asked for
the conditional PMF of K

00:05:02.490 --> 00:05:06.320
conditioning on the value
of N being equal to 2.

00:05:06.320 --> 00:05:10.170
Now, as we discussed in part B,
when N is equal to 2, we're

00:05:10.170 --> 00:05:13.530
essentially flipping a fair coin
twice, and this should

00:05:13.530 --> 00:05:18.070
give us the same distribution as
a binomial random variable

00:05:18.070 --> 00:05:21.060
with parameter 2 and 1/2.

00:05:21.060 --> 00:05:24.630
Now, 2 is the number of flips,
and 1/2 is the chance of

00:05:24.630 --> 00:05:26.780
seeing a head in each flip.

00:05:26.780 --> 00:05:28.410
And that gives us the following
distribution.

00:05:31.720 --> 00:05:33.330
But there's another
way to see this.

00:05:33.330 --> 00:05:39.330
It's to write P K given N,
little k, and you go to 2 by

00:05:39.330 --> 00:05:44.430
using the law of conditional
probability as P K, N, the

00:05:44.430 --> 00:05:51.030
joint PMF, k n2, divided by
the probability that N is

00:05:51.030 --> 00:05:52.220
equal to 2.

00:05:52.220 --> 00:05:56.210
Now, we know that probability n
equal to 2 is simply 1/4, so

00:05:56.210 --> 00:06:03.610
this gives us 4 times the joint
density K, N, k, 2.

00:06:03.610 --> 00:06:07.690
In other words, in order to
arrive at the distribution

00:06:07.690 --> 00:06:09.400
right here, [INAUDIBLE]

00:06:09.400 --> 00:06:13.010
to go back to the table we had
earlier and look at the role

00:06:13.010 --> 00:06:17.380
where n is equal to 2 and
multiply each number by 4.

00:06:22.310 --> 00:06:24.640
Finally, in part D, we're asked
for the conditional

00:06:24.640 --> 00:06:31.450
distribution of N, write as
P N, given K of N equal to

00:06:31.450 --> 00:06:38.500
little n conditional
on K is equal to 2.

00:06:38.500 --> 00:06:41.420
Again, we'll apply the formula
for conditional probability.

00:06:41.420 --> 00:06:49.970
This is equal to the joint PMF
evaluated at n and 2 divided

00:06:49.970 --> 00:06:54.050
by the probability of
K being equal to 2.

00:06:54.050 --> 00:06:57.790
Since we have computed the
entire table of the joint PMF,

00:06:57.790 --> 00:06:59.110
this shouldn't be
too difficult.

00:06:59.110 --> 00:07:04.055
In particular, for the
denominator, the probability

00:07:04.055 --> 00:07:08.410
that k is ever equal to
2, we just look at the

00:07:08.410 --> 00:07:10.150
column right here.

00:07:10.150 --> 00:07:13.560
So the entries in this column
shows all the cases where k

00:07:13.560 --> 00:07:15.250
can be equal to 2.

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

00:07:19.640 --> 00:07:21.280
equal to 2 or 3.

00:07:21.280 --> 00:07:24.740
Clearly, if you toss the coin
fewer than 2 times, there's no

00:07:24.740 --> 00:07:26.760
chance that we'll get 2 heads.

00:07:26.760 --> 00:07:30.340
So to get this probability right
here, we'll add up the

00:07:30.340 --> 00:07:34.310
number in these two cells.

00:07:34.310 --> 00:07:39.980
So we get P N, K, little
n, and 2 divided

00:07:39.980 --> 00:07:43.295
by 1/16 plus 3/32.

00:07:45.910 --> 00:07:49.980
Now, the numerator, again, can
be read off from the table

00:07:49.980 --> 00:07:51.080
right here.

00:07:51.080 --> 00:07:54.170
In particular, this tells us
that there are only two

00:07:54.170 --> 00:07:55.670
possibilities.

00:07:55.670 --> 00:07:59.140
Either n is equal to
2 or n equal to 3.

00:07:59.140 --> 00:08:03.370
When n is equal to 2, we know
this quantity gives us 1/16

00:08:03.370 --> 00:08:12.290
reading off this cell divided
by 1/16 plus 3/32

00:08:12.290 --> 00:08:14.590
for n equal to 2.

00:08:14.590 --> 00:08:18.780
And the remaining probability
goes to the case where n is

00:08:18.780 --> 00:08:19.430
equal to 3.

00:08:19.430 --> 00:08:27.770
So this is 3 divided by 32,
1/16 plus 3/32, which

00:08:27.770 --> 00:08:31.980
simplifies to 2/5 and 3/5.

00:08:34.539 --> 00:08:38.450
And this distribution gives
us the following plot.

00:08:38.450 --> 00:08:39.780
And this completes our problem.