Compute probability with colored balls draws
Problem Description
You are given a bag containing colored balls: red, blue, and green. You draw balls one at a time according to specific rules:
- If a green ball is drawn, it is immediately returned to the bag. It does not count towards the balls you are holding.
- If a red or blue ball is drawn, it is kept and removed from the bag. It counts towards the balls you are holding.
The drawing process stops once you are holding exactly 3 balls (all of which will be either red or blue, as green balls are never held).
Questions
- Initial Scenario: The bag starts with 5 red, 5 blue, and 5 green balls. Calculate the probability that at least two of the three balls you are holding are red.
- Follow-up Scenario: If the bag instead starts with 10 red, 5 blue, and 5 green balls, what is the probability that at least two of the three balls you are holding are red?
AI interview prep
Core dilemma
Accurately modeling a dynamic probability space where draws are dependent (balls removed) but also independent (balls replaced), requiring careful consideration of conditional probabilities and event sequences.
2 tradeoffs and 2 stress tests locked
Interview prep
Unlock the interviewer X-Ray rubric, tradeoff matrix, stress tests, clarifying questions, and key concepts.
Compute probability with colored balls draws
Problem Description
You are given a bag containing colored balls: red, blue, and green. You draw balls one at a time according to specific rules:
- If a green ball is drawn, it is immediately returned to the bag. It does not count towards the balls you are holding.
- If a red or blue ball is drawn, it is kept and removed from the bag. It counts towards the balls you are holding.
The drawing process stops once you are holding exactly 3 balls (all of which will be either red or blue, as green balls are never held).
Questions
- Initial Scenario: The bag starts with 5 red, 5 blue, and 5 green balls. Calculate the probability that at least two of the three balls you are holding are red.
- Follow-up Scenario: If the bag instead starts with 10 red, 5 blue, and 5 green balls, what is the probability that at least two of the three balls you are holding are red?