Expected Value
E(X) for a discrete distribution, with the variance and standard deviation that go with it.
Variance 28.1475 · standard deviation 5.3054
Expected value is the long-run average of a random outcome: multiply each value by its probability and add them up. A game that loses £1 nine times in ten, pays £5 once in eleven and £50 once in a hundred has E(X) = +£0.05 — a slight edge to the player.
An average you may never actually see
Expected value is a weighted mean, not a prediction of any single trial. The game above never pays out five pence; it pays −£1, £5 or £50. The 0.05 is what the average settles towards over many plays, and that is the only sense in which it is expected. A fair die has an expected value of 3.5, a face it does not have.
The law of large numbers is what makes it meaningful: as the number of trials grows, the observed average converges on E(X). Over ten plays the result is noise; over ten thousand it is close to the expectation. That gap is what casinos and insurers run on — each individual outcome is uncertain, the aggregate is not.
Why the variance matters just as much
Two games with the same expected value can feel completely different. One paying ±£1 on a coin flip and one paying ±£1,000 both have E(X) = 0, but only one of them can ruin you. Variance measures that spread — the average squared distance from the mean — and its square root, the standard deviation, puts it back in the original units. Quoting an expected value without it hides the risk entirely.
the probabilities must sum to exactly 1, or the distribution is not a distribution
- 1 List every outcome with its probability. Lose £1 with probability 0.90, win £5 with 0.09, win £50 with 0.01.
- 2 Check the probabilities sum to 1. 0.90 + 0.09 + 0.01 = 1.00. If they do not, something is missing or double-counted.
- 3 Multiply each value by its probability. −1 × 0.90 = −0.90, 5 × 0.09 = 0.45, 50 × 0.01 = 0.50.
- 4 Add the products. −0.90 + 0.45 + 0.50 = 0.05, so E(X) = £0.05 per play.
- 5 Work out the spread as well. The variance comes to 28.15 and the standard deviation to 5.31 — far larger than the mean, so single plays swing wildly.
Expected values worth knowing
Each is a weighted mean over the possible outcomes.
| Situation | Expected value | Why |
|---|---|---|
| One fair die | 3.5 | (1+2+3+4+5+6) ÷ 6 |
| Two fair dice summed | 7 | Twice the single-die expectation |
| A fair coin scored 1 for heads | 0.5 | Half the trials score 1 |
| A fair bet | 0 | Gains and losses balance exactly |
| A casino game | Negative for the player | The house edge is the expected loss per stake |
| An insurance premium | Positive for the insurer | Premium exceeds the expected payout |
Where expected value stops being the right guide
A positive expected value does not make a decision correct. The St Petersburg game has an infinite expectation yet nobody would pay much to play it, because almost every outcome is small and the huge ones are vanishingly rare. More practically, a bet with a positive edge is still a bad idea if losing the stake would be catastrophic — which is why risk is judged on the distribution rather than its mean alone.
Two technical notes. Expectation is linear: E(aX + b) = aE(X) + b, and E(X + Y) = E(X) + E(Y) whether or not X and Y are independent, which makes many problems far easier than they look. And the tool here handles discrete outcomes; a continuous variable replaces the sum with an integral, ∫x·f(x)dx, though the idea is identical.