Math paradoxes

Glossary / Expected value

Glossary · expected value

What to expect from a die that has no 3.5?

Mathematicians say you should "expect" 3.5 from a roll of a die. There is no such face, and no roll will ever show it. Yet this number runs casinos, insurers and lotteries. Let's see what it really means and when to trust it.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

The die paradox

No roll gives 3.5. But the average of all rolls creeps right there. At first it jumps around, and after a thousand rolls it nearly sticks to the line.

Last roll–
Rolls0
Average of all rolls–

The rolls axis is logarithmic: each mark is ten times further than the previous one.

  • "Expected" doesn't mean "typical"In the lottery above the expected win is 10 UAH, but almost every ticket wins nothing. Expected value is an average, not what usually happens. It is the same gap as between the mean and the median.
Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

How to compute it

Multiply each possible result by its chance and add them all up. You get the average your result will approach if you repeat the same thing very many times.

1 · ⅙ + 2 · ⅙ + 3 · ⅙ + 4 · ⅙ + 5 · ⅙ + 6 · ⅙ = 21/6 = 3.5

A lottery through the eyes of a player and of the organiser

A ticket costs 20 UAH. One ticket in 100,000 wins 1,000,000 UAH, the rest win nothing. The expected win: 1,000,000 · 1/100,000 = 10 UAH. So out of every 20 hryvnias the lottery pays back 10 on average. Buy some tickets and see how it looks from each side.

Spent–
Won–
Average per ticket–

When to trust expected value, and when not

  • Trust it when there are very many repeatsA casino, an insurer, a lottery make millions of identical bets. Their total almost exactly equals the expected value, so they earn without any luck.
  • Don't rely on it for a single betYou won't play a million times. Insurance has a negative expected value for you, otherwise insurers would go bust. It is still sensible: it protects you from the one case that could ruin you.
  • Careful when you can be knocked outEven a game that pays on average is dangerous if you stake everything: you can hit zero before the "average" has time to work.
Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

Expected values add up, even for dependent quantities

E[X + Y] = E[X] + E[Y]

This rule doesn't need independence, which is exactly why it is so strong. Take n people drawing their hats at random from a pile. Let Iᵢ = 1 if person i gets their own hat, otherwise 0. Each has a 1/n chance, so E[Iᵢ] = 1/n. The number of lucky ones is the sum I₁ + … + Iₙ, and its expected value is n · 1/n = 1. The events are dependent (if the first nine got their own hats, the tenth surely does too), but that doesn't stop the expected values from adding up.

Why it takes 6 rolls on average to get a six

E = 1 + ⅚ · E ⇒ E = 6

The first roll always happens. With chance ⅙ it is a six, and we're done. With chance ⅚ it isn't, and we're back at the start: E more rolls on average lie ahead, since the die remembers nothing. That gives the equation above. In general, an event with chance p takes 1/p tries on average.

  • On average 6 rolls until the first sixA six comes with chance 1/6, so on average you wait 6 rolls. Yet the most likely single outcome is a six on the very first roll, even though that is only 1/6.

How fast the average approaches 3.5

σ² = E[X²] − (E[X])² = 91/6 − 3.5² ≈ 2.92 · σ ≈ 1.71 · spread of the average = σ / √n

A single roll misses 3.5 by about 1.71. The average of n rolls misses by √n times less: about 0.54 after 10 rolls, 0.17 after 100, 0.05 after 1,000. To become ten times more precise you need a hundred times more rolls. This is the law of large numbers, and it is why a casino stays calm and a single player doesn't.

Where it shows up

Other terms