applets.

Gambler's Ruin

← All apps

About Gambler's Ruin

You walk in with some money and promise yourself you'll leave when you reach a target, or when it's all gone. Every bet is even money (red at roulette, heads on a coin): win and you get your stake back plus the same again; lose and it's gone. What's the chance you reach the target first, and how many bets does it take?

Set the game, the money (start, target, stake) and the system, which decides how much each bet is. PLAY ONE follows a single gambler, bet by bet, with every bet written in the cashier's ledger. Pick a chip (100 to 100,000 gamblers) and press RUN to send in a crowd: their money lines fade in behind, the books show how many reached the target against the Expected figure from the maths, and the chart underneath shows how long their evenings lasted. Change a setting after a run and the old results fade until you run again.

The line is in black ink while the gambler is up on the evening and in red ink while down, as in a bookkeeper's ledger.

This is a maths demonstration, not a betting guide. In any game with a house edge every system loses money on average, and no pattern of bets changes that. If gambling stops being fun for you or someone you know, GamCare and BeGambleAware offer free, confidential help in the UK.

THE STORY

The problem goes back to the very start of probability. Blaise Pascal put a version of it to Pierre de Fermat in 1656, and Christiaan Huygens printed it as a challenge at the end of his 1657 book on games of chance, the first published book on probability. Jacob Bernoulli and Abraham de Moivre later published general solutions. It became the standard first example of a "random walk": a counter that steps up or down at random until it hits a wall.

In 1965 Lester Dubins and Leonard Savage wrote How to Gamble If You Must. One of their results: when every bet is against you, the strategy most likely to reach a target is bold play, staking everything you need (or everything you have) each time. The fewer bets you make, the less time the house edge has to work.

The martingale (double after every loss, so one win wins back everything plus one stake) is an old system; Giacomo Casanova describes playing it, and losing, in his memoirs. The Fibonacci system steps along Leonardo of Pisa's sequence 1, 1, 2, 3, 5, 8…, but the betting use is modern: Leonardo wrote about rabbits, not roulette. The reverse martingale (also called the Paroli) doubles after wins instead.

HOW IT WORKS

Write p for the chance of winning a bet and q = 1 − p for losing. Red at a European wheel wins 18 times in 37 (the green zero is the house's), so the house keeps on average 1/37 = 2.70% of everything staked; an American wheel has a second zero, 18 in 38, and the edge is 2/38 = 5.26%.

With flat bets, count the money in stakes: start with i, aim for N. The chance of getting there is (1 − (q/p)i) / (1 − (q/p)N), or simply i/N in a fair game, and in a fair game the average number of bets is i(N − i): from 10 stakes aiming for 20, 100 bets. When the stake doesn't divide the money evenly, or for bold play, the page solves the same "what happens next" equations exactly for every amount of money. The martingale, reverse martingale and Fibonacci remember their past bets, so they have no simple formula: there the simulation is the answer, and the books show a dash under Expected.

No bet is ever bigger than the money in hand, or bigger than what's still needed to reach the target, so every evening ends on exactly £0 or exactly the target. That gives one rule that covers every system: chance of reaching the target = (start − the house's take) ÷ target, and the house's take is its edge times the total staked. A system that stakes more in total loses more. Bold play stakes the least, so in a game against you it gets there most often; in a fair game every system gives exactly start ÷ target; it only changes how long it takes. The martingale doesn't escape this: it makes lots of small wins and, now and then, one large loss when a run of losses (or the table limit) breaks the doubling.

For the martingale, reverse martingale and Fibonacci, when the next bet would pass the table limit the run of bets is written off and it starts again at the stake. The reverse martingale banks its winnings after three wins in a row. The simulation uses a seeded random number generator (mulberry32); RUN draws a new seed each time.

FURTHER WATCHING AND READING

THE MONEY, BET BY BET

up on the eveningdownthe crowd

 

CASHIER'S LEDGER

BETWONLOSTBALANCE

THE TERMS

THE GAME

WIN CHANCE 48.65%

 

THE MONEY

 

THE SYSTEM

TABLE LIMIT

PLACE YOUR BETS

GAMBLERS

THE HOUSE'S SUM

chance = (start − take) ÷ target

 

 

THE BOOKS

 
EXPECTEDTHE CROWD
Reached the target––
Average bets––
Average staked––
House's take––

 

HOW LONG THE EVENINGS LASTED

reached itwent broke