WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:05.800
Hello, welcome again to the probability lectures here on www.educator.com, my name is Will Murray.
00:00:05.800 --> 00:00:11.000
We are working through a chapter on Bivariate density and distribution functions.
00:00:11.000 --> 00:00:15.300
Everything in this chapter will have two variables, Y1 and Y2.
00:00:15.300 --> 00:00:21.600
Today, we are going to talk about the expected value of the function of random variables.
00:00:21.600 --> 00:00:25.400
That is something that we have seen in the single variable case.
00:00:25.400 --> 00:00:30.800
We will see how the same ideas extend to the multivariable case.
00:00:30.800 --> 00:00:33.700
I do want to start by reviewing the single variable case because
00:00:33.700 --> 00:00:38.000
I think it will make the definitions make more sense for the multivariable case.
00:00:38.000 --> 00:00:40.900
This kind of a review of stuff you seen before.
00:00:40.900 --> 00:00:50.600
The expected value of a variable, if it is a discreet variable, what you do is you a sum up over all the possible values of the variable,
00:00:50.600 --> 00:00:57.000
and then you just have Y by itself × the probability of that particular value of Y.
00:00:57.000 --> 00:01:04.000
The analogous definition for the continuous case is that, instead of summing, you take an integral.
00:01:04.000 --> 00:01:09.800
Instead of P of Y, you have F of Y which is the density function.
00:01:09.800 --> 00:01:13.000
You still have this Y multiplied on it.
00:01:13.000 --> 00:01:15.900
And then, we can also talk about the expected value.
00:01:15.900 --> 00:01:20.800
Instead of Y itself, the expected value of G of Y which is some function.
00:01:20.800 --> 00:01:25.800
For example, you might have G of Y to be Y².
00:01:25.800 --> 00:01:30.500
The way you define that, if it is discreet is you sum up over all the values of Y,
00:01:30.500 --> 00:01:33.900
you still have the probability of each value of Y there.
00:01:33.900 --> 00:01:41.600
The difference is that, instead of the Y that we had before, we replace that with G of Y.
00:01:41.600 --> 00:01:44.000
Then, the same kind of thing in a continuous case.
00:01:44.000 --> 00:01:47.900
We take an integral, we still have the density function F of Y, and then
00:01:47.900 --> 00:01:56.600
we replace the Y that we had before with the G of Y, and we have to solve that integral to find the expected value.
00:01:56.600 --> 00:02:00.200
The multi variable cases, the new stuff that we are going to learn in this lecture.
00:02:00.200 --> 00:02:06.500
The definitions are very similar, except that instead of single sums, we will have double sums.
00:02:06.500 --> 00:02:11.000
Instead of single integrals, we will have double integrals.
00:02:11.000 --> 00:02:12.800
Let us take a look at that.
00:02:12.800 --> 00:02:16.500
In the Bivariate case, we will have a function of two variables.
00:02:16.500 --> 00:02:19.800
G is now a function of Y1 and Y2.
00:02:19.800 --> 00:02:24.600
The single sum, we have a double sum because there are two variables here.
00:02:24.600 --> 00:02:27.500
There is a Y1 and there is a Y2.
00:02:27.500 --> 00:02:30.800
We saw the probability function except it has two variables now.
00:02:30.800 --> 00:02:37.600
P of Y1 Y2, and then the expected value of G of Y1 Y2, you will just multiply it on.
00:02:37.600 --> 00:02:40.800
Instead of G of Y, we have G of Y1 Y2.
00:02:40.800 --> 00:02:46.800
It is very similar to the single variable case, except that we have a Y1 and Y2.
00:02:46.800 --> 00:02:53.600
In the Bivariate case, we still have that join density function F of Y1 Y2.
00:02:53.600 --> 00:02:59.200
Again, we are integrating over both Y2 and Y1.
00:02:59.200 --> 00:03:04.800
Instead of G of Y, we have G of Y1 Y2.
00:03:04.800 --> 00:03:11.600
We will be doing a lot of double integrals in this lecture, I hope you are really fresh on your calculus 3,
00:03:11.600 --> 00:03:19.900
your multivariable calculus because you will need to be able to do a lot of double integrals to solve the examples in this lecture.
00:03:19.900 --> 00:03:24.600
Before we jump into the examples, there is a few more facts that I want to introduce you to.
00:03:24.600 --> 00:03:35.700
In particular, linearity of expectation is a very useful principle to invoke, when you are calculating expected values.
00:03:35.700 --> 00:03:41.500
The expected value of a constant is just a constant by itself.
00:03:41.500 --> 00:03:48.100
Expectation is linear, in the sense that, if you have a constant multiplied by a function,
00:03:48.100 --> 00:03:53.000
what you can do is just factor that constant on all of the expected value there.
00:03:53.000 --> 00:03:55.700
Just factor out to the outside there.
00:03:55.700 --> 00:04:01.300
That sometimes makes things a lot easier just because you can pull the constant outside,
00:04:01.300 --> 00:04:03.800
not worry about them when you are doing your integral.
00:04:03.800 --> 00:04:06.300
Even more useful is additivity.
00:04:06.300 --> 00:04:11.900
If you have a sum of 2 functions and you want to find your expected value,
00:04:11.900 --> 00:04:15.100
what you can do is calculate their expected value separately.
00:04:15.100 --> 00:04:17.100
And then, just add them together.
00:04:17.100 --> 00:04:21.800
That is extremely useful, if you try to find the expected value of something + something else,
00:04:21.800 --> 00:04:25.400
just find your expected value separately and then, add them together.
00:04:25.400 --> 00:04:29.900
We will see some examples, when we get to the problems of how that can be really useful.
00:04:29.900 --> 00:04:36.500
It can save you doing a lot of very complicated integrals and sometimes reduce them to much simpler integrals.
00:04:36.500 --> 00:04:40.500
Let us go ahead and start in on the examples.
00:04:40.500 --> 00:04:45.500
First example here, we have a joint density function of E ^- Y2.
00:04:45.500 --> 00:04:49.100
Remember that, := just means it is defined to be.
00:04:49.100 --> 00:04:54.000
Our joint density function is defined to be E ⁻Y2.
00:04:54.000 --> 00:05:00.300
Y1 and Y2 are both between 0 and infinity, but Y2 is always bigger than Y1.
00:05:00.300 --> 00:05:04.600
We want to calculate the expected value of Y1 + Y2.
00:05:04.600 --> 00:05:11.100
Right away, what I'm going to do is draw a graph of this region because it is not a perfectly square region,
00:05:11.100 --> 00:05:13.100
it is not totally obvious what the region is.
00:05:13.100 --> 00:05:16.700
I think the easiest thing is to start out with a graph.
00:05:16.700 --> 00:05:21.500
There is Y1 on my horizontal axis, there is Y2 on my vertical axis.
00:05:21.500 --> 00:05:26.000
I'm going to graph the line Y1 = Y2.
00:05:26.000 --> 00:05:28.700
If your X and Y will be the line Y = X.
00:05:28.700 --> 00:05:38.100
That diagonal line right there, that is the line Y1 = Y2.
00:05:38.100 --> 00:05:43.500
What we want to look at, is the region where Y2 is bigger than Y1.
00:05:43.500 --> 00:05:48.000
That is the region above that line, let me go ahead and color that in.
00:05:48.000 --> 00:05:52.600
There is that region right there.
00:05:52.600 --> 00:06:00.200
I want to describe that region because I’m going to be setting up a double integral to calculate this expected value.
00:06:00.200 --> 00:06:06.700
It looks to me like, let me draw this in red.
00:06:06.700 --> 00:06:14.200
It is easiest to describe it listing my Y2 first and then my Y1, in terms of Y2.
00:06:14.200 --> 00:06:18.200
The point of that is that, I will have one more 0 to deal with, when I set up my limits.
00:06:18.200 --> 00:06:20.400
That will make things a little bit easier.
00:06:20.400 --> 00:06:27.900
If I list Y2 first, my Y2 will go from 0 to infinity.
00:06:27.900 --> 00:06:40.200
My Y1 goes from Y1 = 0, that is the vertical axis, up to that diagonal line, that is the line Y1 is equal to Y2.
00:06:40.200 --> 00:06:48.800
That is a good way to describe the region, we will use that to set up a double integral to find this expected value.
00:06:48.800 --> 00:06:54.600
This expected value of Y1 + Y2 is equal to the double integral,
00:06:54.600 --> 00:07:07.000
I will fill in the limits in a second, of Y1 + Y2 × the joint density function, the F of Y1 Y2 which is E ⁻Y2.
00:07:07.000 --> 00:07:23.900
Let me fill in the limits on the integral, Y2 goes from 0 to infinity, Y2 = 0 to Y2, I will take the limit as it goes to infinity.
00:07:23.900 --> 00:07:33.400
Y1 goes from 0 to Y2.
00:07:33.400 --> 00:07:37.000
That means, I’m going to integrate Y1 first because it is on the inside.
00:07:37.000 --> 00:07:43.000
I will put DY1 on the inside and DY2 on the outside.
00:07:43.000 --> 00:07:45.000
Let me go ahead and do that integral.
00:07:45.000 --> 00:07:52.000
Of course, if you are fortunate enough that you can use software for your integrals, at this point,
00:07:52.000 --> 00:07:57.400
you just drop the whole thing right into a computer algebra system,
00:07:57.400 --> 00:08:01.200
something like mathlab or mathematica, or something like that.
00:08:01.200 --> 00:08:03.300
It will just spit out an answer for you.
00:08:03.300 --> 00:08:06.800
If you are fortunate to have access to that, then go ahead and do that.
00:08:06.800 --> 00:08:10.200
I want to go ahead work out the integral, just to show you that it is not that bad.
00:08:10.200 --> 00:08:12.900
It can be done by hand.
00:08:12.900 --> 00:08:20.800
When we do that first integral, notice that the inside integral, the variable is Y1 so that means Y2 is a constant.
00:08:20.800 --> 00:08:24.400
In particular, the E ⁻Y2 was a constant.
00:08:24.400 --> 00:08:27.900
I’m going to separate out that E ⁻Y2.
00:08:27.900 --> 00:08:40.500
Then, the integral of Y1 + Y2 with respect to Y1 is Y1²/2 + Y2 Y1.
00:08:40.500 --> 00:08:43.300
I just did that inside integral with respect to Y1.
00:08:43.300 --> 00:08:50.700
I have to evaluate that from Y1 = 0 to Y1 = Y2.
00:08:50.700 --> 00:09:04.900
I get E ⁻Y2 and if I plug in Y1 = Y2, I will get Y2²/2 + Y2².
00:09:04.900 --> 00:09:14.300
I see I can combine those into 3/2 E ⁻Y2 and Y2².
00:09:14.300 --> 00:09:19.300
3/2 Y2² E - Y2.
00:09:19.300 --> 00:09:24.700
And that was just doing the inside integrals, I still need to evaluate the outside integral.
00:09:24.700 --> 00:09:33.200
Y2 = 0 to Y2 goes to infinity, of this expression here, this is DY2.
00:09:33.200 --> 00:09:40.200
Basically, I’m integrating X² –X, that is a classic case for integration by parts.
00:09:40.200 --> 00:09:48.100
Let me go ahead and set up a little table to do my integration by parts.
00:09:48.100 --> 00:09:57.800
I will pull the 3/2 out because that is really not relevant, it is not going to change anything in the integration by parts.
00:09:57.800 --> 00:10:04.300
E ⁻Y2, this is my little shorthand trick for doing integration by parts.
00:10:04.300 --> 00:10:09.900
If you do not know this trick or if you are rusty on integration by parts, we got some lectures,
00:10:09.900 --> 00:10:16.900
it is in the level 2 college calculus section here on www.educator.com.
00:10:16.900 --> 00:10:22.500
There is a whole lecture on integration by parts, you can just check it out and get all caught up to speed.
00:10:22.500 --> 00:10:27.000
For the time being, I’m just going to use my short hand trick which is to take derivatives on the left,
00:10:27.000 --> 00:10:31.300
that is 2Y2, and then 2, and then 0.
00:10:31.300 --> 00:10:41.700
Integrals on the right, -E ⁻Y2 and then +E ⁻Y2, and then –E ⁻Y2.
00:10:41.700 --> 00:10:46.800
You make these little diagonal hashes with a + - +.
00:10:46.800 --> 00:10:51.300
You multiply down the diagonals and read off the answer.
00:10:51.300 --> 00:10:59.900
This is 3/2 ×, it is negative because there is a negative there.
00:10:59.900 --> 00:11:13.200
- Y2² E ^- Y2 - 2Y2 E ⁻Y2 - 2 E ⁻Y2.
00:11:13.200 --> 00:11:24.600
All of these need to be evaluated from Y2 starting at 0 and then, we will take the limit as it goes to infinity.
00:11:24.600 --> 00:11:29.400
Let us sort that out, we still have this 3/2.
00:11:29.400 --> 00:11:35.200
When we plug in Y2 going to infinity, all of these terms are going to disappear.
00:11:35.200 --> 00:11:40.200
There is as little bit of Patel’s rule in there but I'm not really showing you the details.
00:11:40.200 --> 00:11:47.800
But, basically, the E⁻Y2 term dominates and it takes everything to 0.
00:11:47.800 --> 00:11:50.300
Even though, it is being multiplied by infinity.
00:11:50.300 --> 00:11:55.700
If you want to check the details of that, just go through Patel’s rule and check that out.
00:11:55.700 --> 00:12:01.300
All the terms at infinity are going to 0, so 0 -0 -0.
00:12:01.300 --> 00:12:20.000
I’m going to plug in Y2 = 0 and I will get, - and - so +, but it is 0 anyway, - and – so it is +2 E⁰ which is just 1, +2.
00:12:20.000 --> 00:12:24.100
All the 0 disappear, I got 3/2 × 2.
00:12:24.100 --> 00:12:33.100
My answer, my expected value of Y1 + Y2 is 3, that finishes that problem.
00:12:33.100 --> 00:12:37.300
Let me go back over the steps and make sure that everybody is clear on everything.
00:12:37.300 --> 00:12:41.800
The first thing to do here is to graph the region.
00:12:41.800 --> 00:12:49.700
I looked at those limits there, Y1 and Y2 both go to infinity, but Y1 is always less than Y2.
00:12:49.700 --> 00:12:56.500
That is how I got this region right here, this triangular region that goes on infinitely far.
00:12:56.500 --> 00:13:01.400
And then, I want to describe that region in terms of Y1 and Y2.
00:13:01.400 --> 00:13:09.300
I thought it would be easier to list Y2 first, because then I can get a 0 for the lower bound on Y1.
00:13:09.300 --> 00:13:12.200
That makes my life slightly easier to have that 0 there.
00:13:12.200 --> 00:13:15.200
That is why I picked Y2 to list first.
00:13:15.200 --> 00:13:19.700
You can also done it with Y1 first, but it will made it a little more messy.
00:13:19.700 --> 00:13:25.100
I’m going to use those limits to set up this integral, right here.
00:13:25.100 --> 00:13:30.900
Because it is Y1 + Y2, that is why I multiplied everything by Y1 + Y2.
00:13:30.900 --> 00:13:35.700
And then, I use the density function to get this E ⁻Y2.
00:13:35.700 --> 00:13:39.500
Now, it is just a calculus 3 problem.
00:13:39.500 --> 00:13:44.700
The only thing you have to be careful about is which variable you are integrating with respect to.
00:13:44.700 --> 00:13:49.400
At first, I’m integrating with respect to Y1 which means Y2 is a constant.
00:13:49.400 --> 00:13:55.300
That is why I got these different answers for Y1 and Y2 because the variable of integration was Y1.
00:13:55.300 --> 00:14:05.200
Plugged in my values for Y1 and now it simplifies down to an integral in terms of Y2,
00:14:05.200 --> 00:14:07.600
which is something that I needed parts for.
00:14:07.600 --> 00:14:17.300
That is where I kind of outsourced to this tabular integration technique to do integration by parts.
00:14:17.300 --> 00:14:21.400
That came back and gave me the answer, this long answer.
00:14:21.400 --> 00:14:23.800
But, I plugged in my bounds, 0 and infinity.
00:14:23.800 --> 00:14:29.700
The infinity terms all dropped out, that is really showing some Patel’s rule there.
00:14:29.700 --> 00:14:34.400
I did not show the Patel’s rule but that is kind of what was going on in the background there.
00:14:34.400 --> 00:14:41.600
The infinity terms all dropped out, and most of the 0 term dropout but this 0 term gave me a value of 2.
00:14:41.600 --> 00:14:49.000
When I multiply that by 3/2, that is how I got my expected value of 3.
00:14:49.000 --> 00:15:01.000
In example 2 here, we have got a joint density function of 2 × 1 - Y2 and Y1 and Y2 are both bigger than 0 and less than 1.
00:15:01.000 --> 00:15:07.100
Let me graph that, before we go any farther, that is a simpler region than we had in example 1,
00:15:07.100 --> 00:15:10.400
because that is a square region.
00:15:10.400 --> 00:15:17.900
Here is Y1 and here is Y2, and there is 0 and there is 1, and there is 1.
00:15:17.900 --> 00:15:21.900
We are just looking at a square region here.
00:15:21.900 --> 00:15:26.600
Let me color than in and we will need to integrate that.
00:15:26.600 --> 00:15:32.000
We will need to describe that region.
00:15:32.000 --> 00:15:41.000
It is very easy to describe, as Y1 goes from 0 to 1 and Y2 goes from 0 to 1.
00:15:41.000 --> 00:15:43.700
Let us go ahead and figure out what we are calculating.
00:15:43.700 --> 00:15:50.700
E of Y1 Y2, the expected value of Y1 × Y2.
00:15:50.700 --> 00:16:03.800
Remember, the way you calculate that is you set up a double integral on your region, Y1 = 0 to 1.
00:16:03.800 --> 00:16:12.300
Maybe, I will list the Y2 on the outside, they are both constant so it will work the same way, either way.
00:16:12.300 --> 00:16:21.800
Y2 = 0 to Y2 = 1, Y1 = 0 to Y1 = 1.
00:16:21.800 --> 00:16:26.700
The function that I'm trying to find the expected value of, is Y1 Y2.
00:16:26.700 --> 00:16:36.600
I will multiply Y1 Y2 in there and then I will put in the density function that we are given, which is 2 × 1 - Y2.
00:16:36.600 --> 00:16:44.000
While, I got to setup my first integral as DY1 and my outside integral is DY2.
00:16:44.000 --> 00:16:46.800
I’m going to go ahead and solve that integral.
00:16:46.800 --> 00:16:53.300
The first one on the inside, I’m integrating with respect to Y1.
00:16:53.300 --> 00:16:58.900
I see I have a 2Y1, I’m going to use those together and just get Y1².
00:16:58.900 --> 00:17:03.000
And then, everything else is a constant because I’m integrating with respect to Y1.
00:17:03.000 --> 00:17:13.500
Y2 × 1 - Y2, and I evaluate that from Y1 = 0 to Y1 = 1.
00:17:13.500 --> 00:17:21.200
If I plug in Y1 = 1, I just get Y2 × 1 - Y2 and Y1 = 0 drops out.
00:17:21.200 --> 00:17:27.700
This is what I’m integrating, I’m integrating this DY2.
00:17:27.700 --> 00:17:35.600
That is Y2 - Y2², the integral of Y2 is Y2²/2.
00:17:35.600 --> 00:17:42.300
The integral of Y2² is Y2³/3.
00:17:42.300 --> 00:17:50.900
I need to evaluate that from Y2 = 0 to Y2 = 1.
00:17:50.900 --> 00:17:55.600
If I plug in Y2 = 1, I get ½ -1/3.
00:17:55.600 --> 00:18:00.100
Plug in Y2 = 0, they are both 0.
00:18:00.100 --> 00:18:07.100
½ - 1/3, if you put that over a common denominator is 3/6 -2/6.
00:18:07.100 --> 00:18:13.600
My expected value of Y1 × Y2 is exactly 1/6.
00:18:13.600 --> 00:18:17.400
That finishes that problem, let me recap the steps.
00:18:17.400 --> 00:18:24.600
First thing I did was, I looked at the region there and I drew a graph there Y1 and Y2
00:18:24.600 --> 00:18:27.500
are both between 0 and 1 so I got a square.
00:18:27.500 --> 00:18:34.300
And then, I describe that region in terms of Y1 and Y2, they are both constants because it is a square region.
00:18:34.300 --> 00:18:41.000
And then, I use that to set up a double integral.
00:18:41.000 --> 00:18:47.800
The Y1 Y2 here, that came from the fact that we are trying to find the expected value of Y1 Y2.
00:18:47.800 --> 00:18:53.800
The 2 × 1 - Y2 came from the density function that we are given.
00:18:53.800 --> 00:18:59.700
At that point, it is just a calculus 3 problem, multivariable calculus, solving a double integral.
00:18:59.700 --> 00:19:05.800
The important thing to notice is the first variable of integration, the inside one is DY1.
00:19:05.800 --> 00:19:09.400
That is why all the Y2 were just constants.
00:19:09.400 --> 00:19:20.900
I integrated 2Y1 to get Y1², dropped in my values for Y1 and it simplified down to something, in terms of Y2.
00:19:20.900 --> 00:19:26.700
I integrated that with respect to Y2, dropped in my values for Y2,
00:19:26.700 --> 00:19:35.500
and got a number that represents the expected value of Y1 × Y2.
00:19:35.500 --> 00:19:42.700
In example 3, we have two variables Y1 and Y2, we have not been told the joint density function,
00:19:42.700 --> 00:19:52.100
but what we have been told is that the mean of Y1 is 7 and the mean of Y2 is 5.
00:19:52.100 --> 00:20:00.900
We have a couple of functions defined here, U1 is Y1 + 2Y2 and U2 is Y1 - Y2.
00:20:00.900 --> 00:20:05.900
We have to calculate the expected values of the U.
00:20:05.900 --> 00:20:10.800
The point of this problem is to link linearity of expectation.
00:20:10.800 --> 00:20:15.100
If you do not remember that, go back to the introductory slides for this lecture and
00:20:15.100 --> 00:20:18.700
look for the one called linearity of expectation.
00:20:18.700 --> 00:20:23.200
That is what we are going to use very heavily to solve this problem.
00:20:23.200 --> 00:20:33.800
Linearity of expectation is the key to solving this problem.
00:20:33.800 --> 00:20:43.900
The expected value of U1 is equal to the expected value, just by definition of U1 of Y1 + 2Y2.
00:20:43.900 --> 00:20:56.500
But then, expectation is linear, we can separate this out into the expected value of Y1 + 2 × the expected value of Y2.
00:20:56.500 --> 00:21:00.100
We can just plug in the means that we have been given.
00:21:00.100 --> 00:21:16.500
The mean of Y1 was 7 and the mean of Y2 is 5/7 +, 7 + 2 × 5 is 7 + 10 that is 17.
00:21:16.500 --> 00:21:19.500
I almost got tripped up on my arithmetic, at the end there.
00:21:19.500 --> 00:21:21.700
U2 behaves exactly the same way.
00:21:21.700 --> 00:21:32.800
The expected value of U2 is the expected value of Y1 and - Y2.
00:21:32.800 --> 00:21:35.900
Again, it splits up using linearity there.
00:21:35.900 --> 00:21:45.300
That is the expected value of Y1 - the expected value of Y2 which is 7 -5.
00:21:45.300 --> 00:21:52.300
Our expected value of Y1 - Y2 is 2.
00:21:52.300 --> 00:21:54.100
We have an answer for both of those.
00:21:54.100 --> 00:22:00.200
The key to finding those answers was really the fact about linearity of expectation.
00:22:00.200 --> 00:22:05.400
But, if you have the expected value, you can split it up and take expected value separately.
00:22:05.400 --> 00:22:08.100
You can also pull out constants.
00:22:08.100 --> 00:22:11.000
That is true for expectation, by the way, that is not true for variance.
00:22:11.000 --> 00:22:16.600
You do not want to be monkeying around the linearity of variance because there is no such thing.
00:22:16.600 --> 00:22:20.200
But for expectation, that is true.
00:22:20.200 --> 00:22:24.900
What we did here was, I just plug in what U1 was, Y1 + 2Y2.
00:22:24.900 --> 00:22:31.800
Use linearity to split up into expected values of Y1 and Y2, then I just dropped in those expected values.
00:22:31.800 --> 00:22:34.800
Remember, expected value and mean are the same thing.
00:22:34.800 --> 00:22:38.800
I just dropped in the values of 7 and 5, and I got 17 there.
00:22:38.800 --> 00:22:48.000
And then, the same thing for U2, I plug in Y1 - Y2, split up, and dropped in my expected values of 7 and 5,
00:22:48.000 --> 00:22:52.300
and that is where that 2 came from.
00:22:52.300 --> 00:23:03.300
In example 4, we have got joint density function F of Y1 Y2 defined to be 6 × 1 - Y2,
00:23:03.300 --> 00:23:09.000
where Y1 and Y2 are both between 0 and 1, but Y2 is bigger than Y1.
00:23:09.000 --> 00:23:14.100
Let me graph out this region, before we go any farther with that.
00:23:14.100 --> 00:23:25.200
There is Y2, here is Y1, and we are looking between 0 and 1 on both axis.
00:23:25.200 --> 00:23:29.900
But, we only want to take the region where Y1 is bigger than Y2.
00:23:29.900 --> 00:23:34.400
That is the area above the line Y = X.
00:23:34.400 --> 00:23:40.000
Let me draw that region, color that a bit.
00:23:40.000 --> 00:23:43.600
That blue region is what we are going to be looking at.
00:23:43.600 --> 00:23:48.300
We are going to end up doing a double integral for this one, actually, two double integrals.
00:23:48.300 --> 00:23:56.600
I think it is going to be useful to describe the limits of this region.
00:23:56.600 --> 00:24:02.000
I switched my Y1 and Y2 on the axis, not sure why I seemed to like to do that by looking
00:24:02.000 --> 00:24:04.000
but I know I have done that several times.
00:24:04.000 --> 00:24:09.000
Y1 is always the horizontal axis and Y2 is always the vertical axis.
00:24:09.000 --> 00:24:12.100
This should be if I done it correctly.
00:24:12.100 --> 00:24:16.200
I think the best way to describe this is in terms of Y2 first.
00:24:16.200 --> 00:24:20.000
Y2 has to be constant, goes from 0 to 1.
00:24:20.000 --> 00:24:26.100
And then Y1, Y1 we cannot use constants because we will get the whole square.
00:24:26.100 --> 00:24:40.500
We just want the region from Y1 = 0 up to Y1, that line there is the line Y1 = Y2.
00:24:40.500 --> 00:24:46.300
Y1 stays less than or equal to Y2, that describes that triangular region.
00:24:46.300 --> 00:24:54.200
We use that to set up a double integral or a couple of double integral, since we have two expected values to solve here.
00:24:54.200 --> 00:25:00.500
The expected value of Y1 is the double integral and I will follow those limits there.
00:25:00.500 --> 00:25:11.300
Y2 goes from 0 to 1 and Y1 goes from 0 up to Y2.
00:25:11.300 --> 00:25:21.900
Since, we are finding the expected value of Y1, I'm going to multiply in a Y1 × the density function, 6 × 1 - Y2.
00:25:21.900 --> 00:25:26.600
And then, the inside integral is DY1, the outside integral is DY2.
00:25:26.600 --> 00:25:34.500
Now, it is just a double integral problem, we can solve it using what we learned in calculus 3.
00:25:34.500 --> 00:25:43.700
The first variable, the inside one is DY1 which means that 1 - Y2 is just a big old constant.
00:25:43.700 --> 00:25:53.700
The integral of 6 × Y1 is 3Y1².
00:25:53.700 --> 00:26:03.300
We want to integrate that or evaluate that from Y1 = 0 to Y1 = Y2.
00:26:03.300 --> 00:26:12.300
If I plug in my limits for Y1, 3Y1² will give me 3Y2².
00:26:12.300 --> 00:26:18.400
3Y2² × 1 - Y2, the Y1 = 0 just drops out.
00:26:18.400 --> 00:26:20.700
That one does not play a role.
00:26:20.700 --> 00:26:30.300
That is finishing the first integral, I still need to integrate that with respect to Y2.
00:26:30.300 --> 00:26:34.600
I changed a Y1 to a Y2, that is very important.
00:26:34.600 --> 00:26:46.900
3Y2² × 1 is just 3Y2², that integrates to Y2³ -3Y2³.
00:26:46.900 --> 00:26:57.500
I have to integrate that, that would integrate to 3 × Y2⁴/4.
00:26:57.500 --> 00:27:08.500
¾ Y2⁴, I have to evaluate that from Y2 = 0 to Y2 = 1.
00:27:08.500 --> 00:27:13.700
If I plug in 1 to both of those, I get 1 - ¾.
00:27:13.700 --> 00:27:20.400
If I plug in Y2 = 0 to both of those, they both drop out, -0.
00:27:20.400 --> 00:27:27.400
That simplifies down to 1 - ¾ is ¼, that is my expected value for Y1.
00:27:27.400 --> 00:27:31.700
I still have to calculate the expected value of Y2, because the problem asks for both of those.
00:27:31.700 --> 00:27:35.000
I have already done some of the work, I already described the region.
00:27:35.000 --> 00:27:42.400
It will be the same integral, Y2 = 0 to Y2 = 1.
00:27:42.400 --> 00:27:51.600
Y1 = 0 to Y1 = Y2, the same integral except that, instead of multiplying by Y1,
00:27:51.600 --> 00:27:56.300
I’m going to multiply by Y2, because that is what I'm finding the expected value of.
00:27:56.300 --> 00:28:05.800
Y2 × 6 × 1 - Y2, DY1 and DY2.
00:28:05.800 --> 00:28:17.500
Still doing the inside integral, since I’m integrating with respect to Y1, all the variables here are in terms of Y2.
00:28:17.500 --> 00:28:20.000
I'm integrating just a huge constant.
00:28:20.000 --> 00:28:28.500
It is 6Y2 × 1 - Y2, that is all a constant just × Y1.
00:28:28.500 --> 00:28:35.700
I need to evaluate that from Y1 = 0 to Y1 = Y2.
00:28:35.700 --> 00:28:48.300
Let us see, if I plug in Y1 = Y2, I will get 6Y2² × 1 - Y2.
00:28:48.300 --> 00:28:54.400
There is a Y2 there and that Y1 becomes a Y2, when I evaluate it.
00:28:54.400 --> 00:28:57.800
If I plug in Y1 = 0, it just drops out.
00:28:57.800 --> 00:29:08.100
I have the integral from Y2 = 0 to 1 of 6Y2² DY2.
00:29:08.100 --> 00:29:16.900
What I notice here is that, that is the same as the integral I had above, 3Y2² 1 – Y2 except that,
00:29:16.900 --> 00:29:23.400
I have a 6 instead of 3, that is 2 × the same integral as above.
00:29:23.400 --> 00:29:27.000
Maybe, I can plug that here with a star.
00:29:27.000 --> 00:29:29.500
This is 2 × integral *.
00:29:29.500 --> 00:29:34.500
If I evaluate that integral, what I will just get is 2 × the answer that I got above.
00:29:34.500 --> 00:29:40.300
2 × ¼ and 2 × ¼ is just ½.
00:29:40.300 --> 00:29:47.300
That gives me an answer for the expected value of Y2 of being ½.
00:29:47.300 --> 00:29:52.400
If you do not like the way I did that, by sort of citing the integral above, just go ahead and work out this integral.
00:29:52.400 --> 00:29:55.400
It is just a calculus 1 problem, it should not take you very long.
00:29:55.400 --> 00:30:00.800
You should end up getting ½, it should work out.
00:30:00.800 --> 00:30:04.200
That side gives us both the answers that we are looking for.
00:30:04.200 --> 00:30:07.100
Let me remind you how we set that up.
00:30:07.100 --> 00:30:13.800
The first thing I did, like in all of these problems is, I looked at the region that was given to me and
00:30:13.800 --> 00:30:15.200
I graphed the regions.
00:30:15.200 --> 00:30:21.200
In this case, Y1 and Y2 are both between 0 and 1, but Y2 is bigger than Y1.
00:30:21.200 --> 00:30:27.100
I just looked at the region above that diagonal line, the Y = X line.
00:30:27.100 --> 00:30:33.200
I decided that it was easier to describe that region, if we kind of march horizontally.
00:30:33.200 --> 00:30:37.900
That means describing the Y2 first, in terms of constants.
00:30:37.900 --> 00:30:42.800
And then, describing Y1 going from 0 to Y2.
00:30:42.800 --> 00:30:50.700
If you just said Y1 goes from 0 to 1, all of the sudden you described a square, and that is not the region that we are looking at.
00:30:50.700 --> 00:30:55.000
I set up those limits, by looking at the region.
00:30:55.000 --> 00:31:02.000
And then, I pull those limits over and used them to set up a double integral.
00:31:02.000 --> 00:31:10.100
I took the density function 6 × 1 - Y2, and I multiplied it by the thing we are finding the expected value of,
00:31:10.100 --> 00:31:14.600
which in the first case is Y1, but in the second case is Y2.
00:31:14.600 --> 00:31:20.900
That is because of the different requirements, the first one is Y1 and the second one is Y2.
00:31:20.900 --> 00:31:24.000
In each case, I got a double integral to solve.
00:31:24.000 --> 00:31:33.500
And then, I just did a double integral, integrated DY1 first which is why 6Y1 turn into 3Y1².
00:31:33.500 --> 00:31:36.600
1 - Y 2 was just a big old constant.
00:31:36.600 --> 00:31:43.800
Plugged in my values for Y1, got an integral in terms of Y2, pretty easy integral in the sense of,
00:31:43.800 --> 00:31:50.100
probably you can hand that off to first semester calculus student, and they can solve it for you.
00:31:50.100 --> 00:31:54.000
The answer that they hopefully come up with would be ¼.
00:31:54.000 --> 00:32:01.200
For Y2, same kind of thing happens except that, when you are doing that first integral, there are no Y1 at all,
00:32:01.200 --> 00:32:03.700
which means you are integrating a constant.
00:32:03.700 --> 00:32:12.700
You will just get that constant × Y1, plug in the value of Y1 = Y2 and we get 6Y2² 1 - Y2.
00:32:12.700 --> 00:32:17.600
Because I'm lazy, I noticed that that was the same integral that we had back here,
00:32:17.600 --> 00:32:23.700
except it is multiplied by 2 which means we can just take the old answer multiplied by 2.
00:32:23.700 --> 00:32:26.100
2 × ¼ is ½.
00:32:26.100 --> 00:32:33.100
If you had not noticed that, that integral was the same as the previous one, that is okay.
00:32:33.100 --> 00:32:40.300
Just go ahead and work it out, and do one or more steps of calculus 1, and you will get an answer.
00:32:40.300 --> 00:32:44.100
I want you to really understand these two answers.
00:32:44.100 --> 00:32:48.600
I want you to remember them because the next example, example 5,
00:32:48.600 --> 00:32:52.500
we are going to be using these answers from example 4.
00:32:52.500 --> 00:33:00.100
It is the same setup as in example 4, I’m going to use these answers to take it, separate farther.
00:33:00.100 --> 00:33:07.100
Make sure you understand these, before you go on to example 5.
00:33:07.100 --> 00:33:13.600
In example 5, we have got the same setup that we had from example 4.
00:33:13.600 --> 00:33:19.500
We are going to be using the answers that we derived in example 4, to solve example 5.
00:33:19.500 --> 00:33:25.800
If you have not just watched example 4, go back and watch example 4, or are work it on your own.
00:33:25.800 --> 00:33:28.700
Just make sure your answers agree with mine.
00:33:28.700 --> 00:33:35.500
You want to have those answers fresh in your mind and ready to go for example 5.
00:33:35.500 --> 00:33:46.300
Let me solve example 5, we are given the same setup F of Y1 Y2 is 6 × 1 - Y2 and then, they describe the region for us.
00:33:46.300 --> 00:33:53.900
Let me just emphasize that, that is all the same as example 4.
00:33:53.900 --> 00:33:58.600
Because of that, I’m not even going to try to graph it, like I did with all the other examples.
00:33:58.600 --> 00:34:06.300
If you want to kind of work that out and you want my help, just go back and watch example 4,
00:34:06.300 --> 00:34:10.300
you will see that that carefully worked out, I drew the graph and everything.
00:34:10.300 --> 00:34:20.000
In this case, we do not have to do that again, because we are finding the expected value of 2Y1 + 3Y2.
00:34:20.000 --> 00:34:29.900
The expected value of 2Y1 + 3Y2, the trick here is not to do an integral but to use linearity of expectation.
00:34:29.900 --> 00:34:38.700
That was something that I introduced you to, on the third introductory slide to this lecture, linearity of expectation.
00:34:38.700 --> 00:34:44.000
It is super useful for problems like this.
00:34:44.000 --> 00:34:48.300
I should spell expectation right, since it is such a useful concept.
00:34:48.300 --> 00:34:56.600
Linearity of expectation says, you can distribute and split up this expected value into 2 ×
00:34:56.600 --> 00:35:03.400
the expected value of Y1 + 3 × the expected value of Y2.
00:35:03.400 --> 00:35:07.900
Both of those were things that we calculated in example 4.
00:35:07.900 --> 00:35:17.600
I'm not going to recalculate those now because we did no little job of work in calculating those.
00:35:17.600 --> 00:35:24.800
The expected value for Y1, back when work it out in example 4 was ¼.
00:35:24.800 --> 00:35:30.200
The expected value for Y2 was ½.
00:35:30.200 --> 00:35:34.400
Go back and watch example 4, if you are unsure where those numbers are coming from.
00:35:34.400 --> 00:35:43.400
This is 2 × ¼ is ½ + 3/2, that is just 4/2 or 2.
00:35:43.400 --> 00:35:49.100
We got an answer right away, we did not have to do another double integral.
00:35:49.100 --> 00:35:55.100
The reason we did not have to do another integral is because this is the same setup as example 4.
00:35:55.100 --> 00:35:59.000
We already worked out the basic values in example 4.
00:35:59.000 --> 00:36:03.500
We can just extend that using linearity of expectation.
00:36:03.500 --> 00:36:07.800
If the phrase linearity of expectation does not quite trip off your tongue yet,
00:36:07.800 --> 00:36:11.100
it is worth going back and watching that third slide again.
00:36:11.100 --> 00:36:18.500
You will see how nicely it helps us in this problem because it allows us to take 2Y1 + 3Y2,
00:36:18.500 --> 00:36:24.600
and split up and just find the expected values of Y1 and Y2, and then combine them back together.
00:36:24.600 --> 00:36:33.800
Those expected values we calculated in example 4, to be ¼ and ½, just drop those numbers in and then simplify the fractions.
00:36:33.800 --> 00:36:41.700
We get our expected value of 2 for 2Y1 + 3Y2.
00:36:41.700 --> 00:36:48.000
That wraps up this lecture on expected value of a function of random variables.
00:36:48.000 --> 00:36:52.400
Next up, I got a lecture on Covariance, it is a big topic, there is a lot of stuff in there.
00:36:52.400 --> 00:36:54.000
I hope you will stick around for that.
00:36:54.000 --> 00:36:59.400
In the meantime, this is the chapter on Bivariate density functions and distributions.
00:36:59.400 --> 00:37:05.200
This is all part of the larger lecture series on probability, here on www.educator.com.
00:37:05.200 --> 00:37:07.000
My name is Will Murray, thank you for joining me today, bye.