Probability & Statistics

Candies in a Jar

Ten red, twenty blue, thirty green candies drawn in random order. When the last red appears, how likely is a blue and a green to still remain?

solvedmedium1 min

A jar holds 10 red, 20 blue, and 30 green candies. You draw them one by one in random order. What is the probability that at least one blue and at least one green candy remain in the jar at the moment you draw the last red?

Reveal solutionHide solution

#Rephrase as an order

At least one blue and one green remain after the last red exactly when the last red is drawn before the last blue and before the last green. So I only care about how the last candy of each colour is ordered, which I reach by conditioning on the colour that finishes the whole sequence of 60.

#Condition on the final candy

The very last candy is blue with probability 2060=13\tfrac{20}{60} = \tfrac{1}{3}, green with 12\tfrac{1}{2}, and red with 16\tfrac{1}{6}.

If it is blue, the last red already beats the last blue, and I only need the last red before the last green. Among the 10 reds and 30 greens, the last of those 40 is green with probability 3040=34\tfrac{30}{40} = \tfrac{3}{4}.

If it is green, by the same reasoning I need the last red before the last blue, which among the 10 reds and 20 blues happens with probability 2030=23\tfrac{20}{30} = \tfrac{2}{3}.

If it is red, the jar is already empty, so I lose.

last is blue1/3xlast red precedes last green3/4=1/4
last is green1/2xlast red precedes last blue2/3=1/3
last is red1/6xthe jar is already empty0=0
Condition on the colour of the very last candy. Adding the surviving cases, 1/4 + 1/3 = 7/12.

#Add the cases

P=1334+1223+160=14+13=712.(1)\PP = \tfrac{1}{3}\cdot\tfrac{3}{4} + \tfrac{1}{2}\cdot\tfrac{2}{3} + \tfrac{1}{6}\cdot 0 = \tfrac{1}{4} + \tfrac{1}{3} = \frac{7}{12}. \tag{1}