Analyze an Unfair-Coin Bankroll Game

Quick Overview

A player starts with a bankroll of `10`. Explain the assumptions and derivation clearly, check edge cases, and show how the result changes when those assumptions no longer hold.

Analyze an Unfair-Coin Bankroll Game

Company: Optiver

Role: Software Engineer

Category: Statistics & Math

Difficulty: hard

Interview Round: Technical Screen

A player starts with a bankroll of `10`. Each round, a biased coin is heads with probability `0.6` and tails with probability `0.4`. On heads the bankroll increases by one; on tails it decreases by one. The player stops upon reaching `20` or `0`. What is the probability of reaching `20` before going broke? Derive the formula rather than simulating, and evaluate it numerically. ### Constraints & Assumptions - Rounds are independent and probabilities remain constant. - “Winning double a one-unit bet” means the original stake is returned plus one unit of profit, so the net step is `+1`; a loss is `-1`. - Both boundaries are absorbing. ```hint Verify the stopping states first Any general expression should return certainty at the upper boundary and impossibility at zero, and should behave continuously as the coin approaches fairness. ``` ### What a Strong Answer Covers - Consistent treatment of both stopping states and the biased transition probabilities. - A derivation that uses the stated start, target, and payoff convention. - Interpretation of the high result and sensitivity to the payoff convention. ### Follow-up Questions - What would the answer be for a fair coin? - How would the expected game duration be derived? - Why must the payoff convention be clarified before using this formula?

Quick Answer: A player starts with a bankroll of `10`. Explain the assumptions and derivation clearly, check edge cases, and show how the result changes when those assumptions no longer hold.

|Home/Statistics & Math/Optiver
Optiver logo
Optiver
May 24, 2026, 12:00 AM
hardSoftware EngineerTechnical ScreenStatistics & Math
0
0

A player starts with a bankroll of 10. Each round, a biased coin is heads with probability 0.6 and tails with probability 0.4. On heads the bankroll increases by one; on tails it decreases by one. The player stops upon reaching 20 or 0.

What is the probability of reaching 20 before going broke? Derive the formula rather than simulating, and evaluate it numerically.

Constraints & Assumptions

  • Rounds are independent and probabilities remain constant.
  • “Winning double a one-unit bet” means the original stake is returned plus one unit of profit, so the net step is +1 ; a loss is -1 .
  • Both boundaries are absorbing.

What a Strong Answer Covers Guidance

  • Consistent treatment of both stopping states and the biased transition probabilities.
  • A derivation that uses the stated start, target, and payoff convention.
  • Interpretation of the high result and sensitivity to the payoff convention.

Follow-up Questions Guidance

  • What would the answer be for a fair coin?
  • How would the expected game duration be derived?
  • Why must the payoff convention be clarified before using this formula?
Loading comments...