๐Ÿงฎ Brain Teaser

The Gambler's Ruin: Who Runs Out First?

Two gamblers, Alice and Bob, sit down to play a series of fair coin flips. At each flip, the loser pays the winner 1.Alicestartswith1. Alice starts with adollarsandBobstartswithdollars and Bob starts withb$ dollars. They play until one of them goes broke.

What is the probability that Alice wins (i.e., Bob goes broke first)?

Now for the surprising part: suppose a=1a = 1 and b=99b = 99. Alice starts nearly broke, facing a casino with deep pockets.

What is the probability Alice wins?

Does this match your intuition?

martingaleoptional stoppingrandom walkgamblingrecurrence

Answer: Gambler's Ruin: Martingale and Win Probability

Key Idea / Intuition

The key insight is that in a fair game, the probability of winning is exactly proportional to your starting wealth relative to the total pot. There's a beautiful reason: the gambler's fortune is a martingale (its expected value never changes), and optional stopping forces the expectation at the end to equal the expectation at the start. This pins down the win probability with almost no computation.

So Alice wins with probability a/(a+b)a/(a+b). With a=1a=1 and b=99b=99, Alice wins with probability just 1/100=1%1/100 = 1\%. The casino's deep pockets are overwhelmingly protective โ€” even in a perfectly fair game.


Formal Proof / Solution

Setup. Let pkp_k = probability Alice wins when she currently has kk dollars (and Bob has a+bโˆ’ka+b-k). The total pot is N=a+bN = a + b.

Martingale argument (slick). Alice's fortune XtX_t at time tt is a martingale: since the coin is fair, E[Xt+1โˆฃXt]=12(Xt+1)+12(Xtโˆ’1)=Xt.E[X_{t+1} \mid X_t] = \frac{1}{2}(X_t + 1) + \frac{1}{2}(X_t - 1) = X_t. The game ends at a random time TT when XTโˆˆ{0,N}X_T \in \{0, N\} (one player goes broke). By the Optional Stopping Theorem (applicable here since the game terminates with probability 1 and the fortune is bounded): E[XT]=E[X0]=a.E[X_T] = E[X_0] = a. But XT=NX_T = N with probability pap_a (Alice wins) and XT=0X_T = 0 with probability 1โˆ’pa1 - p_a (Bob wins). So: E[XT]=paโ‹…N+(1โˆ’pa)โ‹…0=paโ‹…N.E[X_T] = p_a \cdot N + (1-p_a) \cdot 0 = p_a \cdot N. Setting equal: paโ‹…N=aโ€…โ€ŠโŸนโ€…โ€Špa=aa+b.p_a \cdot N = a \implies \boxed{p_a = \frac{a}{a+b}.}

The Surprising Answer. With a=1a = 1, b=99b = 99: p1=1100=1%.p_1 = \frac{1}{100} = 1\%.

Alice has only a 1% chance of winning, despite the game being perfectly fair at every single step. The asymmetry comes entirely from starting positions, not from any bias in the coin.

Why is this surprising? People often conflate "fair game" (each flip is 50-50) with "fair competition" (both players have equal chances). A fair game only guarantees fairness in expectation โ€” not in survival. The richer player benefits enormously from their "buffer" against the random fluctuations.

Alternative derivation (recurrence). For completeness, the same answer follows from solving the recurrence: pk=12pkโˆ’1+12pk+1,p0=0,โ€…โ€ŠpN=1.p_k = \frac{1}{2}p_{k-1} + \frac{1}{2}p_{k+1}, \quad p_0 = 0,\; p_N = 1. The general solution is pk=Ak+Bp_k = Ak + B, and boundary conditions give pk=k/Np_k = k/N.

Source: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller)

Type: ProbabilitySource: Fifty Challenging Problems in Probability with Solutions (Frederick Mosteller)Edit on GitHub โ†—