Mathematics and Gambling: The Numbers Behind Every Bet, Tested
Mathematics and gambling have been linked since the 1500s, and the maths gives the same answer every time: a bet with a negative expected value loses money over enough plays, whatever system you use. We tested that with our own simulations: six betting systems on roulette, the odds of doubling your money with small bets or one big one, how long streaks really run, and how much to stake when you do have an edge. Each section below sets out the idea, the formula and what our numbers show.
Where Gambling Mathematics Began
Probability theory grew out of gambling. The Italian mathematician Gerolamo Cardano wrote Liber de ludo aleae (Book on Games of Chance) around 1564, the first systematic treatment of probability, though it was not published until 1663. In 1654, the Chevalier de Méré asked Blaise Pascal how to divide the stakes of an unfinished game fairly; Pascal's letters with Pierre de Fermat on this "problem of points" laid the foundations of modern probability.
Jacob Bernoulli proved the law of large numbers in Ars Conjectandi, published in 1713, the result that explains why casinos can rely on their edge. In 1956, John Kelly, a researcher at Bell Labs, described the staking formula now named after him, and the mathematician Edward Thorp later used probability to show that blackjack could be beaten by counting cards.
Probability and Odds
Probability is the chance an outcome happens, from 0 (impossible) to 1 (certain). Odds express the same thing in betting formats:
| Format | Example | Implied probability |
|---|---|---|
| Fractional | 3/1 | 1 ÷ (3 + 1) = 25% |
| Decimal | 4.0 | 1 ÷ 4.0 = 25% |
| Probability | 25% | 25% |
A bookmaker's odds on a race or match normally add up to more than 100% of probability, and the excess is its margin, often called the overround. In an example eight-runner race priced at 2/1, 3/1, 5/1, 6/1, 8/1, 10/1, 14/1 and 20/1, the implied probabilities add up to 120.9%: the book is about 21% "over round". A casino's house edge does the same job as a bookmaker's margin, built into the payouts rather than the prices.
Expected Value: The Number That Decides Everything
Expected value (EV) is the average result of a bet if you could repeat it forever:
EV = (probability of winning × amount won) − (probability of losing × amount lost)
A £1 bet on red at European roulette wins £1 with probability 18/37 and loses £1 with probability 19/37, so its EV is −1/37 of a pound, a loss of 2.7p. Every standard bet on a single-zero wheel has the same EV per pound, which is why choosing between roulette bets changes how results swing, not what they cost. Our guide to house edge covers EV for every main casino game.
Variance and the Law of Large Numbers
Variance measures how far results swing around the EV; its square root, the standard deviation, is about £1 for a £1 bet on red and grows with the square root of the number of bets. The average loss grows in direct proportion, so in the short run the swings dominate and in the long run the law of large numbers takes over. We worked out the exact chance of being ahead after betting £1 on red again and again:
| Spins of £1 on red | Chance of being ahead | Average loss |
|---|---|---|
| 10 | 34.42% | 27p |
| 100 | 35.53% | £2.70 |
| 1,000 | 18.76% | £27.03 |
| 10,000 | 0.33% | £270.27 |
| 100,000 | Effectively nil | £2,702.70 |
Over 100 spins, about a third of players finish ahead. Over 10,000, about one in 300 does. That is the whole business model of a casino in one table: it does not need to win any single bet, only to keep taking bets.
Streaks and the Gambler's Fallacy
The gambler's fallacy is the belief that a result is "due" after a run of the opposite. The best-known example came at the Monte Carlo Casino in 1913, when the roulette wheel spun black 26 times in a row and players lost heavily betting on red to end the run.
Streaks that long are extremely rare, but shorter runs are far more common than most people expect. A run of 10 reds from any given spin has a chance of about 1 in 1,347 on a single-zero wheel, and 26 blacks from a given spin about 1 in 137 million. But across a long session there are many starting points. We simulated 20,000 sessions of 1,000 spins each:
| Longest run of one colour in 1,000 spins | Share of sessions |
|---|---|
| 8 or more | 96.4% |
| 12 or more | 53.6% |
| 12 or more | 16.5% |
So in a typical evening of 1,000 spins, a run of 10 of the same colour is more likely than not. None of it changes the next spin: the wheel has no memory, and red is still 18/37 after ten blacks. Online games work the same way, using a tested random number generator for every spin, deal or roll.
Betting Systems, Tested
Betting systems change how much you stake after wins and losses. We tested six on European roulette's even-money bets, with 40,000 sessions per system. Each session started with £200 and £1 units, a £100 table maximum, and ran for 200 spins or until the money ran out:
| System | How it works | Finished ahead | Went broke | Average result | Lost per £1 staked |
|---|---|---|---|---|---|
| Flat stakes | £1 every spin | 32.6% | 0.0% | −£5.38 | 2.69p |
| Martingale | Double after each loss | 61.3% | 30.7% | −£17.58 | 2.58p |
| D'Alembert | Add £1 after a loss, take £1 off after a win | 51.0% | 28.4% | −£36.25 | 2.70p |
| Fibonacci | Move along the Fibonacci sequence after losses | 76.2% | 19.3% | −£14.59 | 2.69p |
| Labouchère | Cross numbers off a 1-2-3 list | 44.2% | 53.8% | −£38.65 | 2.54p |
| Paroli | Double after each win, up to three | 36.2% | 0.0% | −£8.93 | 2.64p |
Every system lost about the same 2.5p to 2.7p per pound staked, the house edge, give or take sessions cut short by going broke. What the systems change is the shape: Martingale and Fibonacci win small amounts most of the time and then lose the lot, while flat staking loses slowly and rarely goes broke. The more a system raises stakes after losses, the more money it puts through the wheel, and so the more it loses on average. Our guide to roulette has a longer Martingale test.
Gambler's Ruin: Small Bets or One Big One?
If you must play a game with a house edge and want to reach a target, the maths favours bold play. The gambler's ruin formula gives the chance of turning £100 into £200 before losing it all. Betting on red at European roulette:
| Stake per bet | Chance of doubling £100 |
|---|---|
| £1 | 0.45% |
| £5 | 25.33% |
| £10 | 36.80% |
| £25 | 44.61% |
| £50 | 47.30% |
| £100 (one bet) | 48.65% |
Small bets give the house edge hundreds of chances to work on your money; one bet gives it one. This is not a recommendation to bet big, only a demonstration that patience does not beat a negative edge.
The Kelly Criterion: Staking When You Have an Edge
The Kelly criterion sets how much of your bankroll to stake on a bet with a positive expected value:
Stake fraction = (b × p − q) ÷ b, where b is the decimal odds minus 1, p the chance of winning and q the chance of losing.
It only helps when the edge is real, so it applies to value betting, not casino games. In racing terms, if you rate a horse a 25% chance and it is offered at 4/1 (5.0), the bet returns 25p per £1 on average, and Kelly says to stake 6.25% of your bankroll.
We tested Kelly on a simpler bet: an even-money chance you win 52% of the time, where Kelly says stake 4%. Over 1,000 bets from £1,000, in 20,000 simulations:
| Staking | Typical (median) final bankroll | Ended below £1,000 | Ended below £100 |
|---|---|---|---|
| Full Kelly (4%) | £2,226 | 27.7% | 0.7% |
| Half Kelly (2%) | £1,822 | 17.9% | 0.0% |
| Double Kelly (8%) | £997 | 50.8% | 17.7% |
| Flat 10% of bankroll | £364 | 63.6% | 34.3% |
Even with a genuine 4% edge, staking too much turned a winning bet into a typical loss. Half Kelly gave up some growth for a much smoother ride, which is the usual case for staking a fraction of Kelly.
Mathematics and Gambling: Our View
The mathematics of gambling points to a few clear habits. This section is our opinion, based on the figures above:
- The edge always wins over time. No staking system changes the cost per pound; only the game and the bet do.
- Short runs are noise. Streaks of 10 or more are normal over a long session and say nothing about the next spin.
- If you play a negative-edge game, keep it short and cheap, and treat the expected loss as the price of the entertainment.
- Edges exist only where you can price better than the market, as in value betting, and even then staking discipline decides the outcome.
Our guides to slot volatility and variance and casino table games apply the same maths to specific games.
FAQs
Can maths help you win at gambling?
Only where you can find a positive expected value, such as value betting against a bookmaker's prices, card counting at a live blackjack table, or outplaying opponents at poker, where pot odds are expected value in action. In casino games with a fixed house edge, maths tells you the cost and the risk, but no system changes them.
Do betting systems like the Martingale work?
No. In our simulation of six systems over 40,000 sessions each, every one lost about 2.5p to 2.7p per pound staked, close to the 2.7% house edge. The Martingale finished ahead 61.3% of the time but went broke 30.7% of the time.
What is the law of large numbers in gambling?
It is the result, first proved by Jacob Bernoulli and published in 1713, that averages close in on the expected value as the number of bets grows. In our calculation, 35.5% of players are ahead after 100 even-money roulette bets, but only 0.33% after 10,000.