WEBVTT

00:00:00.490 --> 00:00:04.410
In this video, we're going to
do an example in which we

00:00:04.410 --> 00:00:09.090
derive the probability density
function of the sum of two

00:00:09.090 --> 00:00:10.630
random variables.

00:00:10.630 --> 00:00:12.550
The problem tells us
the following.

00:00:12.550 --> 00:00:16.870
We're given that X and Y are
independent random variables.

00:00:16.870 --> 00:00:20.035
X is a discrete random
variable with PMF Px.

00:00:20.035 --> 00:00:23.620
Y is continuous with PDF Fy.

00:00:23.620 --> 00:00:26.760
And we'd like to compute the PDF
of Z which is equal to X

00:00:26.760 --> 00:00:30.750
plus Y. We're going to use the
standard approach here--

00:00:30.750 --> 00:00:33.920
compute the CDF of Z
and then take the

00:00:33.920 --> 00:00:37.060
derivative to get the PDF.

00:00:37.060 --> 00:00:49.250
So in this case, the CDF, which
is Fz, by definition is

00:00:49.250 --> 00:00:51.880
the random variable Z being
less than little z.

00:00:51.880 --> 00:01:00.860
But Z is just X plus Y. So now,
we'd actually like to,

00:01:00.860 --> 00:01:03.890
instead of having to deal with
two random variables, X and Y,

00:01:03.890 --> 00:01:06.130
we'd like to deal with
one at a time.

00:01:06.130 --> 00:01:12.700
And the total probability
theorem allows us to do this

00:01:12.700 --> 00:01:16.070
by conditioning on one of the
two random variables.

00:01:16.070 --> 00:01:18.720
Conditioning on Y here is a
bit tricky, because Y is

00:01:18.720 --> 00:01:22.160
continuous, and you have to be
careful with your definitions.

00:01:22.160 --> 00:01:25.290
So conditioning on X seems
like the way to go.

00:01:25.290 --> 00:01:26.540
So let's do that.

00:01:38.280 --> 00:01:41.500
This is just the probability
that X equals little x, which

00:01:41.500 --> 00:01:46.270
is exactly equal to the PMF
of X evaluated at x.

00:01:50.770 --> 00:01:57.570
Now we're given we're fixing
X equal to little x.

00:01:57.570 --> 00:02:00.320
So we can actually replace every
instance of the random

00:02:00.320 --> 00:02:01.570
variable with little x.

00:02:13.860 --> 00:02:16.630
And now I'm going to just
rearrange this so that it

00:02:16.630 --> 00:02:17.610
looks a little nicer.

00:02:17.610 --> 00:02:21.770
So I'm going to have Y on the
left and say Y is less than z

00:02:21.770 --> 00:02:29.420
minus x, where z minus
x is just a constant.

00:02:29.420 --> 00:02:32.820
Now, remember that X and
Y are independent.

00:02:32.820 --> 00:02:37.120
So telling us something about X
shouldn't change our beliefs

00:02:37.120 --> 00:02:39.920
about Y. So in this case,
we can actually drop the

00:02:39.920 --> 00:02:41.170
conditioning.

00:02:51.140 --> 00:02:55.293
And this is exactly the CDF of
Y evaluated at z minus x.

00:02:59.990 --> 00:03:05.710
So now we've simplified
as far as we could.

00:03:05.710 --> 00:03:08.330
So let's take the derivative and
see where that takes us.

00:03:13.230 --> 00:03:19.250
So the PDF of Z is, by
definition, the derivative of

00:03:19.250 --> 00:03:27.850
the CDF, which we just
computed here.

00:03:27.850 --> 00:03:36.723
This is sum over x
Fy z minus x Px.

00:03:36.723 --> 00:03:38.940
What next?

00:03:38.940 --> 00:03:41.375
Interchange the derivative
and the summation.

00:03:51.920 --> 00:03:54.690
And a note of caution here.

00:03:57.960 --> 00:04:02.200
So if x took on a finite number
of values, you'd have a

00:04:02.200 --> 00:04:04.260
finite number of terms here.

00:04:04.260 --> 00:04:07.030
And this would be completely
valid.

00:04:07.030 --> 00:04:10.050
You can just do this.

00:04:10.050 --> 00:04:13.440
But if x took on, for
example, a countably

00:04:13.440 --> 00:04:15.000
infinite number of values--

00:04:15.000 --> 00:04:18.200
a geometric random variable,
for example--

00:04:18.200 --> 00:04:22.059
this would actually require
some formal justification.

00:04:22.059 --> 00:04:25.760
But I'm not going to
get into that.

00:04:25.760 --> 00:04:31.420
So here, the derivative with
respect to z-- this is

00:04:31.420 --> 00:04:33.030
actually z--

00:04:33.030 --> 00:04:35.520
is you use chain rule here.

00:04:35.520 --> 00:04:41.450
Px doesn't matter, because
it's not a function of z.

00:04:41.450 --> 00:04:48.046
So we have Fy evaluated at z
minus x according to the chain

00:04:48.046 --> 00:04:50.480
rule, and then the derivative of
the inner quantity, z minus

00:04:50.480 --> 00:04:52.180
x, which is just 1.

00:04:52.180 --> 00:04:55.170
So we don't need to put
anything there.

00:04:55.170 --> 00:04:59.490
And we get Px of x.

00:04:59.490 --> 00:05:00.490
So there we go.

00:05:00.490 --> 00:05:04.130
We've derived the PDF of z.

00:05:04.130 --> 00:05:07.650
Notice that this looks quite
similar to the convolution

00:05:07.650 --> 00:05:12.040
formula when you assume that
both X and Y are either

00:05:12.040 --> 00:05:13.690
continuous or discrete.

00:05:13.690 --> 00:05:18.710
And so that tells us that
this looks right.

00:05:18.710 --> 00:05:25.390
So in summary, we've basically
computed the PDF of X plus Y

00:05:25.390 --> 00:05:29.300
where X is discrete and
Y is continuous.

00:05:29.300 --> 00:05:32.120
And we've used the standard
two-step approach--

00:05:32.120 --> 00:05:35.950
compute the CDF and then take
the derivative to get the PDF.