WEBVTT
00:00:01.120 --> 00:00:05.080
We now continue the study of the
sum of a random number of
00:00:05.080 --> 00:00:07.310
independent random variables.
00:00:07.310 --> 00:00:10.640
We already figured out what is
the expected value of this
00:00:10.640 --> 00:00:13.820
sum, and we found a fairly
simple answer.
00:00:13.820 --> 00:00:17.480
When it comes to the variance,
however, it's pretty hard to
00:00:17.480 --> 00:00:20.570
guess what the answer will be,
and it turns out that the
00:00:20.570 --> 00:00:22.700
answer is not as simple.
00:00:22.700 --> 00:00:25.830
So this is what we will
try to calculate now.
00:00:25.830 --> 00:00:30.560
The way to proceed will be to
use the law of total variance,
00:00:30.560 --> 00:00:34.350
which effectively breaks down
the problem by conditioning on
00:00:34.350 --> 00:00:36.510
the value of the random
variable capital
00:00:36.510 --> 00:00:40.520
N. So let us start.
00:00:40.520 --> 00:00:44.540
We have already figured out that
if I tell you the value
00:00:44.540 --> 00:00:48.210
of capital N, then the expected
value of the random
00:00:48.210 --> 00:00:51.550
variable Y is just this number,
capital N, the number
00:00:51.550 --> 00:00:54.430
of stores you are visiting,
times how much you are
00:00:54.430 --> 00:00:58.110
spending in each one
of the stores.
00:00:58.110 --> 00:01:02.280
Using this information, we can
now calculate this term, the
00:01:02.280 --> 00:01:05.680
variance of the conditional
expectation.
00:01:05.680 --> 00:01:07.130
What is it?
00:01:07.130 --> 00:01:13.045
It's the variance of capital N
times the expected value of X.
00:01:13.045 --> 00:01:16.720
Now, the expected value of X
is a constant, and when we
00:01:16.720 --> 00:01:19.700
multiply a random variable with
a constant, what that
00:01:19.700 --> 00:01:24.200
does to the variance is it
multiplies the variance with
00:01:24.200 --> 00:01:26.000
the square of that constant.
00:01:30.640 --> 00:01:34.789
And this gives us this term in
the law of total variance.
00:01:34.789 --> 00:01:39.820
Let us now work towards
the second term.
00:01:39.820 --> 00:01:43.680
If I tell you the number of
stores, then the random
00:01:43.680 --> 00:01:48.000
variable Y is just
a sum of a given
00:01:48.000 --> 00:01:50.950
number of random variables.
00:01:50.950 --> 00:01:55.720
And as we discussed before, the
conditioning that we have
00:01:55.720 --> 00:02:02.170
here may be eliminated because
these random variables are now
00:02:02.170 --> 00:02:05.690
independent of this random
variable, capital N. Their
00:02:05.690 --> 00:02:10.440
distribution does not change
based on this information, and
00:02:10.440 --> 00:02:13.870
so we obtain the unconditional
variance.
00:02:13.870 --> 00:02:17.340
Now, the unconditional variance
of a sum of n random
00:02:17.340 --> 00:02:22.570
variables is just n times the
variance of each one of them,
00:02:22.570 --> 00:02:26.500
which we denote with
this notation.
00:02:26.500 --> 00:02:29.040
Now, let us take this equality,
which is an equality
00:02:29.040 --> 00:02:33.110
between numbers, and it's true
for any particular choice of
00:02:33.110 --> 00:02:35.750
little n, and turn it
into an equality
00:02:35.750 --> 00:02:38.240
between random variables.
00:02:38.240 --> 00:02:42.050
This is the random variable that
takes this specific value
00:02:42.050 --> 00:02:44.850
when capital N is equal
to little n.
00:02:44.850 --> 00:02:48.500
So this is a random variable
that takes this specific value
00:02:48.500 --> 00:02:52.829
when capital N is equal to
little n, but this is also the
00:02:52.829 --> 00:02:57.400
same as this random variable,
n times the variance of X,
00:02:57.400 --> 00:03:00.430
because this random variable
takes this particular
00:03:00.430 --> 00:03:04.860
numerical value when capital
N is equal to little n.
00:03:04.860 --> 00:03:08.680
Now that we have an expression
for the conditional variance
00:03:08.680 --> 00:03:12.210
as a random variable, we can
take the next step and
00:03:12.210 --> 00:03:16.640
calculate the expected value of
the conditional variance.
00:03:16.640 --> 00:03:22.720
The expected value of the
conditional variance is simply
00:03:22.720 --> 00:03:25.160
the expected value of this
expression that we
00:03:25.160 --> 00:03:26.700
calculated up here.
00:03:30.340 --> 00:03:34.280
And now the variance of X is a
constant and can be pulled
00:03:34.280 --> 00:03:37.850
outside the expectation,
which leaves us with
00:03:37.850 --> 00:03:40.145
this expression here.
00:03:43.610 --> 00:03:47.770
Now that we have calculated both
terms that go into the
00:03:47.770 --> 00:03:51.829
law of total variance, we
can add these two terms.
00:03:51.829 --> 00:03:57.050
We have one contribution from
here, this is this term, and
00:03:57.050 --> 00:04:01.410
another contribution from here,
which is this term.
00:04:01.410 --> 00:04:05.250
What this expression tells us
is that the variance of the
00:04:05.250 --> 00:04:08.595
total amount that you spend,
which is a certain measure of
00:04:08.595 --> 00:04:11.090
the amount of randomness in
how much you are spending
00:04:11.090 --> 00:04:13.990
overall, this amount
of randomness
00:04:13.990 --> 00:04:16.130
is due to two causes.
00:04:16.130 --> 00:04:20.690
One cause is the randomness
that there is in how much
00:04:20.690 --> 00:04:24.850
money you spend in any given
store, and that's captured by
00:04:24.850 --> 00:04:29.330
the variance of X. It's the
variance of the distribution
00:04:29.330 --> 00:04:32.880
of the amount of money that you
spend in a typical store.
00:04:32.880 --> 00:04:36.030
But there is another source of
randomness, and that source of
00:04:36.030 --> 00:04:39.020
randomness comes from the fact
that the number of stores
00:04:39.020 --> 00:04:43.710
itself is random, and this gives
us this contribution to
00:04:43.710 --> 00:04:45.450
the variance of Y.
00:04:45.450 --> 00:04:49.890
By taking into account these two
sources of randomness, we
00:04:49.890 --> 00:04:52.750
can figure out the overall
variance of the random
00:04:52.750 --> 00:04:57.120
variable Y. As you can see, this
is a formula that would
00:04:57.120 --> 00:05:01.880
be hard to guess by just
reasoning intuitively.
00:05:01.880 --> 00:05:06.190
And so it's a demonstration of
the power of the law of the
00:05:06.190 --> 00:05:07.440
total variance.