The Candy Mixture Puzzle
Solution


Problem 1: the probability of not picking flavor 1 on the first draw is 3/4. The probability of not picking flavor 1 on any of the 24 draws is (3/4)^24. There are four different flavors, any one of which could be the missing one, so the probability that the bag is missing one (or more) of the flavors is:

P(less than 4 flavors) = 4 * P(no flavor 1) = 0.00401356
which means about 1 bag in every 250 would be "defective" in this way. The manufacture will not be happy!

Problem 2: the probability of not picking flavor 1 on the first draw is 36/48, because there are 36 non-flavor-1 candies in the bucket to choose from. Assuming I didn't pick flavor 1 on the first draw, the probability of not picking it on the second draw is then 35/47, and so on. The probability of not picking flavor 1 on any of 24 consecutive draws is then:

P(no flavor 1) = 36/48 * 35/47 * 30/46 * ... * 13/25 = (36!/12!)/(48!/24!) = 0.0000388
If you don't trust yourself to enter these numbers into a calculator, you could program the calculation as:
p = 1.0
do i = 0, 23
p = p * ( ( 36.0 - i ) / ( 48.0 - i ) )
end do
There are four different flavors, any one of which could be the missing one, so the probability that the bag is missing one (or more) of the flavors is:
P(less than 4 flavors) = 4 * P(no flavor 1) = 0.000155
which means about 1 bag in every 6500 would be "defective" in this way.

This puzzle was inspired by a real case. A candy company decided to offer a mix of four of its hard candies in a single bag. But if the bag said "Four Varieties", what were the chances that it only contained three?. After a series of probability calculations and even a simulation of the process, running thousands of sample cases, they decided the chances were too high. They altered the original production line so that the bags were only partially filled automatically. The last 8 pieces, 2 of each kind, were dropped in by hand, to guarantee a mix.


Thanks to David Levine of St Bonaventure University for pointing out an error in the original version of this discussion.

Last revised on 23 June 2000.