The house edge says what happens on average. Variance says how far actual results can stray from that average. Together, the two ideas explain something many people see as a paradox: a player can finish an evening ahead, and yet the house wins, almost predictably, in the long run.
Variance and standard deviation
The result of a bet is a random variable: it can take several values, each with its own probability. The average of those values, weighted by their probabilities, is the expected value, described in House edge and RTP. Variance measures how spread out the values are around that average:
variance = Σ probability of the result × (result − average)²
The standard deviation is the square root of the variance. Its advantage is that it is expressed in the same unit as the stake and shows, roughly, how far a result usually strays from the average.
Two bets on the same European roulette table show the difference:
- Even-money bet (red, for example): one unit is won or one unit is lost. The standard deviation per spin is 1.00 units.
- Straight up (a single number): 35 units are won, rarely, or one unit is lost, often. The standard deviation per spin is 5.84 units.
Both bets have the same house edge, 2.70%. The average loss is the same; only how much results swing around it differs. The straight-up bet produces long runs of small losses broken by large wins, while the even-money bet produces small, frequent swings. Gaming machines usually have high variance: the imaginary machine on the Slot machines page has a standard deviation of 4.83 units per spin.
How the average and the swings grow with the number of bets
When several independent bets of the same size are added together, the two quantities grow at different rates:
- the average result grows in proportion to the number of bets;
- the standard deviation of the total result grows only in proportion to the square root of the number of bets.
This is why, after a few bets, the swings are much larger than the average loss, while after a great many bets the average loss ends up larger than the swings. The table below shows this for a player who stakes one unit on an even-money bet at every spin of a European roulette wheel:
| Spins | Average result | Usually between | Chance of being ahead |
|---|---|---|---|
| 10 | −0.27 | −6.59 and +6.05 | 34.42% |
| 100 | −2.70 | −22.70 and +17.29 | 35.53% |
| 1,000 | −27.03 | −90.25 and +36.20 | 18.76% |
| 10,000 | −270.27 | −470.20 and −70.34 | 0.33% |
- "Average result" is the expected loss, in units, after that number of spins.
- "Usually between" is the range from two standard deviations below the average to two above it; the actual result falls inside it in the great majority of cases.
- "Chance of being ahead" is the exact probability that the player has won more spins than they lost. A tie does not count as "ahead", which is why the values for a small number of spins are below one half even before the zero is taken into account.
After 10 spins, the usual range covers wins and losses of several units, far larger than the average loss, and the chance of being ahead is 34.42%. After 100 spins it is still 35.53%. After 1,000 spins it falls to 18.76%, and after 10,000 spins it reaches 0.33%: the whole usual range then lies below zero.
The law of large numbers
The law of large numbers, first stated rigorously by Jakob Bernoulli in a work published after his death, in 1713, says that the average of the results of a large number of independent trials approaches the expected value as the number of trials grows. In roulette, the average result per spin approaches a loss of 2.70% of the stake.
The law is about the average, that is, about proportions, not about absolute amounts. The deviation of the total result, in units, can grow; relative to the number of bets, however, it shrinks. Nor does the law say that past results are "made up for": a run of losses is not followed by a run of wins that balances it. Old deviations are diluted by a large number of new results, not cancelled. Confusing the two is the gambler's fallacy.
Why a session can end ahead while the long run cannot
A gaming session is a short series of bets. Over a short series, variance dominates: the result depends more on luck than on the house edge, and a sizeable share of sessions end ahead, as the first rows of the table show.
The long run is nothing more than all the sessions put end to end. As bets add up, the average loss grows steadily while the swings grow much more slowly. The chance that the total result is ahead falls towards zero, never reaching exactly zero but becoming negligible. The winnings from good sessions do not change the direction; they are the swings that variance produces around a negative average.
The house is in the long-run position from the start. It takes a very large number of bets from many players, so its total result comes very close to the calculated edge. The same game is, for the player, a sequence of large swings and, for the house, an almost predictable income.
Variance also matters for the money available. At the same average loss, a high-variance bet makes both large wins and the rapid loss of the whole available sum more likely. No way of varying the stakes changes the average, as the article on Betting systems shows.
See also
- Probability basics
- Variance, house edge and RTP in the glossary