WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:05.800
Hi, welcome back to the probability videos here on www.educator.com.
00:00:05.800 --> 00:00:11.000
Today, we are going to talk about conditional probability and conditional expectation.
00:00:11.000 --> 00:00:17.700
We are going to be using some of the concepts of marginal probability which I talked about in the previous video.
00:00:17.700 --> 00:00:22.400
If you are not familiar with marginal probability, I’m going to give you a really quick review of that,
00:00:22.400 --> 00:00:25.100
at the beginning of this video.
00:00:25.100 --> 00:00:30.100
If you really have not worked through the previous video then, it is probably better if you go back
00:00:30.100 --> 00:00:33.400
and look at that previous video on marginal probability.
00:00:33.400 --> 00:00:36.400
Get yourself really solid on that, and then come back and
00:00:36.400 --> 00:00:40.200
we will talk about condition probability and conditional expectation.
00:00:40.200 --> 00:00:48.300
You will see how the marginal probability is used to calculate conditional probability and conditional expectation.
00:00:48.300 --> 00:00:53.500
Let me just remind you what we learned in the last video about marginal probability.
00:00:53.500 --> 00:00:58.200
Again, if you have not watched that video, you probably do want to watch that video from scratch
00:00:58.200 --> 00:01:03.600
because there is a lot of information in there, and also, a lot of good practice in actually calculating marginal probability.
00:01:03.600 --> 00:01:10.100
This is just a quick review so that you will see how these concepts go into conditional probability.
00:01:10.100 --> 00:01:16.200
In all these ideas, we have an experiment with two random variables Y1 and Y2.
00:01:16.200 --> 00:01:24.100
The marginal probability functions that we learned about in the last video, for discreet probability,
00:01:24.100 --> 00:01:33.500
we have P1 of Y1 is the sum over Y2 of all the probabilities of all the combinations of Y1 and Y2.
00:01:33.500 --> 00:01:38.100
Notice that, there is this variable change in the subscripts.
00:01:38.100 --> 00:01:48.200
When you are finding the probability function for Y1, what you end up doing for Y1 is you sum over Y2.
00:01:48.200 --> 00:01:58.100
And then, vice versa, when you find the marginal probability function from Y2, you sum over Y1.
00:01:58.100 --> 00:02:02.100
Those are the marginal probability functions in the discreet case.
00:02:02.100 --> 00:02:07.500
In the continuous case, you have a marginal density function for Y1.
00:02:07.500 --> 00:02:11.600
And then, you integrate over all possible values of Y2.
00:02:11.600 --> 00:02:18.700
Not always be for -infinity to infinity because sometimes the domain you are interested in, is much smaller than that.
00:02:18.700 --> 00:02:23.000
But, I just wrote the most general one to introduce it here.
00:02:23.000 --> 00:02:30.900
The important thing here is, when you are finding the function for Y1, you look at all the possible values for Y2,
00:02:30.900 --> 00:02:35.400
and then you integrate the joint density function over Y2.
00:02:35.400 --> 00:02:48.200
Conversely, when you are finding the marginal density function for Y2, you look at all the values for Y1 and you integrate over Y1.
00:02:48.200 --> 00:02:56.800
We practiced in the previous lecture, we practice calculating some marginal probability functions and some marginal density functions.
00:02:56.800 --> 00:03:01.900
If you do not remember how to calculate those, just jump back one video and check those out.
00:03:01.900 --> 00:03:07.300
We are going to be using some of the answers to the examples in the previous lecture,
00:03:07.300 --> 00:03:10.500
as part of the examples in this lecture.
00:03:10.500 --> 00:03:16.100
You really want to be solid on that, before we move forward and learn some new stuff.
00:03:16.100 --> 00:03:20.400
The big new idea for this video is conditional probability.
00:03:20.400 --> 00:03:23.800
We will have a discreet case and a continuous case.
00:03:23.800 --> 00:03:29.200
The probability of Y1 condition on Y2, what that really means is that,
00:03:29.200 --> 00:03:44.000
if you know that Y2 has a particular value of y2, given that Y2 is y2, what is the probability that Y1 comes out to be y1.
00:03:44.000 --> 00:03:51.000
The way you calculate it is, you use the probability function, the joint probability function of Y1 and Y2.
00:03:51.000 --> 00:03:56.000
And then, you divide by the marginal probability function.
00:03:56.000 --> 00:04:05.000
Remember, this, we figure out before is the sum over Y1 of the probability of Y1 and Y2.
00:04:05.000 --> 00:04:07.700
Remember, you have that variable switch always.
00:04:07.700 --> 00:04:12.600
That is the conditional probability formula in the discreet case.
00:04:12.600 --> 00:04:19.400
The conditional probability in the continuous case is a little more complicated.
00:04:19.400 --> 00:04:21.700
I can spell that out for you.
00:04:21.700 --> 00:04:29.600
Given that Y2, given that we know the value for Y2, the way we find the conditional density function
00:04:29.600 --> 00:04:33.800
is we write it as F of Y1 condition on Y2.
00:04:33.800 --> 00:04:42.800
You take the joint density function and then you divide it by the marginal density function of Y2.
00:04:42.800 --> 00:04:51.000
Just a reminder, since it is the conditional function, since it is the marginal density function of Y2,
00:04:51.000 --> 00:05:01.100
it is the integral on Y1 of F of Y1 Y2 DY1.
00:05:01.100 --> 00:05:05.600
We have a lot of variables to keep track here, it tend to get quite confusing.
00:05:05.600 --> 00:05:14.200
What you want to do with this formula is, you want to interpret it as a density function on Y1.
00:05:14.200 --> 00:05:17.300
And then, you can calculate conditional probability.
00:05:17.300 --> 00:05:22.300
Suppose, you know you are given that Y2 has a particular value.
00:05:22.300 --> 00:05:27.000
If you are given or you know somehow that Y2 has a particular value,
00:05:27.000 --> 00:05:33.300
you want to ask what is the probability that Y1 will be in a particular range?
00:05:33.300 --> 00:05:45.300
The idea here is that you have a known value of Y2.
00:05:45.300 --> 00:05:54.700
The question we are asking is, what is the probability that Y1 will be in this particular range?
00:05:54.700 --> 00:06:00.100
The way you answer that is, you use this conditional density formula.
00:06:00.100 --> 00:06:10.200
You do F of Y1 condition on Y2 and then, you integrate that with respect to Y1 from the two values that you are interested in.
00:06:10.200 --> 00:06:15.200
That comes from this A and this B, give you the two limits on the integral.
00:06:15.200 --> 00:06:22.400
Quite confusing actually, but we will practice this in the examples, and I hope it will start to make some sense.
00:06:22.400 --> 00:06:28.200
There is one more thing that we need to learn which is conditional expectation.
00:06:28.200 --> 00:06:31.600
You want to remember this formula when we jump to the next slide
00:06:31.600 --> 00:06:35.900
because the conditional expectation is going to look very much like this formula.
00:06:35.900 --> 00:06:42.900
It is going to have one extra factor and that extra factor is going to go in right there.
00:06:42.900 --> 00:06:46.200
Keep an eye out for that, in the next slide.
00:06:46.200 --> 00:06:53.000
The next topic that we are learning here is conditional expectation.
00:06:53.000 --> 00:06:57.700
Let me go ahead and talk about skip with the discreet case, and talk about the continuous case
00:06:57.700 --> 00:07:00.100
because I think it is a little easier to follow.
00:07:00.100 --> 00:07:04.200
The idea here is that you have a known value of Y2.
00:07:04.200 --> 00:07:11.200
Someone has told you the value of Y2 and you are trying to predict the value of Y1.
00:07:11.200 --> 00:07:18.800
What is your expected value of Y1, based on a particular known value of Y2?
00:07:18.800 --> 00:07:27.600
What you do is, you integrate the conditional density function except here is that extra term,
00:07:27.600 --> 00:07:31.200
that extra factor that I warned you about on the previous side.
00:07:31.200 --> 00:07:35.700
That was not there on the formula from the previous side, everything else looks the same.
00:07:35.700 --> 00:07:41.300
But you stick in that extra Y1 and then, you integrate it over Y1,
00:07:41.300 --> 00:07:46.700
just as we did in the previous slide, when we are calculating continuous probability.
00:07:46.700 --> 00:07:51.900
This is kind of reflecting the fact that we are finding the expected value of Y1.
00:07:51.900 --> 00:08:00.600
That is why we put that extra term in there, it is all based on knowing a value of Y2.
00:08:00.600 --> 00:08:06.000
I hope that is starting to make some sense, if it does, let us go up and look at the discreet formula.
00:08:06.000 --> 00:08:13.700
It essentially looks exactly the same except I just changed the continuous F to a discreet P
00:08:13.700 --> 00:08:17.500
and the continuous integral, to a discreet sum.
00:08:17.500 --> 00:08:21.800
It was just sort of the discreet analogue of that continuous formula.
00:08:21.800 --> 00:08:25.400
I think a lot of these will make more sense, after we do some examples.
00:08:25.400 --> 00:08:31.300
Come along with me and let us work out some examples together.
00:08:31.300 --> 00:08:39.800
In the first example here, we are given the joint density function F of Y1 Y2 is 6 × 1 - Y2,
00:08:39.800 --> 00:08:44.100
on the triangle with corner 0-0, 0-1, and 1-1.
00:08:44.100 --> 00:08:51.500
I think right away, what am I going to do is graph that because that is the first challenge,
00:08:51.500 --> 00:08:54.200
is just to visualize these things.
00:08:54.200 --> 00:09:07.900
0-0 is right here, think of 0-1 as being Y2, this is Y1, there is 1 and there is 1 on the Y2 axis.
00:09:07.900 --> 00:09:15.400
So, 0-1 is right there and 1-1 is the point right there.
00:09:15.400 --> 00:09:25.000
We want the triangle with those 3 corners, I will connect those up and make myself a nice triangle.
00:09:25.000 --> 00:09:31.100
We want to find the probability that Y1 is less than or equal to Y2,
00:09:31.100 --> 00:09:38.500
given that Y2 is less than or equal ½, given that Y1 is less that or equal ¾.
00:09:38.500 --> 00:09:42.800
This is kind of a trick question to be throwing it into this lecture,
00:09:42.800 --> 00:09:51.100
because this is not a problem of conditional and marginal probability.
00:09:51.100 --> 00:09:55.900
That is because there are less than or equal to, in both of these.
00:09:55.900 --> 00:10:02.900
Let me describe what is going on with this and hopefully I can sort it out for you.
00:10:02.900 --> 00:10:10.300
We are going to use the original conditional probability formula from several lectures ago.
00:10:10.300 --> 00:10:12.000
This goes way back to the beginning of the course.
00:10:12.000 --> 00:10:15.400
You have to scroll way up to find this conditional probability formula.
00:10:15.400 --> 00:10:25.300
The probability of A given B is the probability of A intersect B divided by the probability of B.
00:10:25.300 --> 00:10:28.600
That was our original conditional probability formula.
00:10:28.600 --> 00:10:41.200
What we want here is, the probability of Y2 being less than or equal to ½ and
00:10:41.200 --> 00:10:54.700
Y1 being less than or equal to ¾ divided by the probability of Y1, that is the B being less than or equal to ¾.
00:10:54.700 --> 00:10:57.200
That is what we calculate here.
00:10:57.200 --> 00:11:04.900
Both the numerator and denominator are describing regions inside this triangle.
00:11:04.900 --> 00:11:07.600
Let me look at the numerator first.
00:11:07.600 --> 00:11:08.700
Maybe, I will look at the denominator first.
00:11:08.700 --> 00:11:11.200
I think that one is a little more challenging.
00:11:11.200 --> 00:11:12.700
Let me fill in some values here.
00:11:12.700 --> 00:11:22.600
There is ½, there is ½, and I know I'm going to look at Y1 = ¾, there is ¾ there.
00:11:22.600 --> 00:11:26.400
Maybe, that is enough there.
00:11:26.400 --> 00:11:28.200
Let us look at the denominator.
00:11:28.200 --> 00:11:35.600
It is the probability that Y1 is less than or equal to ¾.
00:11:35.600 --> 00:11:41.900
My Y1 looks a little bit messy here, let me see if I can write that a little cleaner.
00:11:41.900 --> 00:11:53.400
Y1 being less than or equal to ¾ is, there is the Y1 = ¾.
00:11:53.400 --> 00:12:04.400
The blue region right there, that is where Y1 is less than or equal of ¾.
00:12:04.400 --> 00:12:08.300
That looks a little tricky to describe.
00:12:08.300 --> 00:12:18.200
I think, what I want to do is describe that as Y1 goes from 0 to 3/4 and Y2,
00:12:18.200 --> 00:12:27.400
if I can describe that in red, Y2 goes from Y1 up to 1.
00:12:27.400 --> 00:12:35.900
Y2 goes from Y1 up to 1, this is really lots and lots of multivariable calculus.
00:12:35.900 --> 00:12:39.500
If you have not watched these lectures on multivariable calculus recently,
00:12:39.500 --> 00:12:44.900
it is a great time to review those, lots of review of that subject coming in.
00:12:44.900 --> 00:12:56.700
This denominator region is the integral from Y1 = 0 to Y1 = ¾.
00:12:56.700 --> 00:13:04.300
The integral from Y2 = Y1, Y2 = 1.
00:13:04.300 --> 00:13:16.900
And then, we have our joint density function 6 × 1 - Y2 DY2 and DY1.
00:13:16.900 --> 00:13:20.100
That is going to be a double integral, we can calculate it out.
00:13:20.100 --> 00:13:25.000
It would not be a whole lot of fun but it is nothing too difficult either.
00:13:25.000 --> 00:13:32.400
The numerator region, Y2 is less than ½ and Y1 is less than or equal to ¾.
00:13:32.400 --> 00:13:41.200
Let me just graph Y2 less than ½, that is everything below that line.
00:13:41.200 --> 00:13:49.100
Let me make that a dotted line and make that a little easier to separate out there.
00:13:49.100 --> 00:13:54.000
Y2 = ½, there it is.
00:13:54.000 --> 00:13:58.700
I want everything below that line and to the left of the other dotted line.
00:13:58.700 --> 00:14:05.900
That really just means below the dotted line for ½.
00:14:05.900 --> 00:14:10.200
If I describe that region, this was the denominator region here.
00:14:10.200 --> 00:14:17.200
The numerator region is, I think it will be easier if I describe Y2 first.
00:14:17.200 --> 00:14:21.000
And then, I can describe Y1 going that way.
00:14:21.000 --> 00:14:23.900
That will give you 0 for Y1, it will be a nicer there.
00:14:23.900 --> 00:14:37.900
If I say Y2 goes from 0 to ½ and then Y1 goes from 0 to the diagonal line Y2.
00:14:37.900 --> 00:14:46.900
What we will be integrating is Y2 = 0 to Y2 = ½.
00:14:46.900 --> 00:14:54.500
And then, the integral of Y1 = 0 to Y1 = Y2.
00:14:54.500 --> 00:15:03.300
The same density function 6 × 1 - Y2 DY1 DY2.
00:15:03.300 --> 00:15:08.300
I have given myself a nice pile of double integrals to solve.
00:15:08.300 --> 00:15:12.600
You would be forgiven, if you did not want to plow through the multivariable calculus with me,
00:15:12.600 --> 00:15:14.800
because it is all just multivariable calculus from here.
00:15:14.800 --> 00:15:20.400
There is really not too much more probability to be learned from this.
00:15:20.400 --> 00:15:22.000
I do want to go ahead and solve them.
00:15:22.000 --> 00:15:27.200
If you do not want to solve the integrals with me, feel free to skip to the end and just check out the numbers.
00:15:27.200 --> 00:15:29.400
Maybe solve one on your own and see if you agree.
00:15:29.400 --> 00:15:36.700
Or you can take these double integrals and plug them into your favorite online double integral solver.
00:15:36.700 --> 00:15:45.000
This integral 6 × 1 - Y2 in the numerator, we are integrating that with respect to Y1.
00:15:45.000 --> 00:15:58.000
That is 6 × 1 - Y2 × Y1 integrated Y1 = 01, Y1 = Y2.
00:15:58.000 --> 00:16:03.400
That is going to give me, we are still working in the numerator.
00:16:03.400 --> 00:16:21.400
6 × 1 - Y2 × Y2, 6Y2 - 6Y2².
00:16:21.400 --> 00:16:31.300
And then, we are still integrating that from Y2 = 0 to Y2 = ½ DY2.
00:16:31.300 --> 00:16:37.600
That was my numerator and let me go ahead and keep solving that.
00:16:37.600 --> 00:16:50.200
6Y2 integrates to 3Y2², 6Y2² integrates to 2Y2³.
00:16:50.200 --> 00:17:01.000
-2Y2³ integrate that from 0 to ½, Y2 = 0 to Y2 = ½.
00:17:01.000 --> 00:17:20.100
We get 3 × ½² is ¾ - 2 × ½³, that is 2 × 1/8 is ¼, that is ½ for my numerator.
00:17:20.100 --> 00:17:21.700
Now, that was the easy one.
00:17:21.700 --> 00:17:26.600
I think the denominator actually turned out to be a bit worse, unfortunately.
00:17:26.600 --> 00:17:30.200
Let me go ahead and see what we get in the denominator here.
00:17:30.200 --> 00:17:47.100
6 × 1 - Y2 integrate it with respect to Y2, that is 6Y2 - 6Y2 integrated is 3Y2².
00:17:47.100 --> 00:17:56.800
We want to integrate that from Y2 = Y1 to Y2 = 1.
00:17:56.800 --> 00:18:15.900
That is going to give me 6 -3 - 6Y1 + 3Y1².
00:18:15.900 --> 00:18:19.700
We still have to integrate that.
00:18:19.700 --> 00:18:23.600
That is in the numerator, that should have been a DY2.
00:18:23.600 --> 00:18:29.400
We are still integrating the denominator DY1.
00:18:29.400 --> 00:18:46.100
That is the integral of 3Y1² is Y1³ -6Y1 integrates to 3Y1² -3Y1².
00:18:46.100 --> 00:18:54.600
6 -3 is 3 that integrates to 3Y1, and we want to integrate that.
00:18:54.600 --> 00:19:04.800
What are my bounds, Y1 goes from 0 to ¾, Y1 = 0 to Y1 = ¾.
00:19:04.800 --> 00:19:10.400
I still have ½ in my numerator, it is waiting for denominator.
00:19:10.400 --> 00:19:14.500
If I plug in ¾ for the denominator, this is pretty nasty.
00:19:14.500 --> 00:19:33.600
Y1³ will be 27/64, 3Y1² is 3 × 9/16 so 27/16, and 3Y1 is 9/4.
00:19:33.600 --> 00:19:49.800
Let us see, my common denominator there is /64 so I get 27 -27/16 is 108.
00:19:49.800 --> 00:19:55.900
9/4, I have to multiply that by 16 because I got 64 in the denominator.
00:19:55.900 --> 00:20:11.600
That is a 144, 9 × 16, and this all simplifies down to ½/27 -108 + 144 is 63.
00:20:11.600 --> 00:20:21.100
63/64, I got 64, do the flip there, 64/63 × ½.
00:20:21.100 --> 00:20:26.300
And, I finally come up with 32/63.
00:20:26.300 --> 00:20:31.400
What an unpleasant stage of integration.
00:20:31.400 --> 00:20:37.800
Let me show you the key steps in setting up those integrals because that is really what I want you to understand.
00:20:37.800 --> 00:20:42.500
Solving the integrals is just kind of a tedious exercise in multivariable calculus.
00:20:42.500 --> 00:20:47.200
Setting up the integrals is where it is really vital here.
00:20:47.200 --> 00:20:56.200
The first thing I did was, to graph the triangle with these corners 0-0, 0-1, and 1-1.
00:20:56.200 --> 00:21:04.300
And then, I wanted to find conditional probability, since, these are both describing regions and not constants.
00:21:04.300 --> 00:21:08.100
If they were describing constants, I’m going to jump to my conditional probability formulas
00:21:08.100 --> 00:21:10.600
that I learned in this lecture.
00:21:10.600 --> 00:21:16.900
But since, they are describing regions, I’m just going to use my old conditional probability formula, right here.
00:21:16.900 --> 00:21:25.600
The probability that they are both true divided by the probability of B.
00:21:25.600 --> 00:21:33.300
Let me show you that, that gives us that formula right here.
00:21:33.300 --> 00:21:42.100
And then, I had to translate each one of these regions into regions on the graph, that I can use to set up integrals.
00:21:42.100 --> 00:21:56.200
Y2 less than ½ and Y1 less than ¾ means that, Y2 less than ½ is that region right there.
00:21:56.200 --> 00:22:04.500
Everything south of that region Y1 less than ¾ is everything to the left of that line, right there.
00:22:04.500 --> 00:22:09.000
If they are both true, it just means you are talking about this triangular region.
00:22:09.000 --> 00:22:14.700
My numerator is that region right there.
00:22:14.700 --> 00:22:19.000
Y2 goes from 0 to ½, Y1 goes from 0 to Y2.
00:22:19.000 --> 00:22:22.800
That is where I got my bounds for the integral here.
00:22:22.800 --> 00:22:30.700
My denominator is just Y1 less than ¾, that is everything to the left of this line.
00:22:30.700 --> 00:22:33.800
That is the line Y1 = ¾.
00:22:33.800 --> 00:22:41.500
I got to describe that region that kind of looks like a backwards state of Nevada.
00:22:41.500 --> 00:22:52.200
That is my denominator region, I described as Y1 goes from 0 to 3/4 and Y2 goes from Y1 up to 1.
00:22:52.200 --> 00:22:58.800
That is where I got these limits for this denominator integral.
00:22:58.800 --> 00:23:06.400
That is all kind of messy but from there, it just turns into a multivariable calculus exercise.
00:23:06.400 --> 00:23:14.800
The key thing here is that, you have to keep straight which variable you are integrating with respect to.
00:23:14.800 --> 00:23:19.500
In this numerator integral, we are integrating with respect to Y1
00:23:19.500 --> 00:23:26.900
which means that 6 × 1 - Y2 was a constant, that is why I integrated to 6 × 1 - Y2 × Y1.
00:23:26.900 --> 00:23:34.600
In the denominator, we are integrating first with respect to Y2 which is why when we integrate 6 × 1 – Y2,
00:23:34.600 --> 00:23:40.000
we get something very different 6Y2 -3Y².
00:23:40.000 --> 00:23:47.000
I do not think I’m going to continue to pursue all the details of the integration.
00:23:47.000 --> 00:23:53.000
I just kind of work through all these integrals, plug in all the fractions, it got fairly hairy here,
00:23:53.000 --> 00:24:00.700
but then it simplify down to 32/63.
00:24:00.700 --> 00:24:08.600
In example 2, we are starting out with the same joint density function on the same region.
00:24:08.600 --> 00:24:11.700
We are also finding a conditional probability but now,
00:24:11.700 --> 00:24:17.500
we are finding a conditional probability over condition on a constant value of Y1.
00:24:17.500 --> 00:24:22.900
The big difference here was, in example 1, we had a less than or equal to here.
00:24:22.900 --> 00:24:32.000
In example 2, we have an equal to here, which means we are going to use our new conditional expectation formulas.
00:24:32.000 --> 00:24:36.500
I'm going to go ahead and draw the region that we are talking about.
00:24:36.500 --> 00:24:43.200
But, we are going to be using our conditional expectation formulas that we learn in this lecture.
00:24:43.200 --> 00:24:46.500
I’m trying to make my axis a little bit straighter.
00:24:46.500 --> 00:24:48.500
This is the same region we had before.
00:24:48.500 --> 00:25:00.500
I know the general shape of the region is this triangle here at 0-0, 0-1, and 1-1, there is my region.
00:25:00.500 --> 00:25:08.800
What we are given now is that, Y1 is equal to ½.
00:25:08.800 --> 00:25:13.500
There is Y1 is the horizontal axis, Y2 is the vertical axis.
00:25:13.500 --> 00:25:18.900
We are given that Y1 is equal to ½.
00:25:18.900 --> 00:25:28.400
We are given that we are sort of living on this red vertical line, right here.
00:25:28.400 --> 00:25:34.000
We want to find the probability that Y2 is bigger than ¾.
00:25:34.000 --> 00:25:39.600
Let me draw that, there is ½ and there is ¾.
00:25:39.600 --> 00:25:48.800
We want to find the probability that we are on this part of the line, that upper half of that line.
00:25:48.800 --> 00:25:55.600
What we are going to do is, solve this using our conditional expectation formula.
00:25:55.600 --> 00:26:02.300
Let me remind you what that was, this is coming straight from one of the early slides in this lecture.
00:26:02.300 --> 00:26:06.400
I think it was the third slide in this lecture.
00:26:06.400 --> 00:26:12.700
Remember, what we want to use there is our conditional probability formula.
00:26:12.700 --> 00:26:18.800
We are going to use the integral from Y2 = ¾.
00:26:18.800 --> 00:26:23.500
Our biggest value of Y2 it could be is 1.
00:26:23.500 --> 00:26:35.000
Y2 = 1 of the conditional density formula F of Y2 condition on Y1.
00:26:35.000 --> 00:26:40.400
And then, we are going to integrate that with respect to Y2.
00:26:40.400 --> 00:26:45.600
Let me remind you what this conditional density formula was.
00:26:45.600 --> 00:26:52.100
The conditional density formula is F of Y2 condition on Y1.
00:26:52.100 --> 00:27:00.400
I think this is the opposite way, from the way I had it in the first slide or the third slide of the lecture.
00:27:00.400 --> 00:27:05.800
I think I had Y1 condition on Y2, you have to be very careful here.
00:27:05.800 --> 00:27:18.400
This is F of Y1, Y2 divided by F1 of Y1.
00:27:18.400 --> 00:27:25.800
We also have to figure out F of Y1,Y2, that is just the joint density function here.
00:27:25.800 --> 00:27:32.600
But, we also need to know this marginal density function F1 of Y1.
00:27:32.600 --> 00:27:47.400
F1 of Y1, I will remind you, is the integral on Y2 of F of Y1 Y2 DY2.
00:27:47.400 --> 00:27:53.300
Now, we actually worked this one out in one of the examples in the previous lecture.
00:27:53.300 --> 00:28:05.000
It was example 3, in the previous lecture.
00:28:05.000 --> 00:28:09.500
There was in the previous lecture, that lecture was called marginal probability.
00:28:09.500 --> 00:28:16.700
If you just look back, you will see this one worked out, at least the marginal probability function.
00:28:16.700 --> 00:28:23.200
I'm not going to work that out again, but I'm just going to quote the answer there and where was it.
00:28:23.200 --> 00:28:37.200
I have it written down here, it is 3Y1² - 6Y1 + 3, we work that out in example 3.
00:28:37.200 --> 00:28:41.900
If you do not remember how that went, you can you try to redo the integral yourself right now and
00:28:41.900 --> 00:28:43.700
just check that you get the right answer.
00:28:43.700 --> 00:28:48.800
If that is still not making sense, just go back and look in example 3, in the marginal probability lecture,
00:28:48.800 --> 00:28:53.300
you will see it all worked out.
00:28:53.300 --> 00:28:57.400
Remember that, we are given that Y1 is equal to ½.
00:28:57.400 --> 00:29:14.000
Let me go ahead and plug in F1 of ½ is 3 × ½², that is 3 × ¼ -6 × ½ which is 3 + 3.
00:29:14.000 --> 00:29:18.700
That is just ¾ -3 + 3 is ¾.
00:29:18.700 --> 00:29:23.700
I’m going to use that in here, as my denominator over on the left.
00:29:23.700 --> 00:29:37.200
F1 of Y1 is ¾ and F of Y1 Y2 is 6 × 1 - Y2, that is the joint density function that is given to us.
00:29:37.200 --> 00:29:49.300
6 divided by ¾, do the flip on the denominator and you get 6 × 4/3 which is 8 × 1 – Y2.
00:29:49.300 --> 00:29:56.500
That is our conditional density function where Y1 is ½.
00:29:56.500 --> 00:30:02.600
What we want to do is we want to integrate that, the probability that we are looking for
00:30:02.600 --> 00:30:14.800
is the integral from Y2 = ¾ to Y2 = 1 of 8 × 1 - Y2 DY2.
00:30:14.800 --> 00:30:20.400
Notice that, there is no Y1’s left in here anywhere because we I plug in Y1 = ½.
00:30:20.400 --> 00:30:22.400
That is a pretty easy integral now.
00:30:22.400 --> 00:30:34.600
8Y2 - the integral of 8Y2 is 4Y2².
00:30:34.600 --> 00:30:42.000
We want to integrate that from Y2 = ¾ to Y2 = 1.
00:30:42.000 --> 00:30:45.300
My 3, kind of disappeared, trying to do nothing here.
00:30:45.300 --> 00:30:48.700
Let me write that a little bigger, there we go.
00:30:48.700 --> 00:31:01.100
This is 8 – 4, -8 × Y2, that is 8 × ¾, -6.
00:31:01.100 --> 00:31:15.900
+ 4 × Y2², 4 × ¾² is 4 × 9/16 which is, let me go ahead and write this down.
00:31:15.900 --> 00:31:24.000
4 × 9/16 which is 9/4.
00:31:24.000 --> 00:31:36.400
-4 -6 is 8 -10 is -2 + 9/4 is + 2 and ¼, that gives me ¼.
00:31:36.400 --> 00:31:39.500
That is my answer, that is my probability.
00:31:39.500 --> 00:31:50.600
If Y1 is ½ then the probability that Y2 is bigger than ¾ is exactly ¼.
00:31:50.600 --> 00:31:55.100
A lot of steps involved there and some of it may be rather confusing.
00:31:55.100 --> 00:32:00.900
Let me go back and go over those again, just quickly, so that everybody is on board here.
00:32:00.900 --> 00:32:03.600
The first thing I did was, I graphed the triangle.
00:32:03.600 --> 00:32:10.100
There is my triangle right there, we are describing this triangle.
00:32:10.100 --> 00:32:20.200
We are given that Y1 is ½ which means we are kind of stuck at that red line where Y1 is equal to ½.
00:32:20.200 --> 00:32:26.500
We are trying to find the probability that Y2 is bigger than ¾ .
00:32:26.500 --> 00:32:33.500
What I'm going to use, since that is not inequality there, that is equality, that is different from example 1.
00:32:33.500 --> 00:32:37.100
In example 1, we had an inequality there which that we are looking at these
00:32:37.100 --> 00:32:39.600
two dimensional regions and setting up double integrals.
00:32:39.600 --> 00:32:45.700
This is really quite different, even it looks very similar to example 1.
00:32:45.700 --> 00:33:02.100
Because it is an inequality, we want to use our conditional density formula F of Y2 given a value of Y1.
00:33:02.100 --> 00:33:06.400
And then, we want to find the probability that Y2 is bigger than ¾.
00:33:06.400 --> 00:33:09.500
And that is why I integrated from 3/4 to 1.
00:33:09.500 --> 00:33:14.700
Now, I need to figure out this formula F of Y2 given Y1.
00:33:14.700 --> 00:33:24.400
By definition, I gave you this earlier on in this lecture, it is the joint density formula divided by the marginal density formula.
00:33:24.400 --> 00:33:29.400
The marginal density formula is something we learn about in the previous lecture.
00:33:29.400 --> 00:33:35.200
We actually worked out this example in the previous lecture, the marginal probability lecture.
00:33:35.200 --> 00:33:39.500
Just check back and look at example 3 in that lecture.
00:33:39.500 --> 00:33:45.300
You will see that we worked it out to be this expression in terms of Y1.
00:33:45.300 --> 00:33:49.400
Or you can just work out the integral yourself right now and make sure that checks.
00:33:49.400 --> 00:33:59.000
Given that Y1 is ½, that is why I plug in that value of ½, worked it through and got ¾.
00:33:59.000 --> 00:34:06.000
That is my ¾ there, and the joint density formula comes from the stem of the problem.
00:34:06.000 --> 00:34:13.500
That is where that comes from, the ¾ comes in there, and that simplifies down to 8 × 1 - Y2.
00:34:13.500 --> 00:34:21.300
I just plug that into my integral, plug that into this formula right here.
00:34:21.300 --> 00:34:30.600
Solve out the integral, simplify the fractions, and I get my probability of ¼.
00:34:30.600 --> 00:34:34.400
In example 3, we are given a joint density function.
00:34:34.400 --> 00:34:42.200
It is on a square, a little bit easier than what we had to deal with in examples 1 and 2.
00:34:42.200 --> 00:34:44.000
We got to graph that out.
00:34:44.000 --> 00:34:51.000
There is Y2, here is Y1, and we have a square.
00:34:51.000 --> 00:35:01.800
Y1 and Y2 are both trapped between 0 and 1, there is my region.
00:35:01.800 --> 00:35:11.900
What we want to do is, find the probability that Y1 is greater than ¾ given that Y2 is equal to ½.
00:35:11.900 --> 00:35:14.900
Let me graph what we are really calculating here.
00:35:14.900 --> 00:35:20.100
We are given that Y2 is equal to ½.
00:35:20.100 --> 00:35:25.200
There is Y2 equal to ½, let me draw a nice, thick red line.
00:35:25.200 --> 00:35:30.900
We are just looking at that red line region, right there.
00:35:30.900 --> 00:35:37.200
We want to find the probability that Y1 is bigger than ¾.
00:35:37.200 --> 00:35:50.400
There is ½, there is ¾, and we want to find the probability of being in that black dotted region, if we are on the red line.
00:35:50.400 --> 00:35:51.700
That is what we are really calculating.
00:35:51.700 --> 00:36:01.400
If we know we are on the red line, sum these totals that Y2 is ½, what is the probability that Y1 is bigger than ¾?
00:36:01.400 --> 00:36:04.700
I mislabel my axis, my mistake there.
00:36:04.700 --> 00:36:09.900
That should have been a Y1 and that should have been a Y2.
00:36:09.900 --> 00:36:17.100
I always put Y1 on the horizontal axis, but for some reason, I just wrote them down this time.
00:36:17.100 --> 00:36:23.400
Since, we have an inequality here and not an equality,
00:36:23.400 --> 00:36:32.900
we are going to use the marginal density function here and the conditional density function.
00:36:32.900 --> 00:36:53.800
We want the integral from Y1 = ¾ to Y1 = 1 of the conditional density function F of Y1 given Y2, given a value of Y2.
00:36:53.800 --> 00:36:58.100
We want to integrate that DY1.
00:36:58.100 --> 00:37:02.800
I got to figure out what that conditional density function is.
00:37:02.800 --> 00:37:18.600
F of Y1 condition on Y2 is equal to the joint density function F of Y1 Y2 divided by F2 of Y2.
00:37:18.600 --> 00:37:21.100
A lot of ingredients that I have to put in here.
00:37:21.100 --> 00:37:24.000
I need to figure out what F2 of Y2 is.
00:37:24.000 --> 00:37:31.400
That is the marginal density function, that we learn about in the previous lecture.
00:37:31.400 --> 00:37:35.300
One thing you learned in the previous lecture is that, you always switch the variables.
00:37:35.300 --> 00:37:44.000
F2 of Y2 is the integral on Y1 of F of Y1, Y2.
00:37:44.000 --> 00:37:48.300
And then, you integrate that with respect to Y1.
00:37:48.300 --> 00:37:57.500
In this case, the range on Y1 is from 0 to 1, Y1 = 0 to Y1 = 1.
00:37:57.500 --> 00:38:06.300
The joint density function that we are given is 4Y1 Y2 DY1.
00:38:06.300 --> 00:38:07.800
Now, that is an easy integral.
00:38:07.800 --> 00:38:12.300
Remember, we are integrating with respect to Y1.
00:38:12.300 --> 00:38:16.400
Y2 just comes along for the Y as a constant.
00:38:16.400 --> 00:38:22.900
The integral of 4Y1 is 2Y1².
00:38:22.900 --> 00:38:31.200
And then, we still have that Y2, integrate from Y1 = 0 to Y1 = 1.
00:38:31.200 --> 00:38:38.400
We just get 2Y2 as the marginal density function.
00:38:38.400 --> 00:38:45.900
Remember that, that should always be a function of Y2, if we are looking for the marginal density function of Y2.
00:38:45.900 --> 00:38:52.000
2Y2 is a function of Y2, that is reassuring.
00:38:52.000 --> 00:39:05.700
F of Y1 condition on Y2 is our joint density function 2Y1, Y2.
00:39:05.700 --> 00:39:18.100
I’m sorry, 4Y1 Y2, that was our joint density function divided by 2Y2 and that simplifies down to 2Y1.
00:39:18.100 --> 00:39:21.200
By the way, notice that the Y2 was canceled out.
00:39:21.200 --> 00:39:24.100
That is kind of a freak of nature for this problem.
00:39:24.100 --> 00:39:28.200
If the Y2’s had not cancel out, if we still had a Y2 in there,
00:39:28.200 --> 00:39:41.500
then we would have plugged in the value of Y2 that we are given, Y2 = ½.
00:39:41.500 --> 00:39:51.200
Let me say, we plugged in Y2 = ½, if necessary.
00:39:51.200 --> 00:39:55.200
We did not have to do that because it just cancel each other out, in this particular problem.
00:39:55.200 --> 00:39:57.600
But that would not always happen.
00:39:57.600 --> 00:40:01.000
We really want to get a function of Y1 here.
00:40:01.000 --> 00:40:08.700
The reason is, because we are going to take that and plug that back into our original integral, and integrate over Y1.
00:40:08.700 --> 00:40:19.500
Y1 = ¾ to Y1 = 1 of 2Y1 DY1.
00:40:19.500 --> 00:40:24.200
Now, that is an easy integral, it is just Y1².
00:40:24.200 --> 00:40:30.700
We want to integrate that from Y1 = ¾ to 1.
00:40:30.700 --> 00:40:37.000
That is just 1 – 3/4² is 9/16.
00:40:37.000 --> 00:40:42.700
What we will get here is 7/16, that is our probability.
00:40:42.700 --> 00:40:50.100
What that really means is that, if we are choosing a value according to this joint density function,
00:40:50.100 --> 00:41:04.300
and somebody tells us that Y2 is definitely equal to ½, then our probability of Y1 being bigger than ¾ is exactly 7/16.
00:41:04.300 --> 00:41:07.200
Let me recap the steps involved there.
00:41:07.200 --> 00:41:14.800
First, I graphed the region Y1 goes from 0 to 1, Y2 goes from 0 to 1, that just gives me the square right here.
00:41:14.800 --> 00:41:20.400
And then, I tried to look at the region we are interested in which is where Y2 is equal to ½.
00:41:20.400 --> 00:41:25.000
That is where I got this horizontal line, at Y2 is ½.
00:41:25.000 --> 00:41:30.100
And then, in particular, we are wondering whether Y1 is bigger than ¾.
00:41:30.100 --> 00:41:38.900
That is why I graphed this, it is a little hard to see here but this dotted, black line at ¾.
00:41:38.900 --> 00:41:49.200
We are asking, if we are on the red horizontal line, what is our chance of being in the black part of the red line?
00:41:49.200 --> 00:41:58.900
In order to calculate that, we set up the integral on Y1 of the conditional density function.
00:41:58.900 --> 00:42:01.900
I had to figure out what the conditional density function was.
00:42:01.900 --> 00:42:06.800
I started out with the joint density function divided by the marginal density function,
00:42:06.800 --> 00:42:10.200
which means I had to figure out what the marginal density function was.
00:42:10.200 --> 00:42:17.600
F2 of Y2, remember the variables switch, that is the integral over Y1 of the joint density function.
00:42:17.600 --> 00:42:22.800
I integrate the joint density function over my range of Y1.
00:42:22.800 --> 00:42:33.600
It turns out to be 2Y2, which is reassuring that it is a function of Y2.
00:42:33.600 --> 00:42:41.900
I take that and I plug it back in for F2 of Y2.
00:42:41.900 --> 00:42:51.600
I plug in the joint density function for my numerator and it simplifies down to 2Y1, that is already a function of Y1.
00:42:51.600 --> 00:43:00.200
But, if there had been a Y2, I would have plugged in the given value of Y2 in there, if I needed to.
00:43:00.200 --> 00:43:08.500
I take that to Y1, I plug it back in here because I have now figure out the conditional density function.
00:43:08.500 --> 00:43:18.200
Now, I just have an easy integral in terms of Y1 and I just calculated that integral, I got my 7/16.
00:43:18.200 --> 00:43:23.600
In example 4, we are going to keep looking at that same setup from example 3.
00:43:23.600 --> 00:43:26.000
Let me go ahead and graph that, as I talk about it.
00:43:26.000 --> 00:43:33.700
We have Y1 and Y2, they are both between 0 and 1.
00:43:33.700 --> 00:43:37.300
There is my Y1 on the horizontal axis, as always.
00:43:37.300 --> 00:43:42.500
Y2 on the vertical axis, there is 1.
00:43:42.500 --> 00:43:51.500
We are in this square and we want to find the conditional expectation of Y1 given that Y2 is equal to ½.
00:43:51.500 --> 00:44:03.600
We know that Y2 is equal to ½ and we know that we are on this red line, right here, that is where Y2 is equal to ½.
00:44:03.600 --> 00:44:07.700
I should have labeled that as ½, right there.
00:44:07.700 --> 00:44:10.600
Y2 is ½, I know I’m on that red line.
00:44:10.600 --> 00:44:15.100
I want to find the conditional expectation of Y1.
00:44:15.100 --> 00:44:18.900
I’m going to use my formula for conditional expectation.
00:44:18.900 --> 00:44:23.000
I gave you this formula back on the third slide of this lecture.
00:44:23.000 --> 00:44:30.200
Just scroll back a few slides in the video and you will see the formula for conditional expectation.
00:44:30.200 --> 00:44:45.900
It is the integral on Y1 of Y1 × the conditional density formula F of Y1 condition on Y2.
00:44:45.900 --> 00:44:49.200
And then, we integrate that with respect to Y1.
00:44:49.200 --> 00:44:58.700
This looks just like the formula for calculating conditional probability, except, the difference is this extra factor of Y1,
00:44:58.700 --> 00:45:01.800
because we are trying to find an expected value right there.
00:45:01.800 --> 00:45:12.900
It is just like back in the single variable case, the expected value of Y was the integral of Y × F of Y DY.
00:45:12.900 --> 00:45:19.400
We have this extra factor of Y in there.
00:45:19.400 --> 00:45:27.700
Here, we are trying to find the expected value of Y1, so we put in that extra factor of Y1.
00:45:27.700 --> 00:45:30.900
This is the same setup that we had for example 3.
00:45:30.900 --> 00:45:40.800
I’m do not want to use a marker there, I want to use a thin pen.
00:45:40.800 --> 00:45:53.200
We already calculated the conditional density function which was 2Y1, by example 3.
00:45:53.200 --> 00:46:07.100
If you did not just watched example 3 in this lecture, just scroll back one slide and take a peek at example 3,
00:46:07.100 --> 00:46:12.000
where we went through some work to calculate the conditional density formula.
00:46:12.000 --> 00:46:16.800
We figure out that it was 2Y1.
00:46:16.800 --> 00:46:23.300
We can now integrate it, we are supposed to integrate it on the whole range of Y1 which is from 0 to 1.
00:46:23.300 --> 00:46:36.100
Y1 = 0 to Y1 = 1, Y1 × 2Y1 is 2Y1² DY1.
00:46:36.100 --> 00:46:44.300
The integral of 2Y1² is 2 × 1/3 Y1³, 2/3 Y1³.
00:46:44.300 --> 00:46:50.800
We want to integrate that from Y1 = 0 to Y1 = 1.
00:46:50.800 --> 00:46:58.900
Not integrate that but evaluate that from Y1 = 0 to Y1 = 1, and that is just 2/3.
00:46:58.900 --> 00:47:00.200
And that is our answer.
00:47:00.200 --> 00:47:09.200
What that means is that, if you are leaving in this joint density function and you have been told that
00:47:09.200 --> 00:47:15.300
Y2 is equal to ½, you are given that Y2 is equal ½.
00:47:15.300 --> 00:47:21.400
Your expected value for Y1 then is 2/3.
00:47:21.400 --> 00:47:24.100
Let me recap the steps here.
00:47:24.100 --> 00:47:30.300
We are working on a square region because that is what is given in the stem of the problem,
00:47:30.300 --> 00:47:35.300
Y1 and Y2 are both between 0 and 1.
00:47:35.300 --> 00:47:38.200
We are going to use the conditional expectations.
00:47:38.200 --> 00:47:48.100
Since we know that Y2 is ½, the formula for conditional expectation that I gave you in the third slide of the same video is,
00:47:48.100 --> 00:47:51.700
the integral of Y1 that is kind of the new factor there because
00:47:51.700 --> 00:47:59.800
we are looking for expected value of the conditional density formula.
00:47:59.800 --> 00:48:04.100
The conditional density formula is what we worked out back in example 3.
00:48:04.100 --> 00:48:08.600
Example 3 was the same setup and we did work out the conditional density formula
00:48:08.600 --> 00:48:12.200
sort of a route to finding the probability.
00:48:12.200 --> 00:48:16.200
That part, the 2Y1 was the same as in examples 3.
00:48:16.200 --> 00:48:20.500
This Y1 was new and we combine them, we get 2Y1².
00:48:20.500 --> 00:48:31.300
And then, we get a very easy integral that just solves out to 2/3.
00:48:31.300 --> 00:48:43.900
In example 5, we are given the joint density function F of Y1 Y2 is E ⁻Y2.
00:48:43.900 --> 00:48:48.100
We are given that on a particular region, I think I better start by graphing that region
00:48:48.100 --> 00:48:53.300
because otherwise, there will be some confusion.
00:48:53.300 --> 00:48:59.400
There is Y1 on my horizontal axis, always, there is Y2.
00:48:59.400 --> 00:49:04.400
I think that might run slightly off to the side, let us move that a little bit.
00:49:04.400 --> 00:49:13.100
We are told that they both go from 0 to infinity but Y2 was always bigger than Y1.
00:49:13.100 --> 00:49:17.900
Let me graph the line Y2 = Y1.
00:49:17.900 --> 00:49:24.800
We are looking at this region sort of above that line.
00:49:24.800 --> 00:49:33.800
This is the same setup that we had in one of the examples on the previous lecture.
00:49:33.800 --> 00:49:36.500
Let me give you a reference for that.
00:49:36.500 --> 00:49:53.000
This was in the lecture on marginal probability and it was example 5, in the previous lecture.
00:49:53.000 --> 00:50:02.000
You might want to go back and look at our solution to example 5, in the lecture on marginal probability, the previous video.
00:50:02.000 --> 00:50:04.700
If you just scroll up here, you will see it.
00:50:04.700 --> 00:50:08.100
It is the same example but we are calculating something different.
00:50:08.100 --> 00:50:15.700
What we did there was we calculated the marginal density function.
00:50:15.700 --> 00:50:20.000
We calculated F1 of Y1.
00:50:20.000 --> 00:50:29.700
The way we calculate it was, by doing the integral on Y2 of the joint density function F Y1 Y2 DY2.
00:50:29.700 --> 00:50:33.700
The answer we got there was E ^- Y1.
00:50:33.700 --> 00:50:36.400
It was a little bit of work to getting it.
00:50:36.400 --> 00:50:43.200
I'm skipping over some of those details, when I talk about it now.
00:50:43.200 --> 00:50:49.500
If you want to go back and check that out, or if you want to redo the integral then you will see where that comes from.
00:50:49.500 --> 00:51:02.300
In today's example, what we are going to figure out is the expected value of Y2 given that Y1 is equal to 5.
00:51:02.300 --> 00:51:04.300
Let me show you, how we are going to calculate that.
00:51:04.300 --> 00:51:09.300
I’m going to use our formula for conditional expectation.
00:51:09.300 --> 00:51:12.700
Let me see if I can graph this quickly.
00:51:12.700 --> 00:51:25.000
Y1 is equal to 5 and that means we are on the line Y1 is equal to 5.
00:51:25.000 --> 00:51:36.100
There is the line Y1 is equal to 5 and that is the line that I'm looking at.
00:51:36.100 --> 00:51:43.300
I want to figure out what the expected value of Y2 will be, if I know that I'm fixed on that red line.
00:51:43.300 --> 00:51:46.700
I’m going to use the formula for conditional expectation.
00:51:46.700 --> 00:52:06.700
That is the integral on Y2 of, here is the new part, the new element is Y2 × F of Y2 given Y1, Y2 condition on Y1 DY2.
00:52:06.700 --> 00:52:15.900
The new element there is that Y2, in order to calculate the conditional expectation.
00:52:15.900 --> 00:52:23.300
That means, I have to figure out what F of Y2 condition on Y1 is.
00:52:23.300 --> 00:52:25.800
Let me calculate that over on the side here.
00:52:25.800 --> 00:52:42.300
F of Y2 condition on Y1, by definition, it is F of Y1, Y2 divided by the marginal density function F1 of Y1.
00:52:42.300 --> 00:52:52.100
In turn, F of Y1 Y2, that is E ⁻Y2, that was given in the stem the problem.
00:52:52.100 --> 00:52:59.400
F1 of Y1, that was what we figured out in example 5 of the previous lecture,
00:52:59.400 --> 00:53:05.200
of the marginal probability lecture, that is E ⁻Y1.
00:53:05.200 --> 00:53:13.500
If we put those together, E ^- Y1, if we flip it up to the numerator, that would be E ⁺Y1.
00:53:13.500 --> 00:53:22.800
E ⁺Y1 - Y2, that is what I'm going to plug in there.
00:53:22.800 --> 00:53:26.100
What is my range on Y2?
00:53:26.100 --> 00:53:31.800
If you look at the range on Y2, it is all the range of this red line.
00:53:31.800 --> 00:53:38.700
That red line starts at Y2 is equal to 5 and it goes on up to infinity.
00:53:38.700 --> 00:53:50.500
My range on Y2 is going to be Y2 = 5 2Y2, I will take the limit as it goes to infinity.
00:53:50.500 --> 00:54:02.600
I'm integrating Y2 × E ⁺Y1 - Y2 DY2.
00:54:02.600 --> 00:54:08.900
I do not want to see a Y1 in here, I want to be integrating with respect to Y2 because I need to get an answer,
00:54:08.900 --> 00:54:12.100
in terms of a numerical answer.
00:54:12.100 --> 00:54:14.800
I’m integrating only with respect to Y2.
00:54:14.800 --> 00:54:18.100
I'm not comfortable with that Y1 in there.
00:54:18.100 --> 00:54:21.100
But, I'm given that Y1 is equal to 5.
00:54:21.100 --> 00:54:27.600
I’m going to plug in Y1 is equal to 5.
00:54:27.600 --> 00:54:36.800
I get the integral, I will write the bounds right now, Y2 × E⁵ - Y2 DY2.
00:54:36.800 --> 00:54:43.100
That is much more reassuring now because I have only Y2 in there.
00:54:43.100 --> 00:54:49.600
I know that, if I integrate this with respect to Y2, I will get a numerical answer.
00:54:49.600 --> 00:54:53.000
Something I can do here is, I could pull E⁵.
00:54:53.000 --> 00:55:01.800
That is E⁵ × Y2 × E ^- Y2 DY2.
00:55:01.800 --> 00:55:07.200
That is a slightly unpleasant integral, I’m going to have to use integration by parts on that.
00:55:07.200 --> 00:55:10.800
Let me do a quick integration by parts, I’m going to use tabular integration.
00:55:10.800 --> 00:55:14.700
It is the cheater’s way of doing integration by parts quickly.
00:55:14.700 --> 00:55:23.000
Y2 E ⁻Y2, if I take derivatives on the left, the derivative of Y2 is 1.
00:55:23.000 --> 00:55:30.600
The derivative of 1 is 0, and the integral of E ⁻Y2 is –E ⁻Y2.
00:55:30.600 --> 00:55:35.400
The integral of that is E ⁻Y2.
00:55:35.400 --> 00:55:40.500
Draw my little diagonal lines and put a + and – there.
00:55:40.500 --> 00:55:54.000
This is E⁵ × - Y2, E ⁻Y2 multiplying down the diagonal lines, - E ^- Y2.
00:55:54.000 --> 00:55:59.700
That was integration by parts, borrowing some techniques from calculus 2.
00:55:59.700 --> 00:56:03.300
If you are a little rusty on your integration by parts, guess what,
00:56:03.300 --> 00:56:09.300
we have a video lecture series on college calculus level 2.
00:56:09.300 --> 00:56:14.500
It is hosted by, non other than Will Murray, it is right here on www.educator.com.
00:56:14.500 --> 00:56:20.800
You can figure out, you can review your integration by parts, if you are a little rusty on that.
00:56:20.800 --> 00:56:24.700
In the meantime, we are going to plough forward with the probability.
00:56:24.700 --> 00:56:35.700
We are trying to integrate this from Y2 = 5 to the limit as Y2 goes to infinity.
00:56:35.700 --> 00:56:42.500
This is E⁵, I see I had E ⁻Y2 here.
00:56:42.500 --> 00:56:45.800
If I plug in infinity, that is E ⁻infinity.
00:56:45.800 --> 00:56:53.000
Even though, that is multiplied by infinity, if I did a little Patel’s rule on that, it would still go to 0.
00:56:53.000 --> 00:57:01.800
E ⁻Y2 is still 0, when I have Y2 going to infinity, both of those terms dropout.
00:57:01.800 --> 00:57:11.000
I have a term for Y2 is equal to 5, + 5 E⁻⁵ + ,
00:57:11.000 --> 00:57:13.900
I’m putting + in here because I’m subtracting -.
00:57:13.900 --> 00:57:23.400
E⁻⁵, and I see I got E⁵ × E⁻⁵, those cancel out.
00:57:23.400 --> 00:57:30.800
This is 6 E⁻⁵ × E⁻⁵ cancels out, gives me a very nice answer here.
00:57:30.800 --> 00:57:41.400
It is just 6 is my answer, that is my expected value of Y2 given that Y1 is equal to 5.
00:57:41.400 --> 00:57:49.500
That is what I just calculated, the expected value of Y2 given that Y1 is equal to 5.
00:57:49.500 --> 00:57:59.600
If somebody tells me that Y1 is equal to 5, that is going to be my guess for what Y2 is.
00:57:59.600 --> 00:58:03.000
That is really the end of the problem but let me recap the steps here.
00:58:03.000 --> 00:58:09.700
First, I looked at the region here, Y1 and Y2 go from 0 to infinity, and I just graph it.
00:58:09.700 --> 00:58:14.000
I graphed that up here, it is this blue triangular region here.
00:58:14.000 --> 00:58:24.100
The important thing to notice there is that, Y2 is bigger than Y1 which is why I have the region north of the line Y = X.
00:58:24.100 --> 00:58:29.000
And then, I also noticed that we are told that Y1 is equal to 5.
00:58:29.000 --> 00:58:34.200
I went ahead and graphed Y1 is equal to 5, it is this vertical red line here.
00:58:34.200 --> 00:58:42.100
Since, we are calculating conditional expectation, I'm going to use the conditional expectation formula
00:58:42.100 --> 00:58:50.000
which we learned about on the third slide of this lecture, the preamble to this lecture.
00:58:50.000 --> 00:58:58.100
You integrate the conditional density formula which you put this extra factor Y2 in there, because it is the conditional expectations.
00:58:58.100 --> 00:59:04.800
That comes from this term, right here, that is where we get that Y2 from there.
00:59:04.800 --> 00:59:08.400
What about this F of Y2 condition on Y1.
00:59:08.400 --> 00:59:17.200
That is something we have to calculate as the joint density function divided by the marginal density function.
00:59:17.200 --> 00:59:24.200
The marginal density function was something that we figure out back in the lecture on marginal probability.
00:59:24.200 --> 00:59:31.600
We did this problem or at least that part of this problem, back in example 5 of the previous videos.
00:59:31.600 --> 00:59:36.800
Just go back, scroll back, and look in example 5, if you do not know where that comes from.
00:59:36.800 --> 00:59:46.000
The answer for the marginal density function was F1 of Y1 is E ⁻Y1.
00:59:46.000 --> 00:59:57.900
Drop that in right here, for F1 of Y1, the numerator here F of Y1 Y2, that comes from this given function here.
00:59:57.900 --> 00:59:59.300
That is where that comes from.
00:59:59.300 --> 01:00:03.800
And then, I simplified that to E ⁺Y1 - Y2.
01:00:03.800 --> 01:00:11.000
And then, I plugged that whole thing back in here, back into this integral.
01:00:11.000 --> 01:00:14.600
I did not like the fact that there was a Y1 in there.
01:00:14.600 --> 01:00:19.800
The reason I did not like it was because I’m integrating with respect to Y2.
01:00:19.800 --> 01:00:22.500
I want to get a number at the end.
01:00:22.500 --> 01:00:32.100
I do not have any way to get rid of that Y1, except to remember that I was told that Y1 is equal to 5.
01:00:32.100 --> 01:00:44.500
That is where I plugged in 5 for Y1, which is kind of nice because it made it into E⁵ × E ⁻Y2.
01:00:44.500 --> 01:00:50.800
I can pull it right out of the integral and now I have a nice little integral, in terms of Y2.
01:00:50.800 --> 01:00:55.100
Fairly nice integral, it is something that I have to use integration by parts for.
01:00:55.100 --> 01:01:02.100
If you are rusty on integration by parts, here is the quick and dirty way to do integration by parts, for this kind of problem.
01:01:02.100 --> 01:01:06.500
If you really want to practice integration by parts, check the calculus level 2 lectures
01:01:06.500 --> 01:01:16.000
here on www.educator.com, you will see a whole lecture on integration by parts.
01:01:16.000 --> 01:01:21.200
You can get up to speed on that.
01:01:21.200 --> 01:01:24.600
Here is what the answer gives me from integration by parts.
01:01:24.600 --> 01:01:31.200
When I plug in Y2 going to infinity, but that kind of kills both terms, if you do a little Patel’s rule
01:01:31.200 --> 01:01:34.600
you will see why that term gives you 0.
01:01:34.600 --> 01:01:42.500
And then, I plugged in Y2 = 5 to both terms, that simplify down to 6 E⁻⁵ which very nice.
01:01:42.500 --> 01:01:50.800
It cancel with E⁵ and gave me just 6 as my expected value.
01:01:50.800 --> 01:01:55.700
That wraps up this lecture on conditional probability and conditional expectation.
01:01:55.700 --> 01:02:01.800
I want to keep using some of the same concepts in the next lecture, which is on independent random variables.
01:02:01.800 --> 01:02:04.200
We will see how that is connected to some of this.
01:02:04.200 --> 01:02:11.900
This is part of the chapter on Bivariate density functions and Bivariate distribution, functions of two variables.
01:02:11.900 --> 01:02:19.000
That in turn, is part of a larger lecture series on probability here on www.educator.com.
01:02:19.000 --> 01:02:22.900
Your host, all the way, is Will Murray, thank you very much for joining me today.
01:02:22.900 --> 01:02:24.000
We will see you next time, bye.