standarddeviationcalculator.net

Updated

Variance in gambling: why swings hide the house edge

Casino games and poker are some of the clearest examples of standard deviation at work. Every bet has an expected value, the average result per bet over the long run, and a standard deviation, the size of the typical swing around that average. How those two numbers grow as you keep betting explains why a player can win for an evening and still be certain to lose over a long enough stretch. This post uses the arithmetic to explain that; it is not advice to gamble.

01000200030004000500060007000800090001000011000-5000-4000-3000-2000-10000 $361.95−$703.43−$2,702.70 Number of $10 bets on red Net result ($)

━ Expected result, −$0.27 per bet   ┄ Expected ± 2 SD

The expected loss falls in a straight line while the ±2 SD swing widens only with √n, so by 10,000 bets even the top of the range is a loss.

One bet: expected value and standard deviation

Take a $10 bet on red at a single-zero roulette wheel. There are 37 pockets: 18 red, 18 black and one green zero. Red pays even money, so you win $10 with probability 18/37 and lose $10 with probability 19/37.

EV = 10 × 18/37 − 10 × 19/37 = −10/37 = −$0.27 per bet

That −2.70% is the house edge. For the standard deviation, work out the average squared outcome and subtract the squared mean. Every outcome is ±$10, so the average squared outcome is exactly 100:

Var = 100 − (−0.27)² = 99.93 SD = √99.93 = $9.996

So one bet has an expected loss of 27 cents and a standard deviation of almost $10. The swing is 37 times the edge. On a single spin the edge is invisible. The expected value calculator will give both figures for any payout table, and the roulette payout calculator lists the payouts and edge for each type of roulette bet.

Many bets: n versus √n

Spins are independent, so over n bets the expected values add and the variances add. That is the key fact from the standard deviation of a random variable: for a sum of independent bets,

EV(total) = n × EV(one bet) SD(total) = √n × SD(one bet)

The expected loss grows in a straight line with the number of bets. The typical swing grows only with the square root. Here is what that means for a player making the same $10 bet on red again and again:

Bets nExpected resultSD of resultExpected ± 2 SDChance of being ahead
10−$2.70$31.61−$65.93 to $60.5234.4%
100−$27.03$99.96−$226.95 to $172.9035.5%
1,000−$270.27$316.11−$902.49 to $361.9518.8%
10,000−$2,702.70$999.63−$4,701.97 to −$703.430.33%

The "chance of being ahead" column is the exact binomial probability of winning more than half the spins; a tie leaves you level, not ahead, which is why the 10-spin figure is lower than you might expect. Read down the table. At 10 and 100 bets, the swing dwarfs the expected loss and a winning session is common. By 1,000 bets the two are about the same size, and by 10,000 the whole ±2 SD range sits below zero. The player has not become unluckier. The loss grew a hundredfold from 100 to 10,000 bets while the swing grew only tenfold.

Try it: roulette payout calculator

The calculator opens on this post's example, a $10 bet on red on a single-zero wheel over 100 spins; change the bet type, stake or number of spins to see how the expected result and its spread move.

For the expected result over a session.

A $10.00 red or black bet that wins pays $10.00 profit
Returned on a win (stake back)$20.00
Chance of winning a spin18/37 = 48.65%
House edge2.70%
Expected result per spin−$0.27
Expected result over 100 spins−$27.03 ± $99.96 (1 SD)
P(ahead after 100 spins)35.53%
0102030405060708090100-200-1000100 −$27.03 Spins Net result ($)

┄ Expected ± 2 SD (about 95% of sessions)   ━ Expected result

Every bet on the European wheel
BetPaysCoversP(win)House edge
Straight up (1 number)35 to 11/372.70%2.70%
Split (2 numbers)17 to 12/375.41%2.70%
Street (3 numbers)11 to 13/378.11%2.70%
Corner (4 numbers)8 to 14/3710.81%2.70%
First four: 0, 1, 2, 38 to 14/3710.81%2.70%
Six line (6 numbers)5 to 16/3716.22%2.70%
Dozen (1–12, 13–24, 25–36)2 to 112/3732.43%2.70%
Column (12 numbers)2 to 112/3732.43%2.70%
Red or black1 to 118/3748.65%2.70%
Odd or even1 to 118/3748.65%2.70%
Low (1–18) or high (19–36)1 to 118/3748.65%2.70%
Show the working, step by step
  1. The ball lands in one of 37 equally likely pockets, and this bet covers 18 of them.

    P(win) = 18 ÷ 37 = 0.48649

  2. A win pays 1 to 1: a profit of 1 × stake, and the stake comes back too.

    profit = 1 × $10.00 = $10.00, returned = $20.00

  3. Expected value per spin: the chance of winning times the profit, minus the chance of losing times the stake.

    EV = 0.48649 × $10.00 − 0.51351 × $10.00 = −$0.27

  4. The house edge is the expected loss as a share of the stake.

    edge = $0.27 ÷ $10.00 = 2.70%

  5. Over 100 independent spins the expected results add, and the standard deviation grows with the square root of the number of spins.

    100 × −$0.27 = −$27.03, SD = $10.00 × √100 = $99.96

On a single-zero wheel every bet has the same edge, 1/37 = 2.70%, because the payouts are set as if there were 36 pockets.

Open the full roulette payout calculator for the payout and house edge of every bet type on both wheels.

Where the edge overtakes the swing

The expected loss equals one standard deviation when n × 0.27 = √n × 9.996. Solving gives √n = 36.99, so n = 1,368 bets. Before that point, a single standard deviation of luck is bigger than the edge; after it, the edge dominates. Nothing about the number is special to $10 stakes, since both sides scale with the bet size. It depends only on the ratio of the per-bet SD to the per-bet edge, squared.

That ratio is also why long-run results are so predictable for the casino. It sees millions of spins, so for it the √n swing is a tiny fraction of the n-sized edge. A player sees a few hundred, where luck is the larger of the two. Both are looking at the same bet.

Same edge, different swings

A single-number bet on the same wheel pays 35 to 1. It wins with probability 1/37, and its expected value is also −$0.27 per $10: 350 × 1/37 − 10 × 36/37 = −10/37. The edge is identical. The spread is not:

$10 betEV per betSD per betSD over 100 bets
Red (1 to 1)−$0.27$10.00$99.96
Single number (35 to 1)−$0.27$58.38$583.78

The single-number bet has nearly six times the standard deviation. Over 100 spins both bets expect to lose $27, but the single-number player's results are spread across a range six times wider. Choosing a "safer" bet does not change what you expect to lose; it changes how bumpy the path is. For the high-variance bet the crossover point is (58.38 ÷ 0.27)², about 46,700 bets, so short-term results say even less about the edge.

Poker: when the edge is yours

Poker is different from roulette in one respect: the edge can belong to a skilled player rather than the house. The arithmetic is the same, so it cuts the other way. A player with a genuine small edge per hand still faces a standard deviation many times that edge, and can lose for thousands of hands without doing anything wrong. That is where the idea of a bankroll comes from. If the SD per hand is large relative to the edge, the player needs enough money that a run of two or three standard deviations below expectation does not end the game before the edge has time to show.

The same numbers carry a warning. Estimating your own edge from results takes as many hands as detecting it does, and short samples are dominated by the √n term. A few good sessions are much more likely to be luck than proof of skill. For the house games in this post, no amount of play changes the sign of the expected value, and more play only makes the loss more certain.

If you do play for entertainment, the numbers above suggest a practical way to think about cost. The expected loss per hour is the edge times the amount wagered in that hour, and that is the real price of the evening. The standard deviation only tells you how far a particular night may land from that price, in either direction. Setting a fixed budget in advance, and treating it as spent, is the one approach the arithmetic supports.

Common questions

What does "variance" mean when poker players use it?

Players use it loosely for short-run swings: results that differ from what their decisions deserved. Statistically it is the square of the standard deviation of results. The useful figure is the SD per hand or per session, because it is in money and scales with √n over repeated play.

Does the house edge matter if I only play a little?

It matters on every bet, but over a short session the swings are far larger than the edge, so it is hard to see. For a $10 even-money roulette bet the expected loss over 100 spins is $27 while the SD is about $100. The edge is still there; it is just hidden in the noise until the number of bets grows.

Can a betting system beat the house edge?

No. Systems that change stake sizes, such as doubling after a loss, change the shape of the outcome distribution: many small wins and rare large losses. They do not change the expected value of each bet, so the expected total is still negative.