Compute probability match lasts 5 games
WaymoData Scientist · Technical ScreenLast updated
This question evaluates understanding of discrete probability, sequential best-of-n match modeling, Monte Carlo simulation for probability estimation, and interval estimation for proportions.
Two players play independent games of table tennis.
- Player A wins each game with probability (p) (constant across games).
- They play a best-of-5 match (first to 3 wins).
- Let (X) be the number of games played until the match ends (so (X\in{3,4,5})).
Tasks
- Compute (\theta = \Pr(X=5)).
- Write a simulation (Monte Carlo) approach to estimate (\theta).
- Follow-up: given (M) simulated matches, how would you build a confidence interval for (\theta)?
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.