Probability – Calculating Probability of Collecting All 5 Buying 7 Chocolates

combinatoricsprobability

I'm struggling to find where I made a mistake on the way to solving the following problem.

Problem description: A grocery sells chocolates bars. There are $5$ kinds of stickers. Each chocolate is sold with $1$ sticker of one of these $5$ kinds. The probability to find any kind of stickers in any chocolate bar is the same.

What's the probability of collecting all $5$ types of stickers if you buy $7$ chocolates at once?

My solution: since the order of chocolate bars that I've bought is irrelevant, the total number of 7-chocolate bar sets that I can buy equals

$$\left(\binom{5}{7}\right)=\binom{7+5-1}{7}=\binom{11}{7}=330$$

Now I'm solving the reverse problem: let's calculate the probability of failing to collect all $5$ kinds of stickers. To do that I need to calculate the number of 7-chocolate bar sets that have less than $5$ kinds of stickers, which means that I need sets with only $1$ kind of stickers, $2$, $3$ and $4$. Since, again, the order of chocolate bars doesn't matter, the number of such sets is

$$\left(\binom{4}{7}\right)=\binom{7+4-1}{7}=\binom{10}{7}=120$$

Finally, my answer to the initial problem should be

$P = 1 – \frac{120}{330}= 0.6363636364$

The answer key says it's $\approx 0.215$

Where's the flaw in my solution?

I appreciate any help.

Best Answer

The flaw in your solution is that the $330$ cases you enumerated are not equally likely to appear. For instance, there is only one way for all seven chocolate bars to show the first label. However, if we list the stickers in the order in which we look at the chocolate bars we collect, there are $\binom{7}{2}\binom{5}{2}3!$ ways to obtain a collection with two stickers of the first type, two stickers of the second type, and one of each of the other types.

There are five possible stickers for each of the seven chocolate bars, so there are $5^7$ ways to distribute stickers to chocolate bars.

For the favorable cases, we must subtract those distributions in which not all five kinds of stickers appear in the collection of purchased chocolate bars.

There are $\binom{5}{k}$ ways to exclude $k$ of the $5$ stickers and $(5 - k)^7$ ways to distribute stickers of the remaining $5 - k$ kinds to the chocolate bars. Hence, by the Inclusion-Exclusion Principle, the number of ways the stickers may be distributed to the seven chocolate bars so that all five kinds of stickers appear is $$\sum_{k = 0}^{5} (-1)^k\binom{5}{k}(5 - k)^7 = 5^7 - \binom{5}{1}4^7 + \binom{5}{2}3^7 - \binom{5}{3}2^7 + \binom{5}{4}1^7 - \binom{5}{5}0^7$$ Thus, the probability that all five kinds of stickers appear on the collection of seven chocolate bars is $$\frac{1}{5^7}\left[5^7 - \binom{5}{1}4^7 + \binom{5}{2}3^7 - \binom{5}{3}2^7 + \binom{5}{4}1^7 - \binom{5}{5}0^7\right]$$

Related Question