Transcript for:
Understanding Marginal Probability Density Functions

So in this video, we're going to look at what are known as marginal probability density functions, and I'm going to look at examples that deal with discrete random variables. You could certainly look at cases where your random variables are continuous. So let me give you a definition real quick, and then we'll go through an example, and I think when you see it in a context setting, it'll certainly clarify this idea.

Okay, so again, we're just working with discrete random variables, so x and y are going to be two discrete random variables. R sub x and r sub y are going to be the range spaces of x and y, and we're going to have a corresponding joint probability density function, and f of x and y are going to be those, the joint probability density function. So that marginal probability density function of x, what we do is we denote that as f sub 1 of x, and what we're going to do is we're just going to sum up.

over all possible values of y. That's going to be the marginal probability density function of x. And likewise, if we sum up over all values of x and we leave y fixed, that's going to be the marginal probability density function of y.

So again, when you compute these marginal density functions, what you're basically doing is you're just going to be summing up the probabilities along one of the columns. or one of the rows of that joint PDF is what's going to happen. And likewise, this will be the definition if you do happen to have a continuous, if you happen to have continuous random variables. So let's put this in the context of an example. So previously, I had computed a joint probability density function.

And in that example, we had a group of nine coworkers. Four had a PhD. three had a master's, and two had an undergraduate degree.

And we said three of those people were going to get promoted at random. So we decided to let x denote the number of people with a PhD that got promoted, and y would denote the number of people with a master's that got promoted. And from that, we made this joint probability density function. And again, you can see the details on how this was constructed. So here we've got our joint PDF.

Let's compute this marginal of x. What does that actually compute? So if we look at our definition here, right, it says we have to sum up over the range space of y.

And you may have, I just erased that real quick. So what is the range space of y? What values can y vary over? Well, we said y could vary from anywhere between 0 up to 3. That's the number of people we could select that have a master's degree for promotion.

So if we compute this, it says, well, again, we're just letting x stay fixed. So it says we'll have f of x comma 0 plus f of x comma 1 plus f of x comma 2 plus f of x comma 3. And again, I'm just letting y range over all possible values is all I'm doing. Okay, so let's interpret that in the context of this example. You know, what is this marginal of x? What is that actually telling us?

And again, notice we can plug in different values of x. What values of x could we plug in? Well, in our situation, right, x would be any way from 0, 1, 2, up to 3, right? We could select...

Anywhere from 0 PhDs up to 3 PhDs getting promoted. So let's plug in some values, right? Let's plug in, let's say, x equals 1. What is that going to do?

Well, if we plug in x equals 1 into our formula, that's going to give us the following. So let's compute this, right? So I'm just using our marginal density function.

So if we plug in 1, it says we would have, we would be computing f of 1. f of 1 comma 0 plus f of 1 comma 1 plus f of 2 comma, let's see, so make sure I've got them all here, 1, 1, so we've got, plug that one in correctly, 1 comma 2 plus f of 1 comma 3, there we go. Okay, so notice x is equal to 1, and we're letting y vary, 0, 1, two, three. So when we do this, we're just adding up values of our Probability density function. So f of 1, 0, we said that's the probability associated with having one PhD and zero masters.

We're selecting one person with a PhD and zero people with a master's degree. f of 1, 1, we said, well, that's the probability associated with selecting exactly one person with a PhD and one person with a master's degree. Now f of 1, 2, we said that's the probability associated with picking one person with a PhD and two people that have a master's degree. And then F of 1, 3, we said that's the probability associated with selecting one person with a PhD and three people with a master's degree. And we said that probability would have to be zero, right, because that couldn't happen in our situation.

And we just add those up. So F of 1, 0. we said that would be 4 out of 84. f of 1 1 that was 24 out of 84 plus f of 1 2 that would be 12 out of 84 and f of 1 3 we said that would be equal to 0. So again notice all we're doing is we're just summing up the values in this column and if we sum those up what does that give us? So 4 plus 24 plus 12, what is that? That's a 28. That's going to be 40 out of 84. And again, this is just the probability.

This is just the probability of selecting one PhD for promotion. So what's the probability? So we're selecting three people at random. What's the probability that at the end of the day we end up selecting only one person with a PhD?

Well, the probability of selecting only one person for promotion that has a PhD, the probability of that is 40 out of 84. Well, likewise, we could compute this marginal probability density function for y, and in that case, we're just going to sum up over all of the probabilities of x. Well for this particular example again x could range anywhere from 0 up to 3. So if we compute that, so if we compute that, okay so in this case we're going to let y stay fixed. So we would have f of 0 comma y plus f of 1 comma y plus f of 2 comma y plus f of 3. comma y.

That would be our marginal density function. So we went ahead and computed that. And again, let's just interpret that. What does that represent here?

Okay, so let's drop that down here. So we said that our marginal density function So we said that's f of 0 of y plus f of 1 of y plus f of 2 of y plus f of 3 of y. So let's plug in some values and actually compute it.

So let's see. Let's compute maybe, for example. What happens when we compute that marginal density function, let's say when y equals 2?

So okay, so what we're doing is we're just summing up now again the values along that row. So if we plug it in, It says we could have, so if we plug it into our formula, it says we would have f of 0, 2 plus f of 1, 2 plus f of 2, 2 plus f of 3 comma 2. So again, notice that the y value is staying fixed. And we're letting x vary. We're just letting x vary. So x could equal 0, 1, 2, or 3. And again, if we do this, all we're doing is we're just summing up along the, we're summing the probabilities along that row associated with y equals 2. And if we do that, that's just going to be, so f of 0, 2, we said that was 6 out of 84, plus f of 1, 2, that's 12 out of 84, plus f of 2, 2, we said that was equal to 0, and f of 3, 2, that was also equal to 0. And again, what does that mean, right?

So f of 0, 2, that was this value, that's the probability associated with getting exactly zero people with a PhD but two people with a master's. F of one comma two, that's the probability of associating of selecting one person with a PhD and two people with a master's. F of two comma two, that's the probability of selecting two people with a PhD and two people with a master's.

Now that probability would have to be zero, right, because we're now selecting four people. And likewise, what's the probability of selecting three people with a PhD and two people with a master's? Well, that would be zero as well because that can't happen. So this marginal probability when we plug in two, that's the probability of at the end of the day selecting two people with a master's degree. for promotion and that's going to be equal to 18 out of 84. So again all we're doing is we're just summing up this this row we're getting 18 out of 84 and again conceptually what we're doing is we're kind of forgetting about we don't care about the the PhD people in this case we're care we care about the people that had a master's degree so it says the probability of selecting two people with a master's degree for promotion, that's going to be equal to 18 out of 84. Likewise, if we say computed F sub 2 of 1, that's going to be the probability of selecting exactly one person with a master's degree for promotion.

That would be, well, 3 out of 84 plus 24 out of 84 plus 18 out of 84 plus 0 out of 84. I would now just be summing up, I would now just be finding the, whoops, I would now be summing up this row. And again, that's the probability of finding, that's the probability associated with having exactly one person with a master's degree selected for. Promotion.

And if we compute that, what would that be equal to? That would be equal to, so 3 plus 24, that would be 27. 27 plus 18, that would be 45. So the probability of selecting exactly one person with a master's degree for promotion would be equal to 45 out of 84.