WEBVTT

00:00:00.390 --> 00:00:01.370
Hi.

00:00:01.370 --> 00:00:03.330
In this problem, we're going
to get a bunch of practice

00:00:03.330 --> 00:00:05.710
working with multiple random
variables together.

00:00:05.710 --> 00:00:09.200
And so we'll look at joint
PDFs, marginal PDFs,

00:00:09.200 --> 00:00:12.000
conditional PDFs, and also get
some practice calculating

00:00:12.000 --> 00:00:14.420
expectations as well.

00:00:14.420 --> 00:00:20.800
So the problem gives us a pair
of random variables-- x and y.

00:00:20.800 --> 00:00:25.340
And we're told that the joint
distribution is uniformly

00:00:25.340 --> 00:00:31.010
distributed on this triangle
here, with the vertices being

00:00:31.010 --> 00:00:34.180
0, 0 1, 0, and 0, 1.

00:00:34.180 --> 00:00:37.180
So it's uniform in
this triangle.

00:00:37.180 --> 00:00:39.640
And the first part of the
problem is just to figure out

00:00:39.640 --> 00:00:45.280
what exactly is disjoint PDF of
the two random variables.

00:00:45.280 --> 00:00:48.720
So in this case, it's pretty
easy to calculate, because we

00:00:48.720 --> 00:00:50.320
have a uniform distribution.

00:00:50.320 --> 00:00:52.710
And remember, when you have a
uniform distribution, you can

00:00:52.710 --> 00:00:55.540
just imagine it being
a sort of plateau

00:00:55.540 --> 00:00:56.720
coming out of the board.

00:00:56.720 --> 00:00:57.800
And it's flat.

00:00:57.800 --> 00:01:01.827
And so the height of the
plateau, in order to calculate

00:01:01.827 --> 00:01:04.849
it, you just need to figure
out what the area of this

00:01:04.849 --> 00:01:06.630
thing is, of this triangle is.

00:01:06.630 --> 00:01:09.010
So remember, when you had single
random variables, what

00:01:09.010 --> 00:01:13.380
we had to do was calculate, for
uniform distribution, we

00:01:13.380 --> 00:01:14.910
had to integrate to 1.

00:01:14.910 --> 00:01:17.860
So you took the length, and you
took 1 over the length was

00:01:17.860 --> 00:01:19.770
the correct scaling factor.

00:01:19.770 --> 00:01:24.460
Here, you take the area.

00:01:24.460 --> 00:01:28.610
And the height has to make it so
that the entire volume here

00:01:28.610 --> 00:01:30.520
integrates to 1.

00:01:30.520 --> 00:01:33.810
So the joint PDF is just
going to be 1 over

00:01:33.810 --> 00:01:34.960
whatever this area is.

00:01:34.960 --> 00:01:36.550
And the area is pretty
simple to calculate.

00:01:36.550 --> 00:01:38.480
It's 1/2 base times height.

00:01:38.480 --> 00:01:40.390
So it's 1/2.

00:01:40.390 --> 00:01:42.960
And so what we have is
that the area is 1/2.

00:01:42.960 --> 00:01:52.100
And so the joint PDF of x and
y is going to equal 2.

00:01:52.100 --> 00:01:56.320
But remember, you always have
to be careful when writing

00:01:56.320 --> 00:01:58.860
these things to remember
the ranges when

00:01:58.860 --> 00:02:00.930
these things are valid.

00:02:00.930 --> 00:02:03.690
So it's only 2 within
this triangle.

00:02:03.690 --> 00:02:05.650
And outside of the
triangle, it's 0.

00:02:05.650 --> 00:02:09.070
So what exactly does inside
the triangle mean?

00:02:09.070 --> 00:02:12.510
Well, we can write it
more mathematically.

00:02:12.510 --> 00:02:19.980
So this diagonal line, it's
given by x plus y equals 1.

00:02:19.980 --> 00:02:23.890
So everything in the triangle
is really x plus y is less

00:02:23.890 --> 00:02:24.490
than or equal to 1.

00:02:24.490 --> 00:02:26.680
It means everything under
this triangle.

00:02:26.680 --> 00:02:30.660
And so we need x plus y to be
less then or equal to 1 and

00:02:30.660 --> 00:02:33.305
also x to be non-negative and
y to be non-negative.

00:02:36.400 --> 00:02:39.830
So with these inequalities,
that captures everything

00:02:39.830 --> 00:02:41.020
within this triangle.

00:02:41.020 --> 00:02:47.020
And otherwise, the joint
PDF is going to be 0.

00:02:49.890 --> 00:02:54.280
The next part asks us to find,
using this joint PDF, the

00:02:54.280 --> 00:02:56.140
marginal of y.

00:02:56.140 --> 00:02:59.600
And remember, when you have
a joint PDF of two random

00:02:59.600 --> 00:03:01.580
variables, you essentially have
everything that you need,

00:03:01.580 --> 00:03:03.620
because from this joint PDF, you
can calculate marginals,

00:03:03.620 --> 00:03:05.840
you can calculate from the
margins, you can calculate

00:03:05.840 --> 00:03:07.980
conditionals.

00:03:07.980 --> 00:03:10.000
The joint PDF captures
everything that there is to

00:03:10.000 --> 00:03:13.980
know about this pair of
random variables.

00:03:13.980 --> 00:03:17.620
Now, to calculate a marginal PDF
of y, remember a marginal

00:03:17.620 --> 00:03:20.880
really just means collapsing
the other

00:03:20.880 --> 00:03:22.300
random variable down.

00:03:22.300 --> 00:03:24.770
And so you can just imagine
taking this thing and

00:03:24.770 --> 00:03:28.460
collapsing it down
onto the y-axis.

00:03:28.460 --> 00:03:33.900
And mathematically, that is just
saying that we integrate

00:03:33.900 --> 00:03:38.710
out the other random variable.

00:03:41.250 --> 00:03:43.910
So the other random variable
in this case will be x.

00:03:43.910 --> 00:03:47.020
We take x and we get rid of
it by integrating out from

00:03:47.020 --> 00:03:49.640
negative infinity to infinity.

00:03:49.640 --> 00:04:01.130
Of course, this joint PDF
is 0 in a lot of places.

00:04:01.130 --> 00:04:04.240
And so a lot of these
will be 0.

00:04:04.240 --> 00:04:07.710
And only for a certain range
of x's will this integral

00:04:07.710 --> 00:04:10.330
actually be non-zero.

00:04:10.330 --> 00:04:13.740
And so again, the other time
when we have to be careful is

00:04:13.740 --> 00:04:16.500
when we have these limits of
integration, we need to make

00:04:16.500 --> 00:04:18.720
sure that we have the
right limits.

00:04:18.720 --> 00:04:22.150
And so we know that the
joint PDF is 2.

00:04:22.150 --> 00:04:25.010
It's nonzero only within
this triangle.

00:04:25.010 --> 00:04:33.810
And so it's only 2 within
this triangle, which

00:04:33.810 --> 00:04:36.130
means what for x?

00:04:36.130 --> 00:04:39.120
Well, depending on what
x and y are, this will

00:04:39.120 --> 00:04:41.380
be either 2 or 0.

00:04:41.380 --> 00:04:44.360
So let's just fix
some value of y.

00:04:44.360 --> 00:04:49.550
Pretend that we've picked some
value y, let's say here.

00:04:49.550 --> 00:04:52.170
We want this value of y.

00:04:52.170 --> 00:04:56.660
Well, what are the values of x
such that the joint PDF for

00:04:56.660 --> 00:05:00.950
that value y is actually
nonzero, it's actually 2?

00:05:00.950 --> 00:05:05.310
Well, it's everything from
x equals 0 to whatever

00:05:05.310 --> 00:05:06.520
x value this is.

00:05:06.520 --> 00:05:09.680
But this x value, actually, if
you think about it, is just 1

00:05:09.680 --> 00:05:13.840
minus y, because this line
is x plus y equals 1.

00:05:13.840 --> 00:05:17.880
So whatever y is, x is going
to be 1 minus that.

00:05:17.880 --> 00:05:21.010
And so the correct limits
would actually be from

00:05:21.010 --> 00:05:23.040
0 to 1 minus y.

00:05:26.120 --> 00:05:28.890
And then the rest of that
is pretty simple.

00:05:28.890 --> 00:05:29.850
You integrate this.

00:05:29.850 --> 00:05:31.650
This is a pretty simple
integral.

00:05:31.650 --> 00:05:35.570
And you get that it's actually
two times 1 minus y.

00:05:35.570 --> 00:05:36.820
That's a y.

00:05:40.930 --> 00:05:46.340
But of course, again, we need to
make sure that we have the

00:05:46.340 --> 00:05:48.260
right regions.

00:05:48.260 --> 00:05:51.590
So this is not always true
for y, of course.

00:05:51.590 --> 00:05:58.380
This is only true for
y between 0 and 1.

00:05:58.380 --> 00:06:04.690
And otherwise, it's actually 0,
because when you take a y

00:06:04.690 --> 00:06:08.890
down here, well, there's no
values of x that will give you

00:06:08.890 --> 00:06:10.550
a nonzero joint PDF.

00:06:10.550 --> 00:06:13.000
And if you take a value of y
higher than this, the same

00:06:13.000 --> 00:06:14.250
thing happens.

00:06:16.610 --> 00:06:18.900
So we can actually draw
this out and see

00:06:18.900 --> 00:06:20.720
what it looks like.

00:06:20.720 --> 00:06:25.480
So let's actually draw
a small picture here.

00:06:25.480 --> 00:06:27.440
Here's y.

00:06:27.440 --> 00:06:29.900
Here's the marginal PDF of y.

00:06:29.900 --> 00:06:32.530
And here's 2.

00:06:32.530 --> 00:06:34.123
And it actually looks
like this.

00:06:34.123 --> 00:06:40.760
It's a triangle and a 0
outside this range.

00:06:40.760 --> 00:06:42.010
So does that make sense?

00:06:42.010 --> 00:06:49.870
Well, first of all, you see
that actually does in fact

00:06:49.870 --> 00:06:51.730
integrates to 1,
which is good.

00:06:51.730 --> 00:06:57.980
And the other thing we notice
is that there is a higher

00:06:57.980 --> 00:07:00.010
density for smaller
values of y.

00:07:00.010 --> 00:07:00.950
So why is that?

00:07:00.950 --> 00:07:03.500
Why are smaller values
of y more likely than

00:07:03.500 --> 00:07:04.720
larger values of y?

00:07:04.720 --> 00:07:06.830
Well, because when you have
smaller values of

00:07:06.830 --> 00:07:10.770
y, you're down here.

00:07:10.770 --> 00:07:14.520
And it's more likely because
there are more values of x

00:07:14.520 --> 00:07:18.400
that go along with it that
make that value of y more

00:07:18.400 --> 00:07:19.350
likely to appear.

00:07:19.350 --> 00:07:21.630
Say you have a large
value of y.

00:07:21.630 --> 00:07:22.850
Then you're up here
at the tip.

00:07:22.850 --> 00:07:25.660
Well, there aren't very many
combinations of x and y that

00:07:25.660 --> 00:07:28.010
give you that large
a value of y.

00:07:28.010 --> 00:07:31.700
And so that large value of
y becomes less likely.

00:07:31.700 --> 00:07:33.420
Another way to think about it
is, when you collapse this

00:07:33.420 --> 00:07:38.440
down, there's a lot more stuff
to collapse down its base.

00:07:38.440 --> 00:07:40.560
There's a lot of x's
to collapse down.

00:07:40.560 --> 00:07:44.175
But up here, there's only a
very little bit of x to

00:07:44.175 --> 00:07:44.550
collapse down.

00:07:44.550 --> 00:07:49.280
And the PDF of y becomes
more skewed towards

00:07:49.280 --> 00:07:50.530
smaller values of y.

00:07:55.450 --> 00:07:59.560
So now, the next thing that we
want to do is calculate the

00:07:59.560 --> 00:08:02.850
conditional PDF of x, given y.

00:08:02.850 --> 00:08:07.490
Well, let's just recall
what that means.

00:08:07.490 --> 00:08:09.480
This is what we're looking for--
the conditional PDF of

00:08:09.480 --> 00:08:11.490
x, given y.

00:08:11.490 --> 00:08:17.380
And remember, this is calculated
by taking the joint

00:08:17.380 --> 00:08:19.180
and dividing by the
marginal of y.

00:08:22.220 --> 00:08:25.460
So we actually have the
top and the bottom.

00:08:25.460 --> 00:08:28.760
We have to joint PDF from part
A. And from part B, we

00:08:28.760 --> 00:08:30.630
calculated the marginal
PDF of y.

00:08:30.630 --> 00:08:33.309
So we have both pieces.

00:08:33.309 --> 00:08:38.230
So let's actually
plug them in.

00:08:38.230 --> 00:08:42.450
Again, the thing that you have
to be careful here is about

00:08:42.450 --> 00:08:46.410
the ranges of x and y where
these things are valid,

00:08:46.410 --> 00:08:50.770
because this is only non-zero
when x and y

00:08:50.770 --> 00:08:52.410
fall within this triangle.

00:08:52.410 --> 00:08:57.070
And this is only non-zero when
y is between 0 and 1.

00:08:57.070 --> 00:08:59.510
So we need to be careful.

00:08:59.510 --> 00:09:03.360
So the top, when it's
non-zero, it's 2.

00:09:03.360 --> 00:09:06.720
And the bottom, when it's
non-zero, it's 2

00:09:06.720 --> 00:09:08.790
times 1 minus y.

00:09:08.790 --> 00:09:14.270
So we can simplify that to
be 1 over 1 minus y.

00:09:14.270 --> 00:09:16.250
And when is this true?

00:09:16.250 --> 00:09:23.240
Well, it's true when x and y are
in the triangle and y is

00:09:23.240 --> 00:09:26.040
between 0 and 1.

00:09:26.040 --> 00:09:30.400
So put another way, that means
that this is valid when y is

00:09:30.400 --> 00:09:50.380
between 0 and 1 and x is between
0 and 1 minus y,

00:09:50.380 --> 00:09:54.540
because whatever x has to be,
it has to be such that they

00:09:54.540 --> 00:09:57.860
actually still fall within
this triangle.

00:09:57.860 --> 00:10:03.150
And outside of this, it's 0.

00:10:06.690 --> 00:10:09.970
So let's see what this
actually looks like.

00:10:14.710 --> 00:10:21.140
So this is x, and this is the
conditional PDF of x, given y.

00:10:24.160 --> 00:10:25.410
Let's say this is
1 right here.

00:10:33.100 --> 00:10:37.480
Then what it's saying is, let's
say we're given that y

00:10:37.480 --> 00:10:38.280
is some little y.

00:10:38.280 --> 00:10:41.810
Let's say it's somewhere here.

00:10:41.810 --> 00:10:46.050
Then it's saying that the
conditional PDF of x given y

00:10:46.050 --> 00:10:47.350
is this thing.

00:10:47.350 --> 00:10:50.790
But notice that this value,
1 over 1 minus y, does not

00:10:50.790 --> 00:10:52.030
depend on x.

00:10:52.030 --> 00:10:56.090
So in fact, it actually
is uniform.

00:10:56.090 --> 00:11:03.360
So it's uniform between
0 and 1 minus y.

00:11:03.360 --> 00:11:11.560
And the height is something
like 1 over 1 minus y.

00:11:11.560 --> 00:11:15.810
And this is so that the scaling
makes it so that

00:11:15.810 --> 00:11:23.100
actually is a valid PDF, because
the integral is to 1.

00:11:23.100 --> 00:11:25.030
So why is the case?

00:11:25.030 --> 00:11:28.340
Why is that when you condition
on y being some value, you get

00:11:28.340 --> 00:11:32.690
that the PDF of x is
actually uniform?

00:11:32.690 --> 00:11:35.370
Well, when you look over here,
let's again just pretend that

00:11:35.370 --> 00:11:37.070
you're taking this value of y.

00:11:37.070 --> 00:11:41.290
Well, when you're conditioning
on y being this value, you're

00:11:41.290 --> 00:11:45.640
basically taking a slice of this
joint PDF at this point.

00:11:45.640 --> 00:11:49.350
But remember, the original
joint PDF was uniform.

00:11:49.350 --> 00:11:52.830
So when you take a slice of a
uniform distribution, joint

00:11:52.830 --> 00:11:54.070
uniform distribution,
you still get

00:11:54.070 --> 00:11:55.480
something that is uniform.

00:11:55.480 --> 00:11:59.300
Just imagine that you have
a cake that is flat.

00:11:59.300 --> 00:12:02.080
Now, you take a slice
at this level.

00:12:02.080 --> 00:12:05.810
Then whatever slice you have
is also going to be imagine

00:12:05.810 --> 00:12:08.320
being a flat rectangle.

00:12:08.320 --> 00:12:10.520
So it's still going
to be uniform.

00:12:10.520 --> 00:12:13.840
And that's why the conditional
PDF of x

00:12:13.840 --> 00:12:15.100
given y is also uniform.

00:12:19.500 --> 00:12:25.780
Part D now asks us to find a
conditional expectation of x.

00:12:25.780 --> 00:12:30.000
So we want to find the
expectation of x, given that y

00:12:30.000 --> 00:12:33.320
is some little y.

00:12:33.320 --> 00:12:37.610
And for this, we can
use the definition.

00:12:37.610 --> 00:12:40.720
Remember, expectations are
really just weighted sums.

00:12:40.720 --> 00:12:44.210
Or in the [? continuous ?]
case, it's an integral.

00:12:44.210 --> 00:12:48.390
So you take the value.

00:12:48.390 --> 00:12:51.700
And then you weight
it by the density.

00:12:51.700 --> 00:12:54.410
And in this case, because we're
taking conditional a

00:12:54.410 --> 00:12:59.250
expectation, what we weight it
by is the conditional density.

00:12:59.250 --> 00:13:02.440
So it's the conditional
density of x given

00:13:02.440 --> 00:13:04.526
that y is little y.

00:13:04.526 --> 00:13:06.470
We integrate with
respect to x.

00:13:09.800 --> 00:13:12.440
And fortunately, we know what
this conditional PDF is,

00:13:12.440 --> 00:13:17.380
because we calculated it earlier
in part C. And we know

00:13:17.380 --> 00:13:18.530
that it's this--

00:13:18.530 --> 00:13:20.240
1 over 1 minus y.

00:13:20.240 --> 00:13:25.930
But again, we have to be
careful, because this formula,

00:13:25.930 --> 00:13:29.590
1 over 1 minus y, is only
valid certain cases.

00:13:29.590 --> 00:13:31.230
So let's think about
this first.

00:13:31.230 --> 00:13:32.620
Let's think about some
extreme cases.

00:13:32.620 --> 00:13:36.450
What if y, little
y, is negative?

00:13:36.450 --> 00:13:38.740
If little y is negative,
we're conditioning on

00:13:38.740 --> 00:13:41.480
something over here.

00:13:41.480 --> 00:13:48.620
And so there is no density for
y being negative or for y,

00:13:48.620 --> 00:13:51.640
say, in other cases when
y is greater than 1.

00:13:51.640 --> 00:13:54.790
And so in those cases, this
expectation is just undefined,

00:13:54.790 --> 00:13:57.780
because conditioning on that
doesn't really make sense,

00:13:57.780 --> 00:14:02.910
because there's no density
for those values of y.

00:14:02.910 --> 00:14:06.560
Now, let's consider the case
that actually makes, sense

00:14:06.560 --> 00:14:09.120
where y is between 0 and 1.

00:14:09.120 --> 00:14:12.500
Now, we're in business, because
that is the range

00:14:12.500 --> 00:14:15.010
where this formula is valid.

00:14:15.010 --> 00:14:17.870
So this formula is valid,
and we can plug it in.

00:14:17.870 --> 00:14:21.760
So it's 1 over 1 minus y dx.

00:14:21.760 --> 00:14:24.665
And then the final thing that we
again need to check is what

00:14:24.665 --> 00:14:27.270
the limits of this
integration is.

00:14:27.270 --> 00:14:29.610
So we're integrating
with respect to x.

00:14:29.610 --> 00:14:33.810
So we need to write down what
values of x, what ranges of x

00:14:33.810 --> 00:14:36.560
is this conditional PDF valid.

00:14:36.560 --> 00:14:39.070
Well, luckily, we specified
that here.

00:14:39.070 --> 00:14:43.072
x has to be between
0 and 1 minus y.

00:14:46.200 --> 00:14:52.310
So let's actually calculate
this integral.

00:14:52.310 --> 00:14:56.660
This 1 over 1 minus y is a
constant with respect to x.

00:14:56.660 --> 00:14:58.090
You can just pull that out.

00:14:58.090 --> 00:15:01.130
And then now, you're really
just integrating x from

00:15:01.130 --> 00:15:02.970
0 to 1 minus y.

00:15:02.970 --> 00:15:06.530
So the integral of x is
[? 1 ?], 1/2x squared.

00:15:06.530 --> 00:15:10.960
So you get a 1/2x squared, and
you integrate that from

00:15:10.960 --> 00:15:12.580
0 to 1 minus y.

00:15:12.580 --> 00:15:14.600
And so when you plug in
the limits, you'll

00:15:14.600 --> 00:15:18.200
get a 1 minus y squared.

00:15:18.200 --> 00:15:20.550
That will cancel out the
1 over 1 minus y.

00:15:20.550 --> 00:15:24.570
And what you're left with is
just 1 minus y over 2.

00:15:28.600 --> 00:15:31.780
And again, we have to specify
that this is only true for y

00:15:31.780 --> 00:15:34.650
between 0 and 1.

00:15:34.650 --> 00:15:39.720
Now, we can again actually
verify that this makes sense.

00:15:39.720 --> 00:15:42.450
What we're really looking for is
the conditional expectation

00:15:42.450 --> 00:15:44.870
of x given some value of y.

00:15:44.870 --> 00:15:47.750
And we already said that
condition on y being some

00:15:47.750 --> 00:15:50.800
value of x is uniformly
distributed between

00:15:50.800 --> 00:15:52.700
0 and 1 minus y.

00:15:52.700 --> 00:15:55.190
And so remember for our uniform
distribution, the

00:15:55.190 --> 00:15:56.140
expectation is simple.

00:15:56.140 --> 00:15:57.310
It's just the midpoint.

00:15:57.310 --> 00:16:00.550
So the midpoint of 0
and 1 minus y is

00:16:00.550 --> 00:16:02.350
exactly 1 minus y/2.

00:16:02.350 --> 00:16:05.340
So that's a nice way of
verifying that this answer is

00:16:05.340 --> 00:16:06.590
actually correct.

00:16:09.450 --> 00:16:15.740
Now, the second part of
part D asks us to do

00:16:15.740 --> 00:16:16.990
a little bit more.

00:16:20.060 --> 00:16:26.000
We have to use the total
expectation theorem in order

00:16:26.000 --> 00:16:29.510
to somehow write the expectation
of x in terms of

00:16:29.510 --> 00:16:30.760
the expectation of y.

00:16:33.560 --> 00:16:36.510
So the first thing we'll
do is use the

00:16:36.510 --> 00:16:37.880
total expectation theorem.

00:16:37.880 --> 00:16:41.630
So the total expectation theorem
is just saying, well,

00:16:41.630 --> 00:16:44.970
we can take these conditional
expectations.

00:16:44.970 --> 00:16:54.420
And now, we can integrate this
by the marginal density of y,

00:16:54.420 --> 00:16:58.080
then we'll get the actual
expectation of x.

00:16:58.080 --> 00:17:02.115
You can think of it as just kind
of applying the law of

00:17:02.115 --> 00:17:03.365
iterated expectations as well.

00:17:06.490 --> 00:17:12.990
So this integral is going
to look like this.

00:17:12.990 --> 00:17:17.329
You take the conditional
expectation.

00:17:17.329 --> 00:17:22.569
So this is the expectation of x
if y were equal to little y.

00:17:22.569 --> 00:17:26.260
And now, what is that
probability?

00:17:26.260 --> 00:17:30.370
Well, now we just multiply that
by the density of y at

00:17:30.370 --> 00:17:32.830
that actual value of little y.

00:17:32.830 --> 00:17:34.310
And we integrate with
respect to y.

00:17:37.470 --> 00:17:39.540
Now, we've already calculated
what this conditional

00:17:39.540 --> 00:17:40.700
expectation is.

00:17:40.700 --> 00:17:42.100
It's 1 minus y/2.

00:17:42.100 --> 00:17:45.430
So let's plug that in.

00:17:45.430 --> 00:17:49.680
1 minus y/2 times the
marginal of y.

00:17:55.540 --> 00:17:58.010
There's a couple ways of
attacking this problem now.

00:17:58.010 --> 00:18:00.310
One way is, we can actually
just plug in

00:18:00.310 --> 00:18:01.490
that marginal of y.

00:18:01.490 --> 00:18:06.710
We've already calculated that
out in part B. And then we can

00:18:06.710 --> 00:18:09.570
do this integral and calculate
out the expectation.

00:18:09.570 --> 00:18:13.230
But maybe we don't really want
to do so much calculus.

00:18:13.230 --> 00:18:15.190
So let's do what the
problem says and

00:18:15.190 --> 00:18:16.710
try a different approach.

00:18:16.710 --> 00:18:20.870
So what the problem suggests is
to write this in terms of

00:18:20.870 --> 00:18:22.450
the expectation of y.

00:18:22.450 --> 00:18:23.960
And what is the expectation
of y?

00:18:23.960 --> 00:18:28.370
Well, the expectation of y is
going to look something like

00:18:28.370 --> 00:18:33.010
the integral of y times
the marginal of y.

00:18:33.010 --> 00:18:35.220
So let's see if we can identify
something like that

00:18:35.220 --> 00:18:36.500
and pull it out.

00:18:36.500 --> 00:18:38.630
Well, yeah, we actually
do have that.

00:18:38.630 --> 00:18:42.070
We have y times the marginal
of y, integrated.

00:18:42.070 --> 00:18:44.700
So let's isolate that.

00:18:44.700 --> 00:18:48.660
So besides that, we
also have this.

00:18:48.660 --> 00:18:57.930
We have the integral of the
first term, is 1/2 times the

00:18:57.930 --> 00:18:59.320
marginal of y.

00:18:59.320 --> 00:19:04.320
And then the second term is
minus 1/2 times the integral

00:19:04.320 --> 00:19:10.580
of y of dy.

00:19:10.580 --> 00:19:13.000
This is just me splitting
this integral up into

00:19:13.000 --> 00:19:15.980
two separate integrals.

00:19:15.980 --> 00:19:17.690
Now, we know what this is.

00:19:17.690 --> 00:19:18.950
The 1/2 we can pull out.

00:19:18.950 --> 00:19:21.870
And then the rest of it is
just the integral of a

00:19:21.870 --> 00:19:24.540
marginal of a density from minus
infinity to infinity.

00:19:24.540 --> 00:19:27.810
And by definition, that
has to be equal to 1.

00:19:27.810 --> 00:19:32.250
So this just gives us a 1/2.

00:19:32.250 --> 00:19:33.820
And now, what is this?

00:19:33.820 --> 00:19:35.130
We get a minus 1/2.

00:19:35.130 --> 00:19:39.290
And now this, we already said
that is the expectation of y.

00:19:39.290 --> 00:19:44.060
So what we have is the
expectation of y.

00:19:44.060 --> 00:19:49.500
So in the second part of this
part D, we've expressed the

00:19:49.500 --> 00:19:53.050
expectation of x in terms
of the expectation of y.

00:19:53.050 --> 00:19:56.520
Now, maybe that seems like
that's not too helpful,

00:19:56.520 --> 00:19:59.710
because we don't know what
either of those two are.

00:19:59.710 --> 00:20:04.170
But if we think about this
problem, and as part E

00:20:04.170 --> 00:20:07.190
suggests, we can see that
there's symmetry in this

00:20:07.190 --> 00:20:12.420
problem, because x and y are
essentially symmetric.

00:20:12.420 --> 00:20:16.740
So imagine this is x equals y.

00:20:16.740 --> 00:20:20.430
There's symmetry in this
problem, because if you were

00:20:20.430 --> 00:20:24.530
to swap the roles of x and y,
you would have exactly the

00:20:24.530 --> 00:20:26.510
same joint PDF.

00:20:26.510 --> 00:20:31.660
So what that suggests is that
by symmetry then, it must be

00:20:31.660 --> 00:20:36.060
that the expectation of x and
the expectation of y are

00:20:36.060 --> 00:20:39.230
exactly the same.

00:20:39.230 --> 00:20:41.080
And that is using the
symmetry argument.

00:20:41.080 --> 00:20:45.850
And that helps us now, because
we can plug that in and solve

00:20:45.850 --> 00:20:46.920
for expectation of x.

00:20:46.920 --> 00:20:54.340
So expectation of x is 1/2 minus
1/2 expectation of x.

00:20:54.340 --> 00:21:00.860
So we have 3/2 expectation
of x equals 1/2.

00:21:00.860 --> 00:21:05.810
So expectation of
x equals 1/3.

00:21:05.810 --> 00:21:09.770
And of course, expectation
of y is also 1/3.

00:21:09.770 --> 00:21:14.970
And so it turns out that the
expectation is around there.

00:21:17.760 --> 00:21:21.220
So this problem had
several parts.

00:21:21.220 --> 00:21:26.120
And it allowed us to start
out from just a raw joint

00:21:26.120 --> 00:21:28.840
distribution, calculate
marginals, calculate

00:21:28.840 --> 00:21:31.650
conditionals, and then from
there, calculate all kinds of

00:21:31.650 --> 00:21:34.530
conditional expectations
and expectations.

00:21:34.530 --> 00:21:39.020
And a couple of important points
to remember are, when

00:21:39.020 --> 00:21:42.620
you do these joint
distributions, it's very

00:21:42.620 --> 00:21:47.230
important to consider where
values are valid.

00:21:47.230 --> 00:21:50.340
So you have to keep in mind
when you write out these

00:21:50.340 --> 00:21:55.620
conditional PDFs and joint PDFs
and marginal PDFs, what

00:21:55.620 --> 00:21:59.590
ranges the formulas you
calculated are valid for.

00:21:59.590 --> 00:22:02.880
And that also translates to
when you're calculating

00:22:02.880 --> 00:22:03.930
expectations and such.

00:22:03.930 --> 00:22:06.805
When you have integrals, you
need to be very careful about

00:22:06.805 --> 00:22:08.590
the limits of your integration,
to make sure that

00:22:08.590 --> 00:22:12.290
they line up with the range
where the values

00:22:12.290 --> 00:22:13.860
are actually valid.

00:22:13.860 --> 00:22:17.180
And the last thing, which is
kind of unrelated, but it is

00:22:17.180 --> 00:22:20.890
actually a common tool that's
used in a lot of problems is,

00:22:20.890 --> 00:22:25.170
when you see symmetry in these
problems, that can help a lot,

00:22:25.170 --> 00:22:28.590
because it will simplify things
and allow you to use

00:22:28.590 --> 00:22:31.330
facts like these to help
you calculate what the

00:22:31.330 --> 00:22:32.190
final answer is.

00:22:32.190 --> 00:22:35.520
Of course, this is also comes
along with practice.

00:22:35.520 --> 00:22:37.620
You may not immediately see that
there could be a symmetry

00:22:37.620 --> 00:22:39.120
argument that will help
with this problem.

00:22:39.120 --> 00:22:42.680
But with practice, when you do
more of these problems, you'll

00:22:42.680 --> 00:22:44.440
eventually build up
that kind of--