WEBVTT mathematics/probability/murray
00:00:00.000 --> 00:00:05.500
Hi there, these are the probability videos here on www.educator.com, my name is Will Murray.
00:00:05.500 --> 00:00:10.700
We are working through a series of videos on experiments involving two variables.
00:00:10.700 --> 00:00:15.700
Right now, we will always have a Y1 and a Y2 in all of our experiments.
00:00:15.700 --> 00:00:20.600
We are talking about joint density functions and things like that.
00:00:20.600 --> 00:00:23.800
Today, we will talk about marginal probability.
00:00:23.800 --> 00:00:28.500
Marginal probability is kind of a tool that you use in the service
00:00:28.500 --> 00:00:33.200
of calculating conditional probability and conditional expectation.
00:00:33.200 --> 00:00:37.700
We do have another video that comes after this one where you will see this being used
00:00:37.700 --> 00:00:42.200
in the service of conditional probability and conditional expectation.
00:00:42.200 --> 00:00:46.200
In this video, we are just going to learn what marginal probability is.
00:00:46.200 --> 00:00:51.700
We will learn how to calculate it, we will practice it with some examples.
00:00:51.700 --> 00:00:58.600
Marginal probability is something you can talk about with discrete probability or with continuous probability.
00:00:58.600 --> 00:01:03.800
As I said, we have an experiment with two random variables Y1 and Y2.
00:01:03.800 --> 00:01:07.700
We are going to talk about the marginal probability function.
00:01:07.700 --> 00:01:14.900
There is a marginal probability function for Y1 and then there is a separate marginal probability function for Y2.
00:01:14.900 --> 00:01:21.800
What they mean is, the marginal probability function of Y1, we call it P1 of Y₁.
00:01:21.800 --> 00:01:27.000
By definition, the := that means it is defined to be.
00:01:27.000 --> 00:01:34.100
It is defined to be the probability that Y1 will be a particular value of y1.
00:01:34.100 --> 00:01:39.900
The way you would find that is, you would look at all the possible values of Y2.
00:01:39.900 --> 00:01:45.800
Add up all the possible values of Y2 and then find the probability of each combination
00:01:45.800 --> 00:01:53.200
of that particular fixed value of Y1 with all the different possible values of Y2.
00:01:53.200 --> 00:02:02.900
Let me emphasize here that, that Y1 there is fixed and we are adding up over all the possible values of Y2.
00:02:02.900 --> 00:02:10.100
And then, you can also talk about the marginal probability function of Y2 which means you have a fixed value of Y2.
00:02:10.100 --> 00:02:15.000
You are trying to find the probability of getting that particular value of Y2.
00:02:15.000 --> 00:02:22.900
The way you find that, is you add up all the probabilities of combinations with all the different possible y1s.
00:02:22.900 --> 00:02:28.500
This is really quite confusing for students because there is a sort of a subscript change here.
00:02:28.500 --> 00:02:35.300
We are finding the marginal probability function for Y1, notice that there are 1’s in the subscripts there.
00:02:35.300 --> 00:02:40.700
What we will do is we add up over all the possible values of Y2, and then, vice versa.
00:02:40.700 --> 00:02:48.100
When we are finding the marginal probability function for Y2, we add up over all the possible values of Y1.
00:02:48.100 --> 00:02:50.600
That gets a little confusing, we will do some practice with this.
00:02:50.600 --> 00:02:53.300
You will see in the examples how it works out.
00:02:53.300 --> 00:02:58.700
That is just the discrete case, the continuous case is very much analogous.
00:02:58.700 --> 00:03:03.400
We are going to take a look at that with the continuous case but you will see it is kind of the same thing.
00:03:03.400 --> 00:03:08.800
Except that, we are going to change the summation signs to integral signs.
00:03:08.800 --> 00:03:15.300
The continuous case, we will talk about the marginal density function of Y1 and Y2.
00:03:15.300 --> 00:03:20.200
For Y1, we talk about F₁ of Y1.
00:03:20.200 --> 00:03:26.800
Again, we add up, instead of P of Y1 Y2, it is F of Y1 Y2, the joint density function.
00:03:26.800 --> 00:03:33.500
We take the integral over all possible values of Y2.
00:03:33.500 --> 00:03:41.600
To make it most general here, I have written from Y2 goes from -infinity to infinity.
00:03:41.600 --> 00:03:51.300
For the marginal density function of Y2, we add up or we take the integral over all possible values of Y1.
00:03:51.300 --> 00:03:56.700
I wrote Y1 goes from -infinity to infinity.
00:03:56.700 --> 00:04:02.100
It is true in many of our experiments and many of our problems,
00:04:02.100 --> 00:04:06.600
but we do not actually have distributions covering an infinite range.
00:04:06.600 --> 00:04:10.000
You would not actually have to integrate from -infinity to infinity.
00:04:10.000 --> 00:04:16.700
The point here is, you just integrate over whatever the range is for that particular variable.
00:04:16.700 --> 00:04:23.500
Here, you just integrate over the full range for Y1.
00:04:23.500 --> 00:04:32.000
Here, you just integrate over the full range for Y2.
00:04:32.000 --> 00:04:36.800
Whatever those full ranges are, for whatever that variable is, that is what you integrate over.
00:04:36.800 --> 00:04:41.500
Again, we had that same subscript change that I mentioned with the discrete case,
00:04:41.500 --> 00:04:46.400
which is that, when you are finding the marginal density function for Y1,
00:04:46.400 --> 00:04:50.500
what you end up doing is you integrate over Y2.
00:04:50.500 --> 00:04:58.100
Be very careful about that, when we are finding marginal density function for Y1, your variable of integration is Y2.
00:04:58.100 --> 00:05:06.900
And of course, vice versa , when you are finding the marginal density function for Y2, your variable of integration is Y1.
00:05:06.900 --> 00:05:11.200
That does get to be a little confusing, we will try to keep it straight.
00:05:11.200 --> 00:05:22.200
As I said, the marginal density functions are, there are something that are used in computing conditional probability.
00:05:22.200 --> 00:05:28.700
We will come back in the next video, the next day lecture, and we will see how these are used.
00:05:28.700 --> 00:05:33.400
The purpose of this video is just to practice calculating the marginal probability functions.
00:05:33.400 --> 00:05:37.000
It may not be that enlightening, why we are doing this at this point.
00:05:37.000 --> 00:05:45.100
We are going to work through some examples, calculate the marginal probability functions, and just see what we get.
00:05:45.100 --> 00:05:48.700
In the next video, we will come back and we will calculate conditional probability,
00:05:48.700 --> 00:05:53.400
conditional expectation, using these marginal probability functions.
00:05:53.400 --> 00:05:59.200
And you will see how we can actually apply these to real settings.
00:05:59.200 --> 00:06:03.300
In example 1, we are going to roll to dice, a red dice and a blue dice.
00:06:03.300 --> 00:06:06.400
The variables are not going to be the traditional ones you might think of.
00:06:06.400 --> 00:06:11.600
Often, you would say Y1 is going to be the value of the red dice, Y2 is the value of the blue dice.
00:06:11.600 --> 00:06:14.500
I changed that around a little bit to make it a little more interesting.
00:06:14.500 --> 00:06:19.900
Y1 is going to be the value showing on the red dice.
00:06:19.900 --> 00:06:28.000
Y1 could be anywhere from, when you roll a dice, you can get anywhere from 1 up to 6.
00:06:28.000 --> 00:06:36.800
Y2 is the total showing on both dice, that can be anywhere from 2 up to 12.
00:06:36.800 --> 00:06:39.300
They are not exactly symmetric, these two variables here.
00:06:39.300 --> 00:06:44.200
We are going to calculate the marginal probability function of Y1.
00:06:44.200 --> 00:06:47.400
By the way, we are going to do the same example again for example 2,
00:06:47.400 --> 00:06:51.200
except that we will calculate the marginal probability function of Y2.
00:06:51.200 --> 00:06:56.000
We will get to see both of them, in some kind of different behavior there.
00:06:56.000 --> 00:07:01.100
Let us figure out the marginal probability function of Y1.
00:07:01.100 --> 00:07:03.400
We showed two ways to calculate this.
00:07:03.400 --> 00:07:07.400
Let me remind you the definition of the marginal probability function.
00:07:07.400 --> 00:07:17.600
P1 of Y1, by definition, is the probability that Y1 is going to be equal to that particular value of Y1.
00:07:17.600 --> 00:07:23.600
Then, the other way to think about it is, you add up over all the possible values of Y2,
00:07:23.600 --> 00:07:29.500
of the probability of each combination Y1 and Y2.
00:07:29.500 --> 00:07:32.900
I showed two ways to think about that.
00:07:32.900 --> 00:07:39.100
I will calculate at least a couple of these using both ways and I will try to figure out which one is easier.
00:07:39.100 --> 00:07:46.100
I’m going to look at all the possible values for Y1, and that is all the values from 1 to 6.
00:07:46.100 --> 00:07:57.600
When Y1 is 1, P1 of 1, one way to think about it is, what is the probability that we are going to get that particular value of 1.
00:07:57.600 --> 00:08:01.900
That is just the probability that the red dice comes up to be 1.
00:08:01.900 --> 00:08:09.300
That is definitely P of Y1 = 1, that is definitely 1/6.
00:08:09.300 --> 00:08:24.300
Another way to think about that is to say, it is the sum from Y2, all the possible values of Y2 which is 2 up to 12 of 1, Y2.
00:08:24.300 --> 00:08:39.600
Then, we would add up P of 1, 2 + P of 1, 3, all way up to the probability of 1, 12.
00:08:39.600 --> 00:08:43.400
That should not be 1/12, that should be 1, 12.
00:08:43.400 --> 00:08:47.900
We asked ourselves, what the probability of each one of those combinations is?
00:08:47.900 --> 00:08:50.800
Let us think about what the probability of 1, 2 is.
00:08:50.800 --> 00:08:59.200
That means you got a 1 on the red dice and a total of 2, which the blue dice would have to be the 1 as well.
00:08:59.200 --> 00:09:06.600
The probability of getting a 1,1 in the two dice is 1/36.
00:09:06.600 --> 00:09:18.000
The probability of getting a 1 in the red dice and 3 total, means you have to get 1 red and 2 on the blue dice, that is also 1/36.
00:09:18.000 --> 00:09:29.100
All the way up to here to the probability of getting a 1 on the red dice and a 7 total, which is still 1/36.
00:09:29.100 --> 00:09:34.700
The probability of 1 on the red dice and getting 8 total.
00:09:34.700 --> 00:09:39.500
What is the probability of getting a 1 on the red dice and 8 on the total?
00:09:39.500 --> 00:09:42.400
In order to get that, you have to get a 7 on the blue dice.
00:09:42.400 --> 00:09:50.100
You cannot get a 7 on a single roll of a dice, that probability is 0.
00:09:50.100 --> 00:09:57.000
In turn, the probability of getting a 1 on the red dice and a 9 total is still 0.
00:09:57.000 --> 00:10:02.000
All the way up to getting 1 on the red dice and 12 total, that probability is 0.
00:10:02.000 --> 00:10:07.400
What we got here is adding up some fractions, they are all 1/36.
00:10:07.400 --> 00:10:12.300
I think there is going to be 2, 3, 4, 5, 6, 7, that was 6 total.
00:10:12.300 --> 00:10:18.600
It is 6/36, that is 1/6.
00:10:18.600 --> 00:10:25.600
That agrees with what we had earlier, when we figure out the probability of getting 1 on the red dice.
00:10:25.600 --> 00:10:28.300
We showed two different ways to calculate this.
00:10:28.300 --> 00:10:31.700
In this case, if you look around, clearly one of them is much easier.
00:10:31.700 --> 00:10:36.800
It was much easier to calculate just looking at the probability that Y1 is 1,
00:10:36.800 --> 00:10:43.400
then by breaking it down over all the possible combinations of Y2.
00:10:43.400 --> 00:10:48.500
I have to calculate the same kinds of things for all the other possible values of Y1.
00:10:48.500 --> 00:10:52.600
But, I definitely going to use the first technique because it seems much easier.
00:10:52.600 --> 00:10:59.800
P1 of 2 is the probability that Y1 is equal to 2.
00:10:59.800 --> 00:11:05.900
Again, that is the probability that I'm getting a 2 on the red dice and that is also 1/6.
00:11:05.900 --> 00:11:15.300
I could break it up using this long method that I did before, but I think it is clear now that,
00:11:15.300 --> 00:11:18.300
that is not the most efficient method.
00:11:18.300 --> 00:11:29.500
I could write it as probability of 2,2 + the probability of 2,3 all the way up to the probability of 2,12.
00:11:29.500 --> 00:11:33.800
I could figure out each one of those probabilities but it is clear that that would take much longer.
00:11:33.800 --> 00:11:35.800
I’m going to ignore that.
00:11:35.800 --> 00:11:40.100
I will go ahead and calculate the rest of my probability function.
00:11:40.100 --> 00:11:45.700
P1 of 3 it is the probability that Y1 is 3.
00:11:45.700 --> 00:11:52.300
Again, it is getting 3 on the red dice, your probability is 1/6.
00:11:52.300 --> 00:12:08.500
P1 of 4 is 1/6, P1 of 5 is 1/6, and P1 of 6 is 1/6.
00:12:08.500 --> 00:12:12.100
All of those come out to be 1/6.
00:12:12.100 --> 00:12:25.800
My marginal probability function P1 of Y1 is just given by P1 of 1 is 1/6, P1 of 2 is 1/6, P1 of 3 is 1/6, and so on,
00:12:25.800 --> 00:12:30.300
for all the other possible values of Y1.
00:12:30.300 --> 00:12:34.000
That gives us the probability function, that finishes example 1.
00:12:34.000 --> 00:12:35.400
Let me recap that.
00:12:35.400 --> 00:12:38.100
There are sort of 2 ways we could have calculated that.
00:12:38.100 --> 00:12:41.700
We are going to look at each possible value of Y1.
00:12:41.700 --> 00:12:46.900
And then, for each one, we can either calculate the probability that Y1 is that value,
00:12:46.900 --> 00:12:54.100
or we can expand it out over all the possible values of Y2 and add up all the individual combinations.
00:12:54.100 --> 00:12:58.600
What we discovered is that although it would be possible to do it by expanding it out,
00:12:58.600 --> 00:13:02.200
we actually did it for the case of Y1 = 1 here.
00:13:02.200 --> 00:13:08.300
It is much easier just to find the probability that Y1 = Y1.
00:13:08.300 --> 00:13:18.700
For each one of the values, 1, 2, 3, 4, 5, and 6, we got probabilities of 1/6.
00:13:18.700 --> 00:13:20.700
That would really answer the question.
00:13:20.700 --> 00:13:27.700
If we want to do it the long way, we would have to look at all the possible values of Y2 going from 2 to 12.
00:13:27.700 --> 00:13:32.400
Add up the probability of 1 and those values for each one.
00:13:32.400 --> 00:13:39.800
For some of them we get 1/3 because those are the probabilities of rolling a 1 on the red dice and
00:13:39.800 --> 00:13:42.000
you would have to be 1 on the blue dice.
00:13:42.000 --> 00:13:45.200
Or 1 on the red dice and you do not have to be 2 on the blue dice.
00:13:45.200 --> 00:13:47.200
Those will give you 1/36.
00:13:47.200 --> 00:13:55.100
If we look at the combinations that have 1 on the red dice and anything bigger than 8 as a total, that cannot happen.
00:13:55.100 --> 00:14:00.400
All those probabilities were 0, we will end up with 6/36 which gives us that same 1/6
00:14:00.400 --> 00:14:04.500
that we got before, but it took much more work to find it that way.
00:14:04.500 --> 00:14:09.000
Let us avoid that way, if we can.
00:14:09.000 --> 00:14:12.400
In example 2, we have a following up on example 1.
00:14:12.400 --> 00:14:18.200
We are rolling two dice, there is a red dice and a blue dice, same two variables as before.
00:14:18.200 --> 00:14:24.300
Y1 is what shows on the red dice and Y2 is the total.
00:14:24.300 --> 00:14:29.700
We are going to calculate the marginal probability function P2 of Y2.
00:14:29.700 --> 00:14:37.300
Let me remind you that Y1 can take values from 1 to 6 here, because the red dice can show anything from 1 to 6.
00:14:37.300 --> 00:14:43.200
Y2 is the total, that could be anywhere from 2 to 12.
00:14:43.200 --> 00:14:52.200
We want to find the probabilities of each one of those individual values of Y2.
00:14:52.200 --> 00:14:54.900
We have sort of two ways we can think about this.
00:14:54.900 --> 00:15:03.200
P2 of Y2, one way to think about it is the probability that Y2 is going to be that particular value of y2.
00:15:03.200 --> 00:15:16.000
The way I want to think about it is, to add up the probabilities of all the combinations of P1 of Y1 Y2 over all the possible values of Y1.
00:15:16.000 --> 00:15:23.900
We will the try a couple those out and we will see, maybe, which one is easier in each case.
00:15:23.900 --> 00:15:27.700
We want to look at this for each possible value of Y2.
00:15:27.700 --> 00:15:34.700
The first possible value of Y2 is 2, P2 of 2.
00:15:34.700 --> 00:15:40.700
I will do it the long way first, I will add up over all the Y1.
00:15:40.700 --> 00:15:54.900
That could be 1, 2, 3, all the way up to 6.
00:15:54.900 --> 00:15:57.600
Let us figure out what the probabilities are for each one of those.
00:15:57.600 --> 00:16:07.300
The probability of 1,2, that means you are getting a 1 on the red dice and a 2 total, which mean the blue dice would have to be a 1.
00:16:07.300 --> 00:16:13.600
That probability of getting 1 on both dice is 1/36.
00:16:13.600 --> 00:16:20.800
The probability of 2,2 means you get a 1 on the red dice and we have to get a 0 on the blue dice, to add up to 2.
00:16:20.800 --> 00:16:24.400
That cannot happen, there is a 0 there.
00:16:24.400 --> 00:16:27.200
The probability of getting a 3 on the red dice and a 2 total.
00:16:27.200 --> 00:16:38.700
Certainly, it is not going to happen, and nor or any of these other possibilities, that is just 1/36.
00:16:38.700 --> 00:16:48.100
The probability of, let us try calculating that directly because I think it might be a little faster.
00:16:48.100 --> 00:17:00.900
P2 of 2 is also equal to the probability that Y2 is equal 2, which means what is the probability of getting a total of 2.
00:17:00.900 --> 00:17:10.600
In order to get a total of 2, you have to get a 1 on the red dice and 1 on the blue dice, that is exactly 1/36.
00:17:10.600 --> 00:17:14.000
Look, that is really much faster to calculate it that way.
00:17:14.000 --> 00:17:18.900
Why do not we calculate it that way, from now on.
00:17:18.900 --> 00:17:27.900
P2 of 3, I will just show a long way for one more but I also show the short way, and we will see how it goes.
00:17:27.900 --> 00:17:42.100
That is the probability of 1, 3 + the probability of 2, 3 + the probability of 3, 3, up to the probability of 6, 3.
00:17:42.100 --> 00:17:47.500
The probability of 1, 3 that means 1 on the red dice and 2 total.
00:17:47.500 --> 00:17:51.800
I’m sorry, 3 total which means 2 on the blue dice.
00:17:51.800 --> 00:18:00.300
That would mean that you have to get to 1 on the red dice, 2 on the blue dice, there is a 1/36 chance of that.
00:18:00.300 --> 00:18:05.700
2 on the red dice and 1 on the blue dice, it would also be 1/36.
00:18:05.700 --> 00:18:12.000
And then, 3 on the red dice would have to be 0 on the blue dice, that cannot happen.
00:18:12.000 --> 00:18:16.800
All these others are 0, I will just write it as 2/36.
00:18:16.800 --> 00:18:21.300
I'm not going to simplify that, of course, you could simplify it to 1/18.
00:18:21.300 --> 00:18:25.300
I think it will be easier to spot a pattern, if I leave it unsimplified.
00:18:25.300 --> 00:18:28.000
I will just leave it as 2/36.
00:18:28.000 --> 00:18:33.900
Another way to calculate that would be, the probability that Y2 is equal to 3.
00:18:33.900 --> 00:18:42.000
What is the probability of getting a total of 3, when you roll two dice?
00:18:42.000 --> 00:18:51.700
The way you can get a total of 3 is red dice 1 blue dice 2 or blue dice 1 red dice 2.
00:18:51.700 --> 00:18:59.000
There are two ways to get that, out of 36 possible rolls, that is 2 out of 36.
00:18:59.000 --> 00:19:00.400
I think that is really much shorter.
00:19:00.400 --> 00:19:08.300
I’m just going to calculate the others using the short way because otherwise, I will run out of space here.
00:19:08.300 --> 00:19:13.700
P2 of 4, how many different ways are there to get a 4, when you roll two dice?
00:19:13.700 --> 00:19:20.400
We could do 1-3, 2-2, or 3-1, that is 3 out of 36.
00:19:20.400 --> 00:19:26.000
Again, I think I’m not going to simplify that, even though it is obvious that it could simplify.
00:19:26.000 --> 00:19:28.300
But, it is going to be easy to spot a pattern.
00:19:28.300 --> 00:19:36.400
In fact, maybe you already can spot a pattern because we got 1/36, 2/36, 3/36.
00:19:36.400 --> 00:19:40.200
P2 of 5, how many ways are there to get a 5?
00:19:40.200 --> 00:19:49.000
It could go 1-4, 2-3, 3-2, or 4-1, that is 4 out of 36.
00:19:49.000 --> 00:19:53.900
P2 of 6, how many ways are there to get a 6?
00:19:53.900 --> 00:20:05.400
There are 5 different ways because you can go 5-1, 4-2, 3-3, 2-4, or 1-5.
00:20:05.400 --> 00:20:15.300
P2 of 7 is 6 out of 36 because there are 6 different ways that you can get a total of 7.
00:20:15.300 --> 00:20:28.600
You can go 6-1, 5-2, 4-3, 3-4, 2-5, 1-6.
00:20:28.600 --> 00:20:36.900
P2 of 8, these patterns changed its course here.
00:20:36.900 --> 00:20:42.900
We had 1 out of 36, 2 out of 36, 4 out of 36, 5 out of 36, 6 out of 36.
00:20:42.900 --> 00:20:46.500
You might think logically that we are going to go 7 out of 36.
00:20:46.500 --> 00:20:52.600
It actually peaks at P2 of 7, it trails back to 5 out of 36.
00:20:52.600 --> 00:20:58.900
The reason for that is that, there are only five ways to get an 8, when you roll two dice.
00:20:58.900 --> 00:21:08.500
You can go 6-2, 5-3, 4-4, 3-5, or 2-6.
00:21:08.500 --> 00:21:12.800
Your pattern changed it course and it starts to drop off again.
00:21:12.800 --> 00:21:23.400
P2 of 9, there are four ways to get a 9 because it can go 6-3, 5-4, 4-5, 3-6, that is 4 out of 36.
00:21:23.400 --> 00:21:31.300
P2 of 10 is 3 out of 36, there are three ways to get a 10.
00:21:31.300 --> 00:21:40.900
P2 of 11 is 2 out of 36, and finally, P2 of 12, how many ways are there to get a 12?
00:21:40.900 --> 00:21:45.900
There is just one way you have to get double 6, 1 out of 36.
00:21:45.900 --> 00:21:50.800
All of these, you could calculate using the expanded form.
00:21:50.800 --> 00:21:55.300
But the expanded form was obviously taking much too long.
00:21:55.300 --> 00:22:03.000
I got my answer more easily, just by thinking directly about Y2, about the total of the dice.
00:22:03.000 --> 00:22:08.900
That gives my answers, I found the marginal probably function P2 of Y2.
00:22:08.900 --> 00:22:14.500
1/36 from 2, 2/36 for 3, and so on.
00:22:14.500 --> 00:22:22.800
Going down for all the possible values of Y2, I gave you a fraction representing the probability.
00:22:22.800 --> 00:22:26.400
To recap there, there are two ways you can calculate this.
00:22:26.400 --> 00:22:33.200
You can calculate directly the probability that Y2 will be equal to any given value y2.
00:22:33.200 --> 00:22:37.200
Or you can sum it up over all the possible Y1.
00:22:37.200 --> 00:22:41.700
Summing it up over all the possible Y1, we did that for Y2 = 2.
00:22:41.700 --> 00:22:48.000
We took Y1 = 1, 2, 3, 4, 5, 6.
00:22:48.000 --> 00:22:53.400
Discovered that only one of those gives us any probability because for all the other possible values of Y1,
00:22:53.400 --> 00:22:55.900
there is no way to make the given total.
00:22:55.900 --> 00:22:57.900
We just got 1/36.
00:22:57.900 --> 00:23:05.500
But then, a much easier way we discover to calculate it was that, just to find the probability that the total will be 2.
00:23:05.500 --> 00:23:11.600
The only way to get that is by getting a 1-1, when you roll, it is 1/36.
00:23:11.600 --> 00:23:19.500
P2 of 3 means we sum up over all the possible values of Y1, 1, 2, 3, 4, 5, 6.
00:23:19.500 --> 00:23:23.300
Two of them gives us positive probabilities, the rest are all 0.
00:23:23.300 --> 00:23:26.500
It gives us 2 out of 36.
00:23:26.500 --> 00:23:33.900
But then, the probability directly that Y2 is 3 just means you are looking at two different possible rolls,
00:23:33.900 --> 00:23:35.900
a 1 and 2 or 2 and 1.
00:23:35.900 --> 00:23:38.400
You will get 2 out of 36 that way.
00:23:38.400 --> 00:23:40.400
It really looks like that is the shorter way.
00:23:40.400 --> 00:23:47.300
For all of these other values, I just thought about all the possible ways to get the given total and then counted them up.
00:23:47.300 --> 00:23:52.000
That is how I got these different numbers, that seems to be a better way to solve that.
00:23:52.000 --> 00:23:54.100
At least, in the discreet case.
00:23:54.100 --> 00:24:03.100
We will see in the next few examples, how we are going to use an integral to solve the same kind of thing in the continuous case.
00:24:03.100 --> 00:24:09.800
In examples 3, we have a continuous problem with the marginal probability.
00:24:09.800 --> 00:24:17.700
We are given the joint density function F of Y1 Y2 is 6 × (1 - Y2).
00:24:17.700 --> 00:24:27.600
It is important to pay attention to the domain that we are given here which is that Y1 and Y2 are both between 0 and 1.
00:24:27.600 --> 00:24:30.500
Let me go ahead and draw this out, as I talk about it.
00:24:30.500 --> 00:24:39.500
Y1 and Y2, there is Y1, goes from 0 to 1 and Y2 also goes from 0 to 1.
00:24:39.500 --> 00:24:45.800
But we are told that Y2 has to be bigger than or equal to Y1.
00:24:45.800 --> 00:24:51.200
If you think about that, in terms of X and Y, we got the same values bigger than X.
00:24:51.200 --> 00:24:55.700
Let me go ahead and draw the line Y = X.
00:24:55.700 --> 00:24:58.200
There it is, right there.
00:24:58.200 --> 00:25:05.800
We want the region that is above that line because we want Y2 to be bigger than or equal to Y1.
00:25:05.800 --> 00:25:10.600
It is that triangular region above that diagonal line there.
00:25:10.600 --> 00:25:13.300
Let me colored that in blue.
00:25:13.300 --> 00:25:16.700
That is the region that we are looking at.
00:25:16.700 --> 00:25:21.800
We have been asked now to find the marginal density function F1 of Y1.
00:25:21.800 --> 00:25:26.800
Let me remind you of the definition of marginal density function.
00:25:26.800 --> 00:25:34.000
F1 of Y1, remember, there is this variable change where, if you are trying to find F1 of Y1,
00:25:34.000 --> 00:25:38.100
what you do is you integrate over Y2.
00:25:38.100 --> 00:25:43.300
And then, you find the density function F of Y1 Y2, the joint density function.
00:25:43.300 --> 00:25:46.600
You integrate that with respect to Y2.
00:25:46.600 --> 00:25:52.000
That means we have to describe this region, in terms of Y2.
00:25:52.000 --> 00:25:59.300
Let me draw what the region looks like from the perspective of Y2.
00:25:59.300 --> 00:26:12.100
Y2 rows up from that diagonal line up to, let me draw that a little bit longer, up to the line Y2 = 1.
00:26:12.100 --> 00:26:23.100
If we describe that region, in terms of Y2, we would say, the diagonal line was Y1 = Y2 or Y2 = Y1.
00:26:23.100 --> 00:26:36.100
We would say Y2, the limits on Y2, if you want to describe that region, the Y2 goes from Y1, the diagonal line, up to 1.
00:26:36.100 --> 00:26:39.700
That is what we use as the limits on our integral.
00:26:39.700 --> 00:26:45.800
This is the integral from Y2 = Y1 to Y2 = 1.
00:26:45.800 --> 00:26:50.700
The density function, I’m just going fill it in, I will expand it out.
00:26:50.700 --> 00:26:57.900
6 -6 Y2, and we are going to integrate this with respect to Y2.
00:26:57.900 --> 00:27:04.400
That is a pretty easy integral, the integral of 6 is just 6Y2.
00:27:04.400 --> 00:27:09.400
The integral of 6Y2 is 3Y2².
00:27:09.400 --> 00:27:17.000
I’m supposed to evaluate that from Y2 = Y1 to Y2 = 1.
00:27:17.000 --> 00:27:25.800
I said Y2 = 1, I should have said Y2 = Y1 on the lower limit there and Y2 = 1 on the upper limit.
00:27:25.800 --> 00:27:29.200
If we plug those in, we get 6.
00:27:29.200 --> 00:27:37.300
I said 3Y2, it should have been 3Y2² because we are integrating 6Y2 there.
00:27:37.300 --> 00:27:41.800
If we plug in Y2 = 1, then we get 6 -3.
00:27:41.800 --> 00:27:56.200
Plugging in Y2 = Y1 for the lower limit, I get -6Y1 + 3Y1².
00:27:56.200 --> 00:28:00.000
I can simplify that a little bit and rearrange a bit.
00:28:00.000 --> 00:28:16.200
F1 of Y1 is 3Y1² -6 Y1 + 6 -3 is + 3, that is my marginal density function for Y1.
00:28:16.200 --> 00:28:18.700
Let me recap the steps there.
00:28:18.700 --> 00:28:22.300
I want to find the marginal density function F1 of Y1.
00:28:22.300 --> 00:28:30.800
There is this variable switch where you integrate the joint density function over Y2.
00:28:30.800 --> 00:28:34.900
You have to describe your region, in terms of Y2.
00:28:34.900 --> 00:28:45.700
Our region, in terms of Y2, goes from the lower line, the diagonal line Y2 = Y1 to that upper bound, is Y2 = 1.
00:28:45.700 --> 00:28:51.500
That is where I got these limits from, it comes from that graph right there.
00:28:51.500 --> 00:28:53.300
That is where I got those limits.
00:28:53.300 --> 00:28:56.200
And then, I plug those limits into the integral.
00:28:56.200 --> 00:28:59.500
I also plugged in the density function that we are given.
00:28:59.500 --> 00:29:03.200
I integrate that with respect to Y2 and that is a pretty easy integral.
00:29:03.200 --> 00:29:10.800
I plug in my limits and what I end up with is a function, in terms of Y1 which is what is supposed to happen.
00:29:10.800 --> 00:29:16.000
You always want your marginal density function of Y1 to be a function of Y1.
00:29:16.000 --> 00:29:20.300
In the next example, in example 4 of this lecture, what we are going to do is
00:29:20.300 --> 00:29:24.100
we are going to come back and look at this same scenario.
00:29:24.100 --> 00:29:27.000
We are going to find the marginal density function of Y2.
00:29:27.000 --> 00:29:31.800
If we do it right then we will get a function of Y2.
00:29:31.800 --> 00:29:38.700
This is important to notice that we get a function of Y1 at the end here.
00:29:38.700 --> 00:29:44.600
If we had not, if we had some Y2 in our answer, we know we would have made some kind of mistake.
00:29:44.600 --> 00:29:52.000
By the way, this example is kind of a setup from example that we are going to use in the next lecture
00:29:52.000 --> 00:29:56.500
on conditional probability and conditional expectation.
00:29:56.500 --> 00:29:59.900
We would use this answer in the next lecture.
00:29:59.900 --> 00:30:02.600
You want to make sure that you understand this.
00:30:02.600 --> 00:30:15.900
We are going to use it for, I think it is going to be example 3 in the next lecture
00:30:15.900 --> 00:30:24.000
which is on conditional probability and conditional expectation.
00:30:24.000 --> 00:30:30.500
If you are wondering, what do we just calculate here, probability.
00:30:30.500 --> 00:30:35.700
What is it good for, what we can use this for, if you want to take a sneak peek ahead,
00:30:35.700 --> 00:30:38.800
just get forward to the next lecture and look at example 3.
00:30:38.800 --> 00:30:41.500
You will see the same setup and you will see the same function.
00:30:41.500 --> 00:30:48.100
We are actually going to use it to calculate some probability.
00:30:48.100 --> 00:30:52.600
In example 4, we are looking at the same setup that we had in example 3.
00:30:52.600 --> 00:30:56.600
But, instead of calculating the marginal density function in terms of Y1,
00:30:56.600 --> 00:31:04.300
that is what we did back in example 3, we are going to calculate the marginal density function in terms of Y2.
00:31:04.300 --> 00:31:09.700
Let me just redraw that graph, it is the same graph that we had in example 3.
00:31:09.700 --> 00:31:19.600
We have Y1 and Y2 here, they both go from 0 to 1 but we are given that Y2 is bigger than Y1,
00:31:19.600 --> 00:31:27.700
which means we are only going to stay above the line, the Y =X line, the Y2 = Y1 line.
00:31:27.700 --> 00:31:33.300
We are looking at this triangular region above the line Y=X.
00:31:33.300 --> 00:31:39.800
That is the domain of definition for our joint density function.
00:31:39.800 --> 00:31:43.900
Now, we are trying to find the marginal density function F2 of Y2.
00:31:43.900 --> 00:31:46.100
Remember, there is always this variable switch.
00:31:46.100 --> 00:31:52.400
When you try to find the marginal density function for Y2, you integrate over Y1 and then
00:31:52.400 --> 00:31:59.600
you integrate the joint density function F of Y1 Y2, your variable is DY1.
00:31:59.600 --> 00:32:04.800
That means, we have to describe this region in terms of Y1.
00:32:04.800 --> 00:32:08.600
Let us think about what Y1 does here.
00:32:08.600 --> 00:32:16.500
Y1 grows up from the left hand side is the vertical line Y1 = 0.
00:32:16.500 --> 00:32:22.600
The right hand side is the line Y1 = Y2, the diagonal line there.
00:32:22.600 --> 00:32:32.900
My limits here on Y1 are from 0 to Y2, that is what we are going to use to set up the integral.
00:32:32.900 --> 00:32:39.400
We had the integral from Y1 = 0 to Y1 = Y2.
00:32:39.400 --> 00:32:44.800
Our joint density function is still 6 × 1 - Y2.
00:32:44.800 --> 00:32:49.600
We have DY1.
00:32:49.600 --> 00:32:55.200
There is a very seductive mistake to be made here and my students often make it.
00:32:55.200 --> 00:32:56.300
It is very easy to make.
00:32:56.300 --> 00:33:05.300
You see a Y2 in your integral and you want to integrate it with respect to Y2.
00:33:05.300 --> 00:33:10.900
You see that Y2 and think that the integral is Y2²/2.
00:33:10.900 --> 00:33:16.100
Not so, because we are integrating with respect to Y1.
00:33:16.100 --> 00:33:22.000
Y1 is our variable of integration, when we see the Y2 that is just a big old constant.
00:33:22.000 --> 00:33:33.700
This integral 6 × 1 - Y2, integrate that just as a constant, we just get all that × Y1.
00:33:33.700 --> 00:33:44.500
We are going to evaluate that from Y1 = 0 to Y1 = Y2.
00:33:44.500 --> 00:33:54.600
We get 6 × 1 - Y2 × Y2, when Y1 is 0 we get nothing, I just get -0.
00:33:54.600 --> 00:33:59.300
If I simplify this down a little bit, I will get 6Y2.
00:33:59.300 --> 00:34:01.600
I’m just going to distribute everything across.
00:34:01.600 --> 00:34:11.500
6Y2 -6Y2², that is my joint density function in terms of Y2.
00:34:11.500 --> 00:34:20.000
Notice, as I mentioned before in example 3, we do want to get a function in terms of Y2.
00:34:20.000 --> 00:34:29.700
That is a function of Y2 which is a good thing, that kind of confirms that I have been doing at least some of my work correctly.
00:34:29.700 --> 00:34:34.600
Because, I do not want to get a function that involves Y1 in any way, at the end of this
00:34:34.600 --> 00:34:42.100
because the joint density function is always a function of Y2.
00:34:42.100 --> 00:34:45.700
That finishes off example 4, but let me recap the steps here.
00:34:45.700 --> 00:34:49.700
This is the same graph that we drew for example 3.
00:34:49.700 --> 00:34:53.800
It comes from looking at this definition of the region here.
00:34:53.800 --> 00:34:56.900
We draw the graph, the same graph we have for example 3.
00:34:56.900 --> 00:35:04.600
But, the difference from example 3 now is that, we are finding the marginal density function of Y2, instead of Y1.
00:35:04.600 --> 00:35:11.800
There is this variable switch that means we are integrating over Y1.
00:35:11.800 --> 00:35:16.700
I need to describe my region, in terms of bounds for Y1.
00:35:16.700 --> 00:35:21.700
That is why I drew a horizontal line here, instead of the vertical line that we had before.
00:35:21.700 --> 00:35:28.200
I describe this region as going from Y1 = 0 to the diagonal line Y1 = Y2.
00:35:28.200 --> 00:35:33.000
That gave me my limits that I use on the integral.
00:35:33.000 --> 00:35:44.700
It is relatively easy integral, as long as you do not fall into the trap of thinking, look I have a Y2, I will just integrate that Y2.
00:35:44.700 --> 00:35:47.800
Remember, we are integrating with respect to Y1.
00:35:47.800 --> 00:35:51.000
The 6 × 1 - Y2 is a constant.
00:35:51.000 --> 00:35:58.600
You just get that constant × Y1, plug in our values for Y1, and we end up with a function of Y2.
00:35:58.600 --> 00:36:07.400
That represents our marginal density function, in terms of Y2.
00:36:07.400 --> 00:36:16.200
In our last example here, example 5, we have a joint density function F of Y1 Y2 = E ⁻Y2.
00:36:16.200 --> 00:36:22.700
Our region here, both Y1 and Y2 go from 0 to infinity.
00:36:22.700 --> 00:36:25.400
Let me set up my axis and we will try to draw that.
00:36:25.400 --> 00:36:31.000
There is Y1, always on the horizontal axis and Y2 is always on the vertical axis.
00:36:31.000 --> 00:36:33.500
They both start at 0.
00:36:33.500 --> 00:36:37.700
The catch here is that Y2 was always bigger than Y1.
00:36:37.700 --> 00:36:43.400
Let me draw the line Y1 = Y2 or Y = X.
00:36:43.400 --> 00:36:49.200
We want Y2 bigger than Y1 which means we want the region above this line.
00:36:49.200 --> 00:36:52.400
Let me color in that region above this line.
00:36:52.400 --> 00:36:54.800
Of course, it goes on to infinity.
00:36:54.800 --> 00:36:58.200
I’m not going to draw all of it but that is the general shape.
00:36:58.200 --> 00:37:00.500
It is this triangular region.
00:37:00.500 --> 00:37:05.200
What we want to do is, find the marginal density function F1 of Y1.
00:37:05.200 --> 00:37:08.400
Let me remind you of the definition of marginal density.
00:37:08.400 --> 00:37:16.000
F1 of Y1, I gave you the formula for this back on the third slide to this lecture.
00:37:16.000 --> 00:37:20.100
There is this variable switch where you always integrate over the other variable.
00:37:20.100 --> 00:37:31.300
It is the integral over Y2 of the joint density function F of Y1 Y2 DY2.
00:37:31.300 --> 00:37:41.700
I need to describe that region, in terms of Y2 so that I can set up my limits on the integral.
00:37:41.700 --> 00:37:48.600
I want to think about what the limits would be on that region, in terms of Y2.
00:37:48.600 --> 00:37:51.800
Y2, that means take a vertical arrow here.
00:37:51.800 --> 00:37:57.900
Y2 grows up from that line, it goes on to infinity, does not it.
00:37:57.900 --> 00:38:04.200
There is infinity and there is the line Y2 = Y1.
00:38:04.200 --> 00:38:16.600
My region can be described as Y2 goes from the diagonal line Y1 up to infinity.
00:38:16.600 --> 00:38:25.800
Those are the bounds on my integral, Y2 = Y1 to Y2 goes to infinity.
00:38:25.800 --> 00:38:30.500
My joint density function is just E ^- Y2.
00:38:30.500 --> 00:38:35.000
I’m integrating with respect to Y2.
00:38:35.000 --> 00:38:42.200
The integral of E ⁻Y2 with respect to Y2 is - E ^- Y2.
00:38:42.200 --> 00:38:47.900
I did a u substitution in my head to get that integral.
00:38:47.900 --> 00:38:59.600
I want to evaluate that from Y2 = Y1 = Y1 to Y2, take the limit as it goes to infinity.
00:38:59.600 --> 00:39:06.300
If I plug in infinity, that is E ^- infinity.
00:39:06.300 --> 00:39:09.900
Which means, 1 divided by E ⁺infinity.
00:39:09.900 --> 00:39:21.000
1/ infinity is just 0 - - E ⁻Y1 because I plugged in Y2 = Y1.
00:39:21.000 --> 00:39:27.300
That simplifies down to E ⁻Y1.
00:39:27.300 --> 00:39:29.700
Let me remind you what we are calculating here.
00:39:29.700 --> 00:39:33.800
F1 of Y1, the marginal density function Y1.
00:39:33.800 --> 00:39:39.900
It is kind of reassuring here that, when we calculate that, we get a function of Y1.
00:39:39.900 --> 00:39:46.400
That is what we should get, when we calculate a marginal density function.
00:39:46.400 --> 00:39:52.300
That is our answer, let me recap the steps on this.
00:39:52.300 --> 00:39:54.700
First, I tried to graph this region.
00:39:54.700 --> 00:40:02.400
Y1 and Y2 both go from 0 to infinity but we are looking at the region where Y2 is bigger than Y1.
00:40:02.400 --> 00:40:10.000
That is why we have this upper triangular region here, all the region above the line Y=X there.
00:40:10.000 --> 00:40:16.600
Then, to find the marginal density function for Y1, we have to integrate over Y2.
00:40:16.600 --> 00:40:22.000
There is always this variable switch, that is always very confusing.
00:40:22.000 --> 00:40:29.000
In order to find the region of integration, I tried to describe that region in terms of Y2.
00:40:29.000 --> 00:40:34.500
The lower bound for Y2 is this diagonal line, that is where I got this Y2 = Y1.
00:40:34.500 --> 00:40:38.100
Upper bound, it goes on forever, that is why there is an infinity there.
00:40:38.100 --> 00:40:43.600
I plugged those in and I get this region of integration.
00:40:43.600 --> 00:40:48.500
The density function just comes from the stem of the problem E ⁻Y2.
00:40:48.500 --> 00:40:54.100
Integrate that with respect to Y2, did a u substitution in my head, u = -Y2.
00:40:54.100 --> 00:40:59.500
It came up with –E ⁻Y2, and then I plugged in Y2.
00:40:59.500 --> 00:41:06.700
The limit is, as it goes to infinity that just takes you to 0 and Y2 = Y1 gives me my Y1 in the exponent.
00:41:06.700 --> 00:41:14.800
It simplifies down to this nice function of Y1 which is appropriate, because we should get a function of Y1,
00:41:14.800 --> 00:41:19.300
when we are looking for the marginal density function of Y1.
00:41:19.300 --> 00:41:25.400
I really want you to understand this example, because we are going to use this example again
00:41:25.400 --> 00:41:32.200
for calculating some conditional and expected probability, in the next lecture.
00:41:32.200 --> 00:41:39.100
I think this example is set to be example 5, in the next lecture.
00:41:39.100 --> 00:41:54.200
We are going to use the answer to this example in the next lecture which is on conditional probability and conditional expectation.
00:41:54.200 --> 00:42:00.100
You will see this coming back, I want to make sure you understand this now so that when we dropped the answer in,
00:42:00.100 --> 00:42:08.000
you will not be confused by it, in the next lecture probability.
00:42:08.000 --> 00:42:12.000
Make sure that everything is good with this example.
00:42:12.000 --> 00:42:15.800
In the meantime, that wraps up this lecture on marginal probability.
00:42:15.800 --> 00:42:21.100
As I mentioned in the beginning, marginal probability is really a tool in the service of conditional probability.
00:42:21.100 --> 00:42:27.400
You will see a lot of the stuff used in the next lecture on condition probability and conditional expectation.
00:42:27.400 --> 00:42:29.400
I hope you will stick around for this.
00:42:29.400 --> 00:42:35.700
These are a part of a larger series of lectures on probability, here on www.educator.com.
00:42:35.700 --> 00:42:38.000
My name is Will Murray, thank you for joining us today, bye.