- [Instructor] In this screencast,
I'm gonna talk about a common joint probability
mass function, known as the multinomial distribution,
which is an extension of the binomial distribution.
Before we get started,
I have a review question that's gonna help us
understand the multinomial distribution.
How many arrangements can we make of 5 M&Ms
where 2 of those M&Ms are blue, 1 is red,
and 2 are yellow?
This is a permutation of like or similar objects.
We have a total n of 5 M&Ms
where we've subdivided that 5 into n1,
this is gonna be blue.
We have 2 of those.
We have 1 red M&M, and we have 2 yellow M&Ms.
The number of ways that you can arrange this,
permutations of similar objects,
is n factorial divided by n1 factorial
divided by n2 factorial divided by n3 factorial,
which equals 5 factorial divided by 2 factorial
divided by 1 factorial divided by 2 factorial.
And when you do the math, there are 30 ways to do this.
So this is gonna help us in a minute
when we derive the multinomial distribution.
The multinomial distribution is going to allow us
to solve this problem.
In a certain large bag of M&Ms,
large meaning if we remove a couple of M&Ms,
it's not gonna significantly alter the background
probability, but 20% of the M&Ms are blue, 30% are red,
and 50% are yellow.
We're gonna use the multinomial distribution
to answer the question,
what is the probability that if we choose 5 M&Ms at random,
we'll get 2 blue, 1 red, and 2 yellow M&Ms?
So let's take a look at the multinomial distribution.
And again, this is a common joint distribution.
It's an extension of the binomial distribution.
The result from each trial is not just pass/fail,
but it can be categorized into one of k classes.
In our question here, we have three different classes.
M&Ms are not just red and yellow,
but we have blue, red, and yellow.
So we actually have three classes in this example.
The probability of getting a result
in class i is pi,
and the trials are independent,
meaning that the results of any trial
are not significantly affecting the results
of another trial.
And again, in our example,
we're assuming that we have a very large bag of M&Ms,
so when you withdraw an M&M,
it doesn't significantly alter the probability
of the different colored M&Ms.
So let's go through how we might derive this.
What's the probability that we choose 5 M&Ms at random
and we get 2 blue, 1 red, and 2 yellow?
Well, one possible arrangement would be yellow,
blue, red, yellow, blue.
So that's a possibility.
What is the probability of getting exactly this arrangement
if order matters?
The probability of getting this arrangement
would be the probability of yellow squared,
because we have 2 of those,
times the probability of getting a blue M&M squared,
times the probability of getting a red M&M raised to the 1
since we only have 1 M&M that is red.
But there are lots of different ways
to come up with this arrangement.
In fact, related to the original question
at the beginning of this screencast,
if we refer to the number of blue as x1,
the number of red as x2, and the number of yellow as x3,
it turns out that the possible number of arrangements
of these 5 M&Ms when we have similar or like objects
is n factorial divided by x1 factorial
divided by x2 factorial divided by x3 factorial.
This here is the number of permutations of like objects.
So what we end up doing for the multinomial distribution
is we take that factor, the total number of permutations
of similar objects, and then we multiply by the product
of each individual probability of success
for those k different classes raised to the number,
the x1, the number of those successes
that we are interested in.
And here is just the sum of all of our Xi's,
and the sum of all the probabilities of our k classes
has to equal 1.
By the way, if you looked at the marginal distribution
of any Xi, it's gonna be binomial
meaning that if you kind of average out
or integrate out all of the others,
other than Xi, it's going to follow binomial distribution
because now, all you're looking at is a probability
of success, and a probability of failure is anything else.
Let's go ahead and solve this.
If we plug these values into the multinomial distribution,
we end up with the following equation.
And when we do the math, we end up with about a 9%.
So there's a 9% chance that if we take a random selection
of 5 M&Ms, we're gonna get 2 blue, 1 red,
and 2 yellow M&Ms.
So now I want you to try to answer this question,
and I'll help you along with a couple of questions.
ACME, A Company that Makes Everything, produces widgets.
45% of those widgets are manufactured in China,
30% are manufactured in Korea,
and 25% are produced in Mexico.
What's the probability that in a sample of 10 widgets,
at least 4 of them were made in China
and at least 4 of them were made in Mexico?
So to help you out, which of these possibilities
satisfy the constraint that at least 4 of them
have to have been made in China
and at least 4 of them were made in Mexico?
So given the answer to that question,
what's the probability then,
and you can do the calculations,
that at least 4 of them were made in China
and at least 4 of them were made in Mexico?
Hopefully this screencast gave you a better idea
of the multinomial distribution.
Thanks for watching.