WEBVTT

00:00:01.245 --> 00:00:04.350
Hi, In this problem, we'll
be looking at the PDF the

00:00:04.350 --> 00:00:06.660
absolute value of x.

00:00:06.660 --> 00:00:10.330
So if we know a random variable,
x, and we know it's

00:00:10.330 --> 00:00:14.180
PDF, how can we use that
information to help us find

00:00:14.180 --> 00:00:16.280
the PDF of another random
variable-- the

00:00:16.280 --> 00:00:18.090
absolute value of x?

00:00:18.090 --> 00:00:21.210
And so throughout this problem,
we'll define a new

00:00:21.210 --> 00:00:22.450
random variable called y.

00:00:22.450 --> 00:00:26.100
And we'll define that y to be
equal to the absolute value of

00:00:26.100 --> 00:00:28.950
x, just to make things
simpler.

00:00:28.950 --> 00:00:32.439
So we'll do a couple of concrete
examples, and then

00:00:32.439 --> 00:00:34.320
we'll try to generalize
at the end.

00:00:34.320 --> 00:00:36.830
The first example that we'll
deal with in part A is

00:00:36.830 --> 00:00:39.040
this PDF for x.

00:00:39.040 --> 00:00:43.000
So we're told that the PDF of
x is 1/3 between negative 2

00:00:43.000 --> 00:00:45.650
and 1, and 0 otherwise.

00:00:45.650 --> 00:00:47.420
And here's a picture of
what it looks like.

00:00:47.420 --> 00:00:52.110
It's just a rectangle from
negative 2 to 1.

00:00:52.110 --> 00:00:55.220
So now we want to find out
what is the PDF of the

00:00:55.220 --> 00:00:58.140
absolute value of x, which
we've called y?

00:00:58.140 --> 00:01:02.210
And at this point, it may be
helpful to step back and think

00:01:02.210 --> 00:01:05.940
about this problem from the
discrete point of view again.

00:01:05.940 --> 00:01:09.980
So if x were a discrete random
variable, the problem would

00:01:09.980 --> 00:01:15.310
be, what is the probability that
the absolute value of x

00:01:15.310 --> 00:01:18.480
is equal to, say, 1/2?

00:01:18.480 --> 00:01:20.840
Well, the probability that
the absolute value of

00:01:20.840 --> 00:01:22.480
x is equal to 1/2--

00:01:22.480 --> 00:01:25.090
that can occur in two
different ways.

00:01:25.090 --> 00:01:28.610
One is that x itself is 1/2.

00:01:28.610 --> 00:01:32.810
Or x could be negative 1/2, in
which case, the absolute value

00:01:32.810 --> 00:01:35.030
of x would still be 1/2.

00:01:35.030 --> 00:01:37.740
So those two events are
mutually exclusive.

00:01:37.740 --> 00:01:41.460
And so the probability of either
one of them happening

00:01:41.460 --> 00:01:43.010
is you can just add them up.

00:01:43.010 --> 00:01:46.190
And so the probability of the
absolute value of x being 1/2

00:01:46.190 --> 00:01:50.440
would have two contributions,
one from x being 1/2, and one

00:01:50.440 --> 00:01:52.030
from x being negative 1/2.

00:01:54.650 --> 00:01:57.280
The analogous idea carries over
to the continuous case,

00:01:57.280 --> 00:01:58.600
when you have a PDF.

00:01:58.600 --> 00:02:02.260
So now let's say that we're
interested in the case where

00:02:02.260 --> 00:02:06.620
we want to know the
PDF of y at 1/2.

00:02:06.620 --> 00:02:11.680
Well, that again, is going to
have two contributions, one

00:02:11.680 --> 00:02:18.410
from where x is 1/2, and one
from where x is minus 1/2.

00:02:18.410 --> 00:02:23.980
And so you can just imagine that
each one of these values

00:02:23.980 --> 00:02:26.990
for y-- and remember, y has to
be non-negative, because it's

00:02:26.990 --> 00:02:28.830
an absolute value--

00:02:28.830 --> 00:02:34.470
has two contributions, one from
the right side of 0, and

00:02:34.470 --> 00:02:38.490
one from the left, or
negative, side of 0.

00:02:38.490 --> 00:02:41.800
So you can come up and write
an algebraic expression for

00:02:41.800 --> 00:02:45.670
this, and we'll do that in Part
C. But you can also look

00:02:45.670 --> 00:02:48.500
at this from a visual
point of view.

00:02:48.500 --> 00:02:53.570
And you can take the PDF diagram
itself and imagine

00:02:53.570 --> 00:02:56.410
transforming it to find out what
the PDF of the absolute

00:02:56.410 --> 00:02:58.220
value of x would look like.

00:02:58.220 --> 00:03:03.110
So the way to do it would be
you take what's on the

00:03:03.110 --> 00:03:04.690
negative side.

00:03:04.690 --> 00:03:08.290
You flip it over and take the
mirror image, and then you

00:03:08.290 --> 00:03:11.350
stack it on top of what you have
on the right-hand side,

00:03:11.350 --> 00:03:13.700
or the positive side.

00:03:13.700 --> 00:03:15.750
So take this, flip it over,
and stack it on top.

00:03:15.750 --> 00:03:18.310
You can imagine just taking this
block, flipping it over.

00:03:18.310 --> 00:03:22.230
And just think of it as like a
Tetris block that's falling

00:03:22.230 --> 00:03:23.470
down from above.

00:03:23.470 --> 00:03:26.050
And it stacks on top of
wherever it lands.

00:03:26.050 --> 00:03:28.520
So it'll turn it into something

00:03:28.520 --> 00:03:29.770
that looks like this.

00:03:38.490 --> 00:03:46.490
So there's already a block of
height 1/3 from 0 to 1.

00:03:46.490 --> 00:03:47.460
That's from the original 1.

00:03:47.460 --> 00:03:50.530
And now we take this, and flip
it over, and drop it on top.

00:03:50.530 --> 00:03:56.110
Well, this part is going to
fall on top of the segment

00:03:56.110 --> 00:03:57.320
from 0 to 1.

00:03:57.320 --> 00:04:00.090
And then this part gets
flipped over and

00:04:00.090 --> 00:04:01.070
dropped over here.

00:04:01.070 --> 00:04:03.290
And it falls down here.

00:04:03.290 --> 00:04:09.610
And so the final PDF actually
looks like this kind of

00:04:09.610 --> 00:04:15.400
staircase, where this is 2/3
now, because this has two

00:04:15.400 --> 00:04:17.640
contributions of 1/3 each,
and this is 1/3.

00:04:20.839 --> 00:04:26.090
So that is the graphical way
of approaching this.

00:04:26.090 --> 00:04:37.750
And the PDF for completeness,
the PDF of y would be 2/3 for

00:04:37.750 --> 00:04:51.440
y between 0 and 1, 1/3 for y
from 1 to 2, and 0 otherwise.

00:04:56.650 --> 00:04:59.615
All right, so let's move
on to part B, and

00:04:59.615 --> 00:05:00.540
get some more practice.

00:05:00.540 --> 00:05:07.210
Part B, we're given that this
PDF of x now is 2 times e to

00:05:07.210 --> 00:05:10.810
the negative 2x for x positive,
and 0 otherwise.

00:05:10.810 --> 00:05:14.030
Now you may just recognize this
as an exponential random

00:05:14.030 --> 00:05:17.100
variable with a parameter
of 2.

00:05:17.100 --> 00:05:19.480
And again, we can graph this
and see what it looks like.

00:05:22.640 --> 00:05:29.240
And it turns out that it's going
to start out at 2 and

00:05:29.240 --> 00:05:30.490
fall off exponentially.

00:05:32.520 --> 00:05:34.990
So in this case, this is
actually quite simple.

00:05:34.990 --> 00:05:40.280
Because if you look at it,
x is already positive.

00:05:40.280 --> 00:05:41.930
It doesn't have any
negative parts.

00:05:41.930 --> 00:05:46.240
So in fact, the absolute value
of x is the same as x itself,

00:05:46.240 --> 00:05:49.070
because x is never negative.

00:05:49.070 --> 00:05:54.620
And so y is just the
same thing as x.

00:05:54.620 --> 00:06:00.360
And so in this case, actually,
the PDF of y is exactly the

00:06:00.360 --> 00:06:01.860
same as the PDF of x.

00:06:01.860 --> 00:06:06.960
It's just 2e to the
minus 2y, for y

00:06:06.960 --> 00:06:11.030
positive and zero otherwise.

00:06:11.030 --> 00:06:16.690
Now you can also see this
graphically also, because to

00:06:16.690 --> 00:06:20.630
the left of 0, the negative
part, there is no PDF.

00:06:20.630 --> 00:06:21.470
The PDF is 0.

00:06:21.470 --> 00:06:24.460
And so if you were to take this,
flip it over, and drop

00:06:24.460 --> 00:06:27.090
it on top, you wouldn't get
anything, because there's

00:06:27.090 --> 00:06:27.590
nothing there.

00:06:27.590 --> 00:06:32.610
And so the entire PDF, even
after you take the absolute

00:06:32.610 --> 00:06:35.660
value, is just the
original one.

00:06:35.660 --> 00:06:42.180
So to generalize, what I said
at the beginning was that,

00:06:42.180 --> 00:06:50.910
remember, the probability in
the discrete case, if you

00:06:50.910 --> 00:06:53.520
wanted the probability that the
absolute value of a random

00:06:53.520 --> 00:06:59.630
variable equals something,
that would just be the

00:06:59.630 --> 00:07:04.400
probability that the random
variable equals that value of

00:07:04.400 --> 00:07:10.160
little x, or the random
variable equals

00:07:10.160 --> 00:07:15.450
negative little x.

00:07:15.450 --> 00:07:17.870
In either of those two
cases, the absolute

00:07:17.870 --> 00:07:19.400
value would equal x.

00:07:19.400 --> 00:07:20.980
So you get those two
contributions.

00:07:20.980 --> 00:07:24.300
And so to generalize in the
continuous case with PDFs, you

00:07:24.300 --> 00:07:26.450
get something that looks
very similar.

00:07:26.450 --> 00:07:39.790
So in this case, the PDF or y
is just the PDF of x at y.

00:07:39.790 --> 00:07:48.426
So this is the case where x is
just equal to y, plus the PDF

00:07:48.426 --> 00:07:50.650
of x evaluated negative y.

00:07:50.650 --> 00:07:54.700
So you, again, have both of
these two contributions.

00:07:54.700 --> 00:08:00.030
And we can rewrite this
top one to make

00:08:00.030 --> 00:08:03.020
it look more similar.

00:08:03.020 --> 00:08:08.840
So the PMF of some discrete
[? number ?] y, where this is

00:08:08.840 --> 00:08:10.580
a discrete random variable
that's equal to the absolute

00:08:10.580 --> 00:08:15.760
value of x, would be the PMF of
x evaluated at y, plus the

00:08:15.760 --> 00:08:19.120
PMF of x evaluated
at negative y.

00:08:19.120 --> 00:08:21.790
So in both the discrete and
continuous cases, you have the

00:08:21.790 --> 00:08:24.040
same thing.

00:08:24.040 --> 00:08:29.380
So the overall summary of this
problem is that, when you take

00:08:29.380 --> 00:08:30.070
a transformation--

00:08:30.070 --> 00:08:31.540
in this case, an absolute
value--

00:08:31.540 --> 00:08:34.659
you can reason about it and
figure out how to decompose

00:08:34.659 --> 00:08:37.720
that into arguments about the
original random variable, just

00:08:37.720 --> 00:08:38.760
plain old x.

00:08:38.760 --> 00:08:43.159
And for the specific case of
the absolute value, it just

00:08:43.159 --> 00:08:47.320
becomes taking a mirror image
and popping it on top of what

00:08:47.320 --> 00:08:48.280
you originally had.

00:08:48.280 --> 00:08:50.780
So remember, you always have
these two contributions.

00:08:50.780 --> 00:08:53.810
And so if you ever have a random
variable that you need

00:08:53.810 --> 00:08:55.880
to take an absolute value of,
you don't have to be scared.

00:08:55.880 --> 00:08:58.790
All you have to do is consider
both of these contributions

00:08:58.790 --> 00:09:02.982
and add them up, and you have
the PDF that you want.

00:09:02.982 --> 00:09:04.232
So I'll see you next time.