Solution
How Long at the Table
Show the problem again
A gambler starts with $3 and repeatedly bets $1 on a fair coin, winning or losing $1 each round. Play stops when the fortune reaches $0 or $10. What is the expected number of rounds played? Give an exact number.
Worked solution
The answer is 21. If X_n is the fortune, X_n² − n is a martingale for a fair ±1 walk. At the stopping time T, X_T is 10 with probability 3/10 and 0 otherwise, so E[X_T²] = 30. Optional stopping gives 30 − E[T] = 3² = 9, so E[T] = 21. In general the duration from k between 0 and N is k(N − k).
Source: Expected duration in the fair gambler's ruin; classical. Statement written for AxiomIQ.