Gambler’s ruin is a classical problem in probability theory concerning a player who repeatedly wins or loses a fixed amount until either becoming bankrupt or reaching a prescribed capital target. In its standard form, the player’s capital follows a random walk between two absorbing boundaries. The problem asks for the probability of reaching each boundary and the time required to do so. It illustrates an important distinction: a game can have zero expected gain on each play while still leading a player with finite capital to eventual bankruptcy when play continues without an upper stopping target.
Classical model
Suppose a player begins with an integer capital , where . On each play:
- capital increases by one unit with probability ;
- capital decreases by one unit with probability ;
- successive outcomes are independent, with the same probabilities on every play.
Assume . Write for the player’s capital after plays, with . Play stops when capital reaches either , representing ruin, or , representing success.
The stopping time is
After stopping, the process may be defined to remain at the boundary it has reached. It is then a finite Markov chain with absorbing states and .
An equivalent interpretation involves two players whose combined capital is . Each play transfers one unit from one player to the other, and the game ends when one player holds all the capital.
The model distinguishes two questions:
- Ruin probability: What is the probability of reaching before ?
- Duration: How many plays occur before either boundary is reached?
A favorable answer to one question need not imply a favorable answer to the other.
Probability of reaching the target
Let
be the probability of reaching the target before ruin. Conditioning on the first play gives the recurrence relation
with boundary conditions
This is a discrete boundary-value problem. Its solution is
The ruin probability is therefore
Derivation
When , rearranging the recurrence gives
Thus successive differences form a geometric progression with ratio . Summing those differences and imposing the boundary conditions yields the stated formula.
When , the recurrence becomes
Its solutions are linear in , and the boundary values give . In the language of discrete potential theory, is a harmonic function for the transition rule.
Interpretation
For a fair game, the probability of success equals the fraction of the total capital initially held. A player starting with units and aiming for has probability
of reaching the target and probability of ruin.
For an unfavorable game, , raising the target while keeping initial capital fixed makes success increasingly unlikely. For a favorable game, , increasing initial capital reduces ruin risk, but the risk remains positive for every finite initial capital.
Expected duration
Let
denote the expected number of plays before absorption. First-step conditioning gives
The solution is
For the fair-game example with and ,
This is an average over games ending at either boundary, not the expected duration conditional on success or conditional on ruin.
In the fair case, duration is largest when initial capital is closest to . If remains a fixed fraction of , expected duration grows proportionally to .
For every fixed finite , absorption occurs almost surely and has finite expected duration. One way to see this is that, from any interior state, a run of at most consecutive losses produces ruin. The probability of such a run provides a positive lower bound on absorption within each block of plays, producing a geometric bound on the tail of .
No upper capital limit
A different version removes the upper boundary. The player starts with and continues until reaching zero, if that ever happens. Let
Taking the upper target to infinity in the finite-boundary ruin probability gives
The cases have different interpretations:
- Unfavorable game, : ruin occurs almost surely.
- Fair game, : ruin also occurs almost surely, despite zero expected gain on each play.
- Favorable game, : there is a positive probability of avoiding ruin forever.
The expected ruin time further distinguishes the cases. If ,
For the fair game,
Thus a random variable can be finite with probability one while having infinite expectation. Rare, extremely long games make the average ruin time diverge.
When , the unconditional expectation of , interpreted as an extended nonnegative random variable, is also infinite because with positive probability. This is distinct from the expected duration conditional on eventual ruin.
“Certain eventual ruin” in the fair or unfavorable model does not mean ruin must occur within some fixed number of plays. Every finite deadline still leaves a positive probability of survival.
Martingales and stopping
The ruin formulas are central examples in martingale theory. A martingale has the property that its conditional expected future value, given present information, equals its current value.
In the fair game, capital is a martingale before absorption. For the finite-boundary model, the optional stopping theorem justifies
Because is either or ,
which immediately yields .
For , the exponential process
is a martingale before absorption, since
Applying optional stopping to the bounded, stopped process gives
which yields the biased-game formula.
In a fair game, is also a martingale before absorption and can be used to derive the expected duration.
Why stopping assumptions matter
For the fair game without an upper boundary, ruin occurs almost surely and terminal capital is zero. Nevertheless, it is invalid to conclude from the martingale property alone that expected terminal capital must equal initial capital.
For each fixed ,
while
Expectations cannot generally be interchanged with limits without additional conditions. In this example, increasingly rare surviving paths can carry increasingly large capital. The stopped variables are not uniformly integrable, and the mean ruin time is infinite.
Extensions and applications
Unequal stakes and variable transition probabilities
The classical formulas depend on unit-sized gains and losses and constant . If capital changes by larger amounts, boundaries may be crossed rather than hit exactly, producing an overshoot. Boundary conditions must then account for all exit states.
If the win probability depends on current capital, the success probabilities instead satisfy
Such models retain the first-step approach but no longer generally have the simple constant-bias formula.
Absorption-time distributions
Expected duration does not describe the full distribution of the game’s length. Let be the portion of the transition matrix corresponding to the transient states . Then
where selects the initial state and is the vector of ones.
The matrix
is the fundamental matrix of the absorbing chain. Its entry gives the expected number of visits to transient state before absorption, starting from . Summing row gives .
Diffusion approximation
With suitable rescaling of time and capital, random walks lead to continuous models based on the Wiener process. For a diffusion with constant drift and variance rate , the probability of reaching an upper boundary before zero satisfies
Its solution is
These continuous formulas parallel the discrete ruin probabilities.
Capital reserves and other finite populations
Ruin models provide simplified descriptions of capital reserves depleted by random losses. Related boundary-hitting problems arise in queues, inventory systems, and population models. In insurance mathematics, reserve processes typically include premium income and claims of varying sizes, so the elementary gambler’s ruin formula is a prototype rather than a direct description.
In simple neutral population models, the number of individuals carrying a variant can move between extinction and fixation. When changes are symmetric, the fixation probability has the same linear form as the fair gambler’s success probability.
Limitations and common misconceptions
The classical result assumes fixed stakes, independent outcomes, constant win probabilities, and no borrowing or replenishment of capital. Dependence between outcomes, changing stakes, transaction costs, or external income changes the process and may change both ruin probabilities and durations.
A positive expected gain per play does not eliminate bankruptcy risk. With , the player has a favorable drift, yet an early sequence of losses can still exhaust finite capital.
Conversely, almost-sure ruin in the fair unlimited-horizon model does not imply that the game has a negative expected gain per play. Fairness concerns expected increments; ruin concerns an entire random path and its boundary behavior.
The problem is also distinct from the gambler’s fallacy: under the independence assumption, a sequence of losses does not make a win more likely on the next play. Finally, the formulas for fixed unit stakes cannot simply be applied to betting systems that change the stake after wins or losses; those systems require a different model.