1
00:00:00,000 --> 00:00:00,490
2
00:00:00,490 --> 00:00:04,410
In this video, we're going to
do an example in which we
3
00:00:04,410 --> 00:00:09,090
derive the probability density
function of the sum of two
4
00:00:09,090 --> 00:00:10,630
random variables.
5
00:00:10,630 --> 00:00:12,550
The problem tells us
the following.
6
00:00:12,550 --> 00:00:16,870
We're given that X and Y are
independent random variables.
7
00:00:16,870 --> 00:00:20,035
X is a discrete random
variable with PMF Px.
8
00:00:20,035 --> 00:00:23,620
Y is continuous with PDF Fy.
9
00:00:23,620 --> 00:00:26,760
And we'd like to compute the PDF
of Z which is equal to X
10
00:00:26,760 --> 00:00:30,750
plus Y. We're going to use the
standard approach here--
11
00:00:30,750 --> 00:00:33,920
compute the CDF of Z
and then take the
12
00:00:33,920 --> 00:00:37,060
derivative to get the PDF.
13
00:00:37,060 --> 00:00:49,250
So in this case, the CDF, which
is Fz, by definition is
14
00:00:49,250 --> 00:00:51,880
the random variable Z being
less than little z.
15
00:00:51,880 --> 00:01:00,860
But Z is just X plus Y. So now,
we'd actually like to,
16
00:01:00,860 --> 00:01:03,890
instead of having to deal with
two random variables, X and Y,
17
00:01:03,890 --> 00:01:06,130
we'd like to deal with
one at a time.
18
00:01:06,130 --> 00:01:12,700
And the total probability
theorem allows us to do this
19
00:01:12,700 --> 00:01:16,070
by conditioning on one of the
two random variables.
20
00:01:16,070 --> 00:01:18,720
Conditioning on Y here is a
bit tricky, because Y is
21
00:01:18,720 --> 00:01:22,160
continuous, and you have to be
careful with your definitions.
22
00:01:22,160 --> 00:01:25,290
So conditioning on X seems
like the way to go.
23
00:01:25,290 --> 00:01:26,540
So let's do that.
24
00:01:26,540 --> 00:01:38,280
25
00:01:38,280 --> 00:01:41,500
This is just the probability
that X equals little x, which
26
00:01:41,500 --> 00:01:46,270
is exactly equal to the PMF
of X evaluated at x.
27
00:01:46,270 --> 00:01:50,770
28
00:01:50,770 --> 00:01:57,570
Now we're given we're fixing
X equal to little x.
29
00:01:57,570 --> 00:02:00,320
So we can actually replace every
instance of the random
30
00:02:00,320 --> 00:02:01,570
variable with little x.
31
00:02:01,570 --> 00:02:13,860
32
00:02:13,860 --> 00:02:16,630
And now I'm going to just
rearrange this so that it
33
00:02:16,630 --> 00:02:17,610
looks a little nicer.
34
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
35
00:02:21,770 --> 00:02:29,420
minus x, where z minus
x is just a constant.
36
00:02:29,420 --> 00:02:32,820
Now, remember that X and
Y are independent.
37
00:02:32,820 --> 00:02:37,120
So telling us something about X
shouldn't change our beliefs
38
00:02:37,120 --> 00:02:39,920
about Y. So in this case,
we can actually drop the
39
00:02:39,920 --> 00:02:41,170
conditioning.
40
00:02:41,170 --> 00:02:51,140
41
00:02:51,140 --> 00:02:55,293
And this is exactly the CDF of
Y evaluated at z minus x.
42
00:02:55,293 --> 00:02:59,990
43
00:02:59,990 --> 00:03:05,710
So now we've simplified
as far as we could.
44
00:03:05,710 --> 00:03:08,330
So let's take the derivative and
see where that takes us.
45
00:03:08,330 --> 00:03:13,230
46
00:03:13,230 --> 00:03:19,250
So the PDF of Z is, by
definition, the derivative of
47
00:03:19,250 --> 00:03:27,850
the CDF, which we just
computed here.
48
00:03:27,850 --> 00:03:36,723
This is sum over x
Fy z minus x Px.
49
00:03:36,723 --> 00:03:38,940
What next?
50
00:03:38,940 --> 00:03:41,375
Interchange the derivative
and the summation.
51
00:03:41,375 --> 00:03:51,920
52
00:03:51,920 --> 00:03:54,690
And a note of caution here.
53
00:03:54,690 --> 00:03:57,960
54
00:03:57,960 --> 00:04:02,200
So if x took on a finite number
of values, you'd have a
55
00:04:02,200 --> 00:04:04,260
finite number of terms here.
56
00:04:04,260 --> 00:04:07,030
And this would be completely
valid.
57
00:04:07,030 --> 00:04:10,050
You can just do this.
58
00:04:10,050 --> 00:04:13,440
But if x took on, for
example, a countably
59
00:04:13,440 --> 00:04:15,000
infinite number of values--
60
00:04:15,000 --> 00:04:18,200
a geometric random variable,
for example--
61
00:04:18,200 --> 00:04:22,059
this would actually require
some formal justification.
62
00:04:22,059 --> 00:04:25,760
But I'm not going to
get into that.
63
00:04:25,760 --> 00:04:31,420
So here, the derivative with
respect to z-- this is
64
00:04:31,420 --> 00:04:33,030
actually z--
65
00:04:33,030 --> 00:04:35,520
is you use chain rule here.
66
00:04:35,520 --> 00:04:41,450
Px doesn't matter, because
it's not a function of z.
67
00:04:41,450 --> 00:04:48,046
So we have Fy evaluated at z
minus x according to the chain
68
00:04:48,046 --> 00:04:50,480
rule, and then the derivative of
the inner quantity, z minus
69
00:04:50,480 --> 00:04:52,180
x, which is just 1.
70
00:04:52,180 --> 00:04:55,170
So we don't need to put
anything there.
71
00:04:55,170 --> 00:04:59,490
And we get Px of x.
72
00:04:59,490 --> 00:05:00,490
So there we go.
73
00:05:00,490 --> 00:05:04,130
We've derived the PDF of z.
74
00:05:04,130 --> 00:05:07,650
Notice that this looks quite
similar to the convolution
75
00:05:07,650 --> 00:05:12,040
formula when you assume that
both X and Y are either
76
00:05:12,040 --> 00:05:13,690
continuous or discrete.
77
00:05:13,690 --> 00:05:18,710
And so that tells us that
this looks right.
78
00:05:18,710 --> 00:05:25,390
So in summary, we've basically
computed the PDF of X plus Y
79
00:05:25,390 --> 00:05:29,300
where X is discrete and
Y is continuous.
80
00:05:29,300 --> 00:05:32,120
And we've used the standard
two-step approach--
81
00:05:32,120 --> 00:05:35,950
compute the CDF and then take
the derivative to get the PDF.
82
00:05:35,950 --> 00:05:37,200