Compute probability in urn with green returns
Virtu FinancialData Scientist · Technical ScreenLast updated
Compute probability in urn with green returns evaluates statistical assumptions, formulas, estimation strategy, uncertainty, edge cases, and interpretation in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
An urn contains 5 red, 5 blue, and 5 green balls. You repeatedly draw one ball uniformly at random. If the ball is green, immediately return it to the urn and continue; if it is red or blue, keep it. Stop once you are holding three balls (i.e., three non-green balls).
- What is the probability that at least two of the three held balls are red?
- Now suppose the urn instead has 10 red, 5 blue, and 5 green balls (same process). First give an intuitive estimate, then compute the exact probability that at least two of the three held balls are red.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.