The Candy Mixture Puzzle


Every time you flip a "fair" coin, you have a 50% chance of heads or tails. If you're hoping for heads, it's reasonable to estimate that on average, you'll have to flip the coin twice, and this estimate can actually be made precise. The expected value of the number of flips made until you get a head is 2.

Suppose, now, that you play a game where you win if you flip heads, but you get up to three chances to do so. What's the probability of winning? One way to think about this is to say you have a 1/2 chance of heads on the first flip, so your chances are at least 1/2. But if you get tails on the first flip, you have a 1/2 chance of heads on the second, (adding 1/4 to your total chances), and on the 1/4 chance of tails, you have a final 1/2 chance of heads, for another 1/8 to your total, for a total probability of 7/8 for winning.

A faster way to see this is to realize that the only way to lose is to get tails three times in a row, which has a probability of 1/2 * 1/2 * 1/2 or 1/8, so your chances of winning are 1 - 1/8.

Now here's a real world problem that can be understood using similar reasoning. A candy manufacturer comes out with a new product, which is a bag of 24 candies. There are 4 flavors of the candy, so the "perfect mix" would be 6 of each. Purchasers will expect a reasonable mix, and will be unhappy if a bag advertising 4 flavors has almost none of their favorite flavor.

To simplify the problem, let's just worry about the probability of finding a bag of candy that does not have at least one of each flavor. Let's suppose that the manufacturer will be pleased if we can report that this chance is less than one in a million.

A second version of this problem can be devised by trying to be more realistic. When we assume that the candy bag is filled at random, we essentially assume that there is an infinite supply of candy of each type, so that choosing a candy of flavor 1 doesn't diminish the chances that we will choose that flavor again. Instead, let's suppose we only have 12 candies of each kind, which is enough to make two bags. I fill the first bag by drawing, one at a time, 24 candies from the well-mixed supply of 48. What is the probability that this first bag will be missing a flavor?

I give up, show me the solution.


Last revised on 23 June 2000.