Compute probability match lasts 5 games
Company: Waymo
Role: Data Scientist
Category: Statistics & Math
Difficulty: easy
Interview Round: Technical Screen
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
1) Compute \(\theta = \Pr(X=5)\).
2) Write a simulation (Monte Carlo) approach to estimate \(\theta\).
3) Follow-up: given \(M\) simulated matches, how would you build a **confidence interval** for \(\theta\)?
Quick Answer: This question evaluates understanding of discrete probability, sequential best-of-n match modeling, Monte Carlo simulation for probability estimation, and interval estimation for proportions.