WEBVTT

00:00:00.700 --> 00:00:03.320
In this segment, we will derive
the formula for the

00:00:03.320 --> 00:00:06.470
variance of the geometric PMF.

00:00:06.470 --> 00:00:09.470
The argument will be very much
similar to the argument that

00:00:09.470 --> 00:00:13.110
we used to drive the expected
value of the geometric PMF.

00:00:13.110 --> 00:00:15.970
And it relies on the
memorylessness properties of

00:00:15.970 --> 00:00:18.040
geometric random variables.

00:00:18.040 --> 00:00:20.460
So let X be a geometric
random variable with

00:00:20.460 --> 00:00:21.990
some parameter p.

00:00:21.990 --> 00:00:26.410
The way to think about X is like
the number of coin flips

00:00:26.410 --> 00:00:29.850
that it takes until we obtain
heads for the first time,

00:00:29.850 --> 00:00:33.360
where p is the probability
of heads at each toss.

00:00:33.360 --> 00:00:36.340
Recall now the memorylessness
property.

00:00:36.340 --> 00:00:38.930
If I tell you that X
is bigger than 1--

00:00:38.930 --> 00:00:42.540
which means that the first
trial was a failure---

00:00:42.540 --> 00:00:44.100
we obtained tails.

00:00:44.100 --> 00:00:48.640
Given that event, the remaining
number of tosses has

00:00:48.640 --> 00:00:52.050
the same geometric PMF
as if we were just

00:00:52.050 --> 00:00:53.740
starting at this time.

00:00:53.740 --> 00:00:57.570
So it has the same geometric PMF
as the unconditional PMF

00:00:57.570 --> 00:01:01.380
of X. And this is the property
that we exploited in order to

00:01:01.380 --> 00:01:04.370
find the expected value of X.

00:01:04.370 --> 00:01:08.480
Now let us take this observation
and add one to the

00:01:08.480 --> 00:01:12.190
random variables involved and
turn this statement to the

00:01:12.190 --> 00:01:14.060
following version.

00:01:14.060 --> 00:01:16.730
The conditional PMF of X--

00:01:16.730 --> 00:01:20.030
which is this random
variable plus 1--

00:01:20.030 --> 00:01:23.670
is the same as the unconditional
PMF of this

00:01:23.670 --> 00:01:25.630
random variable plus 1.

00:01:25.630 --> 00:01:30.260
So it's the same statement as
before except that we added 1.

00:01:30.260 --> 00:01:33.360
One consequence of the
memorylessness that we have

00:01:33.360 --> 00:01:37.410
already seen and exploited is
that the expected value of X

00:01:37.410 --> 00:01:40.560
in the conditional universe
where the first coin flip was

00:01:40.560 --> 00:01:43.560
wasted is equal to 1--

00:01:43.560 --> 00:01:45.759
that's the wasted coin flip--

00:01:45.759 --> 00:01:49.550
plus how long you expect to have
to flip the coin until

00:01:49.550 --> 00:01:52.600
you obtain heads for the
first time, starting

00:01:52.600 --> 00:01:54.950
from the second flip.

00:01:54.950 --> 00:01:59.009
Since the conditional
distribution of X in this

00:01:59.009 --> 00:02:02.980
universe is the same as the
unconditional distribution of

00:02:02.980 --> 00:02:06.140
this random variable, it means
that the corresponding

00:02:06.140 --> 00:02:10.360
expected value in this universe
is going to be equal

00:02:10.360 --> 00:02:12.890
to the expected value of this
random variable, which is 1

00:02:12.890 --> 00:02:17.430
plus the expected value of X.
And by exactly the same

00:02:17.430 --> 00:02:23.400
argument, the random variable
X squared has the same

00:02:23.400 --> 00:02:28.800
distribution in the conditional
universe as the

00:02:28.800 --> 00:02:33.400
random variable X plus
1 squared in the

00:02:33.400 --> 00:02:36.970
unconditional universe.

00:02:36.970 --> 00:02:40.079
So since X in the conditional
universe has the same

00:02:40.079 --> 00:02:43.390
distribution as X plus 1, it
means that X squared in the

00:02:43.390 --> 00:02:46.920
conditional universe has the
same distribution as X plus 1

00:02:46.920 --> 00:02:50.510
squared in the unconditional
universe.

00:02:50.510 --> 00:02:54.530
So now let us take those facts
and use a divide and conquer

00:02:54.530 --> 00:02:59.690
method to calculate the expected
value of X squared.

00:02:59.690 --> 00:03:04.120
We will use exactly the same
method that we used in order

00:03:04.120 --> 00:03:06.430
to calculate the
expected value.

00:03:06.430 --> 00:03:08.880
We separate into
two scenarios.

00:03:08.880 --> 00:03:11.850
In one scenario, X
is equal to 1.

00:03:11.850 --> 00:03:15.730
And then we have the expected
value of X squared given that

00:03:15.730 --> 00:03:18.220
X is equal to 1.

00:03:18.220 --> 00:03:21.060
And then we have another
scenario--

00:03:21.060 --> 00:03:23.900
the scenario that X
is bigger than 1.

00:03:23.900 --> 00:03:28.340
And then we have the expected
value of X squared given that

00:03:28.340 --> 00:03:30.579
X is bigger than 1.

00:03:30.579 --> 00:03:34.060
So this is just the total
expectation theorem.

00:03:34.060 --> 00:03:35.790
Now let us calculate terms.

00:03:35.790 --> 00:03:39.230
The probability that the first
toss results in success, that

00:03:39.230 --> 00:03:42.040
X is equal to 1-- this is p.

00:03:42.040 --> 00:03:46.680
And if X is equal to 1, then the
value of X squared is also

00:03:46.680 --> 00:03:48.230
equal to 1.

00:03:48.230 --> 00:03:52.930
And then there is probability 1
minus p that the first trial

00:03:52.930 --> 00:03:54.070
was not a success.

00:03:54.070 --> 00:03:56.329
So we get to continue.

00:03:56.329 --> 00:03:58.700
We have this conditional
expectation here.

00:03:58.700 --> 00:04:00.780
But it is equal to this
unconditional

00:04:00.780 --> 00:04:02.650
expectation up there.

00:04:02.650 --> 00:04:07.740
And now let us expand the terms
in this quadratic and

00:04:07.740 --> 00:04:13.070
write this as expected value
of X squared plus twice the

00:04:13.070 --> 00:04:18.459
expected value of X plus 1.

00:04:18.459 --> 00:04:22.089
Now we know what this expected
value here is.

00:04:22.089 --> 00:04:26.910
The expected value of a
geometric is just 1/p.

00:04:26.910 --> 00:04:31.870
And what we're left with is an
equation that involves a

00:04:31.870 --> 00:04:33.260
single unknown.

00:04:33.260 --> 00:04:36.150
Namely, this quantity
is the unknown.

00:04:36.150 --> 00:04:39.390
And we can solve this linear
equation for this unknown.

00:04:39.390 --> 00:04:42.500
We carry out some algebra,
which is not so

00:04:42.500 --> 00:04:44.360
interesting by itself.

00:04:44.360 --> 00:04:49.500
And after we carry out the
algebra, what we obtain is

00:04:49.500 --> 00:04:55.040
that the expected value of X
squared is equal to 2 over p

00:04:55.040 --> 00:04:59.020
squared minus 1 over p.

00:04:59.020 --> 00:05:04.190
And then we use the formula that
the variance of a random

00:05:04.190 --> 00:05:09.160
variable is equal to the
expected value of the square

00:05:09.160 --> 00:05:13.570
of that random variable
minus the square of

00:05:13.570 --> 00:05:16.120
the expected value.

00:05:16.120 --> 00:05:19.050
We already know what that
expected value is.

00:05:19.050 --> 00:05:21.730
We found the expected
value of the square.

00:05:21.730 --> 00:05:25.440
And putting all that together,
we obtain a final answer.

00:05:25.440 --> 00:05:28.960
And this is the expression for
the variance of a geometric

00:05:28.960 --> 00:05:31.100
random variable.

00:05:31.100 --> 00:05:34.090
It goes without saying that for
this calculation to make

00:05:34.090 --> 00:05:37.530
sense, we need to assume that
the parameter that we're

00:05:37.530 --> 00:05:39.430
dealing with is positive.