Gambler's Ruin
You start with some money and bet a fixed amount each round until you either hit a target or go broke. The classic random-walk problem — and the cleanest lesson in how a tiny house edge becomes near-certain ruin.
Prerequisites: The Random Walk, Expected Value
Gambler's ruin is the little problem that hides a big truth. You walk into a casino with some money, say $100, and you want to run it up to $200 before you go broke. Each round you bet $1 on a coin-like wager. Your bankroll drifts up and down one dollar at a time until it hits one of two walls: $0 (you're ruined) or $200 (you've won). Two questions: what's the chance you reach the target before going bust, and how long will the whole thing take? The answers are exact, and they explain why casinos always win.
The setup: a walk between two walls
Your wealth is a The Random Walk that starts at some level , steps up by one with probability and down by one with probability , and stops the instant it touches or the target . The two ends are absorbing barriers: once you hit them, the game is over. Everything about the problem is captured by three numbers — where you start (), where the target sits (), and how the coin is tilted ().
The fair-game answers
When the game is fair (), the results are remarkably clean. The probability of reaching the target before going broke, starting from , is simply your fraction of the way there:
And the expected number of rounds until the game ends — either way — is
Both fall out of a one-line martingale argument, but the intuition is enough: in a fair game your expected wealth never changes, so the chance-weighted average of the two endpoints must equal where you started, which forces the target probability to be .
In a fair game, the chance of reaching your target from a start of is exactly , and the game lasts rounds on average. Doubling from $100 to $200 is a genuine coin flip — but it takes about ten thousand one-dollar bets to resolve.
Worked example: the doubling bet, fair and slightly unfair
Fair coin. You start at , target , even-odds $1 bets. Your chance of doubling is — a true coin flip. Expected rounds: bets. Fair, but slow.
Now tilt the coin against you. Real casino games aren't fair. Say each bet wins with probability instead of . For a biased walk the target probability becomes
Plug in , : and , so
A one-percentage-point edge against you collapses a coin flip into a shot. That is the entire business model of a casino: the per-bet edge looks trivial, but compounded over thousands of rounds it makes reaching a distant target almost impossible.
Against a house with a negative edge and deep pockets, ruin is essentially certain if you play long enough. The tiny per-round disadvantage doesn't stay tiny — it grows geometrically in the target probability, which is why "just keep playing to break even" is a fatal plan.
The one strategy that helps a losing game
If you must play a game with the odds against you, the math points to a counterintuitive rule: bet big, not small. Bold play — staking as much as you can toward the target in as few bets as possible — minimizes the number of rounds the house edge gets to act on you. Making many small bets just gives the negative drift more chances to grind you down. It's the opposite of what feels prudent, and it only makes a bad game less bad; against a fair game, bet sizing changes nothing about your chance of reaching a symmetric target.
Facing an unfavorable game, timid play (many small bets) maximizes your ruin probability, while bold play (few large bets) minimizes it. You can't beat a negative edge — but you can starve it of the repetition it needs.
Where it connects
Gambler's ruin is the archetype for every "does the walk hit this level before that one" question. It is solved most elegantly with the Optional Stopping Theorem applied to two martingales, set up directly with First-Step Analysis, and it generalizes to the boundary problems of Markov Chains. Its risk lesson — that a small edge compounds into near-certainty — is the same one that drives the The Kelly Criterion and the whole discipline of position sizing.
Related concepts
Practice in interviews
Further reading
- Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, ch. 14
- Grimmett & Stirzaker, Probability and Random Processes, ch. 3