📊 Data

🎰Expected Value

A weighted average with probabilities as weights — lotteries, dice and why casinos win in the long run.

A fair stall rolls a die: roll a 6 and win 6 yuan, anything else wins nothing. One play "might" earn you 6 yuan — but what if you play all afternoon? How much is each turn worth on average? This question has an exact answer, called the expected value.

Probabilities as weights

For one fair die, the expected value of the roll is (1+2+3+4+5+6)÷6=3.5(1+2+3+4+5+6) \div 6 = 3.5. The standard recipe multiplies each outcome by its probability and adds everything up:

1×16+2×16++6×16=216=3.51 \times \frac{1}{6} + 2 \times \frac{1}{6} + \cdots + 6 \times \frac{1}{6} = \frac{21}{6} = 3.5

Probable outcomes carry more say — the same idea as the weighted averages of mean, median and mode, with probabilities wearing the weights. Notice: no die face shows 3.5. It is not the result of any single roll but the value the long-run average settles toward.

InteractiveCoin Flip Lab
🪙

Heads rate

50%

The more you flip, the closer the heads rate gets to 50% — that's the law of large numbers.

Use it on the simplest wager of all: heads wins 1 yuan, tails loses 1 yuan. The expectation is 1×12+(1)×12=01 \times \frac{1}{2} + (-1) \times \frac{1}{2} = 0 — an even break, a "fair game". Flip 10 times and the heads ratio may swing wildly; flip 1000 times and it hugs 50%. Expectation is not a promise for one round — it is the long-run average that the law of large numbers delivers.

Work out a lottery's expectation

Is the raffle worth it

A raffle sells 100 tickets: 1 wins 100 yuan, 4 win 25 yuan each, and the other 95 win nothing. A ticket costs 3 yuan. The expected prize per ticket is

100×1100+25×4100+0×95100=1+1+0=2100 \times \frac{1}{100} + 25 \times \frac{4}{100} + 0 \times \frac{95}{100} = 1 + 1 + 0 = 2

Pay 3, get back 2 on average — the expected prize is 2 yuan, so the net expectation is 23=12 - 3 = -1 yuan: every ticket costs you 1 yuan on average.

Expectation is not a single result

Buy one ticket and you will never hold "2 yuan": you get 100, or 25, or 0. Expectation is a weighted average level, not a guarantee for one draw — a single outcome can land miles away from it. But as the count grows, the average clings ever closer to the expectation: in the coin experiment, after 1000 flips the heads ratio has stopped wandering away from 50%. One bet rides on luck; ten thousand bets ride on expectation.

Why the house always wins

In a casino, every game's expectation is negative for the player. Take roulette: the European wheel has 37 pockets — 18 red, 18 black, 1 zero. Bet 1 yuan on red: winning probability 1837\frac{18}{37}, losing probability 1937\frac{19}{37}, so the expectation is

1×1837+(1)×1937=1370.0271 \times \frac{18}{37} + (-1) \times \frac{19}{37} = -\frac{1}{37} \approx -0.027

Losing under 3 cents per yuan wagered looks harmless? Millions of players place billions of bets, and about 2.7 cents leave every yuan — the house sleeps soundly. The raffle's −1 yuan and the wheel's −0.027 yuan share one moral: when the expectation is negative, the longer you play, the more punctually you lose. To keep exploring probability, visit probability; combined events wait in compound probability.

Check yourself

Quick quiz

  1. 1. One roll of a fair die: what is the expected value of the number shown?

  2. 2. 10 straws hide one 9-yuan prize, the rest are blanks. You draw one for free — what is the expected prize?

  3. 3. A game has an expectation of −0.5 yuan per play. After about 1000 plays you will have...