# Probability question about cherry picking

Question:

Amy has a bowl of 5 red cherries and 8 purple cherries. She takes out cherries one at a time until there are no red cherries left. What is the probability that there are exactly 2 cherries left in the bowl?

Solution attempt: I imagine that the $$13$$ cherries are arranged in a random sequence $$X_1\ldots X_{13}$$, and Amy picks them in that order. There are $$13!$$ possible orderings of this sequence. Out of these orderings, the ones for which exactly $$2$$ cherries are left in a bowl have the form $$X_1\ldots X_{10}{\rm RPP}$$, i.e. the sequence ends with a red cherry followed by two purple cherries. There are $$5$$ ways to select the red cherry, $${8\choose 2}$$ ways to pick the two purple cherries, and $$10!$$ ways to arrange the remaining $$10$$ cherries. The probability is then $$\frac{5\times{8\choose 2}\times 10!}{13!} = \frac{35}{429} \approx .082$$ I'm solving this on a website, and it does not accept my answer. I ran a Monte Carlo simulation as a sanity check, and it gave me values around $$.1$$, so it seems I am indeed lowballing. What am I missing? Thanks!

• And the ways to arrange the $2$ purple cherries left in the bowl? Commented Jul 31, 2023 at 2:41
• @peterwhy Ope! That'll do it :) feel free to post this as an answer and I'll accept it. Commented Jul 31, 2023 at 2:45
• The answer depends on whether Amy is taking the cherries out randomly or is cherry picking her preferred color. Commented Jul 31, 2023 at 4:39
• Based on the answers below, your Monte Carlo simulation is probably buggy. A good simulation run say a million times should have gotten you to the vicinity of 0.163 rather than 0.1. You might then have noticed that it seems that you were off by a factor of 2. Commented Jul 31, 2023 at 13:44
• @JohnColeman yeah, I was sloppy all around, eh? I miscalculated the probability of selecting red vs. purple at each choice! Commented Jul 31, 2023 at 14:11

The last $$3$$ picked (in order) must be red, purple, purple.

The simplest solution is to see that by symmetry, P(last $$3\; RPP$$) = P(first $$3\;PPR$$), and hence $$Pr = \frac8{13}\frac7{12}\frac5{11} = \frac{70}{429} \approx 0.16317$$.

• Surprising to see two downvotes, too ! Commented Aug 1, 2023 at 20:04

The approach in the question considers all $$13!$$ permutations of different cherries, but only misses the $$2$$ ways to order the two purple cherries left in the bowl. The probability is then

$$\frac{5\times{8\choose 2}\times 2\times 10!}{13!} = \frac{70}{429} \approx .163$$

Alternatively, I consider the sequences of $$5$$ identical red cherries and $$8$$ identical purple cherries. There are $$\binom {13}5$$ possible sequences.

Out of these sequences, the ones for which exactly $$2$$ cherries are left in a bow have the form $$X_1\ldots X_{10}RPP$$. Choose $$4$$ positions among $$X_1,\ldots,X_{10}$$ for the red cherries. The probability is then

$$\frac{\binom{10}{4}}{\binom{13}{5}} = \frac{\frac{10!}{4!6!}\times5!8!}{13!} = \frac{\frac{5!}{4!}\times\frac{8!}{6!2!}\times 2\times10!}{13!} = \frac{70}{429} \approx .163$$

Alternative approach:

In order for there to be exactly 2 (purple) cherries left, two things have to happen:

• The first 10 cherries picked must contain exactly $$~4~$$ red cherries and $$~6~$$ purple cherries.
The probability of this happening is
$$~\displaystyle \frac{\binom{5}{4} \times \binom{8}{6}}{\binom{13}{10}} = \frac{70}{143}.$$

• With $$~3~$$ cherries left, one of which is red, the $$~11$$'th cherry picked must be red.
The probability of this happening is $$~\dfrac{1}{3}.$$

final answer: $$~\displaystyle \dfrac{70}{143} \times \dfrac{1}{3} = \dfrac{70}{429}.$$