Candy Colors After Red Removal
Probability blue and green candies remain is a hard quant interview question on Conditional Probability.
This question considers a jar with several colors of candy and a random removal process, one candy at a time, until a particular color has been exhausted. The candidate must determine the probability that, at that exact moment, specific other colors are still present. It is a pure conditional probability question built around random permutations of indistinguishable groups, where all removal orders are assumed equally likely. The challenge is to see past the apparent dependence on the full sequence and instead describe the event purely in terms of the eventual relative positions of the different color groups.
The solution leans on symmetry, exchangeability, and reasoning about the last occurrence of each color in a random ordering. Candidates are expected to translate the story into statements about maxima of random positions and to reduce the problem dimension by conditioning on which color's last appearance occurs when. Interviewers use this to probe whether a candidate can strip away irrelevant detail, exploit combinatorial symmetry, construct the right conditional space, and keep track of events involving "last hits" without getting lost in brute-force enumeration.
What it tests
When dealing with problems about the order in which groups of indistinguishable objects are removed or selected, the key is to focus on the relative positions of the last occurrence of each group, rather than on the full sequence. The probability structure is governed by the symmetry and exchangeability of the removal process: since all orders are equally likely, the event that the last of type A is removed before the last of type B or C depends only on the counts of each type, not on the specific order. This leads to a reduction of the problem to comparing the distributions of the maximum indices for each group. The pattern holds because, in any random permutation, the probability that the last of one group occurs before the last of the others is determined by the relative sizes of the groups, and conditional independence emerges when you fix one group's last occurrence at a specific position and analyze the induced subproblem on the remaining candies.
Practise this question with written feedback, or hear it in a spoken mock interview.
Get started free