The Drunkard's Last Dollar: Gambler's Ruin with a Twist
A gambler starts with \1$11/2$11/2$0$n$.
Now consider a different question: instead of asking for the probability of reaching \n$n$k$.
Show that the expected duration is .
In particular, starting from \1$nn-1$.
Answer: Gambler's Duration via Martingale
Key Idea / Intuition
The key is to find a martingale whose optional stopping gives the answer directly. For a simple symmetric random walk , both and are martingales. The first gives the win probability (linear in starting position); the second, when stopped at the exit time , gives in terms of the starting position. This is a beautiful example of how martingales convert a seemingly hard expectation problem into simple algebra.
Formal Proof / Solution
Setup. Let , and let . We want .
Step 1: is a martingale.
Since each step has mean zero, , so is a martingale.
By Optional Stopping (the game ends in finite time a.s.):
Also , so if is the probability of reaching :
(This recovers the classical gambler's ruin formula.)
Step 2: is a martingale.
Compute:
Therefore:
Step 3: Apply Optional Stopping to .
By Optional Stopping (justified since has finite expectation and bounded increments):
But also:
We already know with probabilities and , so:
Therefore:
Step 4: The special case.
Starting from with target :
Why this is beautiful. The answer is symmetric in and : the game lasts longest when you start in the middle (), which makes perfect intuitive sense. The martingale does all the work, turning a recursive system of equations into a one-line calculation.
Written to question file and answer below.
Source: Mathematical folklore / Mosteller-adjacent classic