Two numbers tame a whole distribution: where it lands on average, and how far it swings.
A distribution table tells you everything about a random variable X — every value it can take and the probability of each. But "everything" is often too much. If a friend asks whether a game is worth playing, you don't recite a table; you answer with a number or two. Where does X land on average? That is the expectation E(X), the probability-weighted mean — the balance point of the whole distribution. And how wildly does X swing around that average? That is the variance D(X) and its square root σ. Two distributions can share the same center yet feel utterly different to bet on; today we build both numbers honestly, from the distribution itself, and use them to weigh risk.
Imagine playing a game over and over. Each round you win some amount, and the amounts vary at random. What's your average winning per round, in the long run? If a value xi comes up a fraction pi of the time, then over many rounds it contributes xi to the total exactly pi of the time. Add up every value, weighted by how often it happens, and you get the long-run average. That weighted sum has a name.
For a discrete random variable X with values x1, x2, …, xn and probabilities p1, p2, …, pn,
E(X) = x1p1 + x2p2 + ⋯ + xnpn = Σ xipi.
This is the probability-weighted mean: each value pulls on the average with a force equal to its probability. Picture the distribution drawn as bars sitting on a seesaw — E(X) is the single point where it balances.
Take a fair die, X = the number rolled. Each face has probability 1/6, so
E(X) = 1·⅙ + 2·⅙ + 3·⅙ + 4·⅙ + 5·⅙ + 6·⅙ = 21/6 = 3.5.
Notice: 3.5 is never a face of the die. The expectation is the balance point, not a prediction of any single roll — the average of many rolls drifts toward 3.5, but no roll ever lands there. Conclusion: E(X) summarizes the whole distribution as one balance point, found by weighting every value by its probability.
A four-value distribution on 1, 2, 3, 4. Slide probability from the small values toward the large ones and watch the green fulcrum E(X) follow the weight.
Suppose X is your winnings, and the casino changes the rules: every payout is doubled, then a flat $1 fee is subtracted. Your new winnings are Y = 2X − 1. Do you have to rebuild the whole distribution to find the new average? No — expectation rides straight through linear changes.
E(aX + b) = a·E(X) + b.
In words: scaling X by a scales the average by a; shifting X by b shifts the average by b. Every value xi becomes a·xi + b but keeps its same probability pi, so Σ(a·xi + b)pi = a·Σxipi + b·Σpi = a·E(X) + b·1.
A fair die has E(X) = 3.5. Let Y = 2X − 1 (double the face, subtract one). Then
E(Y) = 2·E(X) − 1 = 2·3.5 − 1 = 6 − 1 = 6.
Check the slow way: Y takes the values 1, 3, 5, 7, 9, 11, each with probability ⅙; their average is (1+3+5+7+9+11)/6 = 36/6 = 6. The shortcut agrees.
Conclusion: once you know E(X), any linear rescaling aX + b of the prize needs no new table — just transform the average directly.
Start from a fair die, E(X) = 3.5. Dial the scale a and shift b; the readout shows E(aX + b) = a·E(X) + b — and verifies it against the transformed distribution computed term by term.
Here is where expectation earns its keep. A carnival booth offers a game: pay a ticket price to play, then draw a prize at random. Should you play? The expectation answers it. Compute E(X) = the average prize, and compare it to what you paid. If E(X) equals the price, the game is fair — break-even in the long run. If E(X) is less, the house wins on average; if more, the game favors you (and won't last long!).
A wheel pays $10 with probability 0.1, $2 with probability 0.3, and $0 with probability 0.6. The average payout is
E(X) = 10·0.1 + 2·0.3 + 0·0.6 = 1 + 0.6 + 0 = $1.60.
If a ticket costs $2, your net expectation per play is 1.60 − 2 = −$0.40: you lose 40 cents per play on average. Not fair. A fair ticket would cost exactly $1.60.
Conclusion: a game is fair when the expected prize equals the ticket price; expectation turns "should I play?" into one subtraction.
The payoff table is fixed (prizes $10 / $2 / $0 with probabilities 0.1 / 0.3 / 0.6, so E(X) = $1.60). Slide the ticket price and watch the net expectation E(X) − price flip from favorable (green) through fair to a loss (red).
Two games can share the same expectation and still feel nothing alike. Game A always pays exactly $3. Game B pays $0 or $6, each with probability ½. Both average $3 — but A is a sure thing while B is a coin-flip gamble. Expectation alone can't tell them apart. We need a number for the swing.
Measure each value's distance from the average, (xi − E). We can't just average those gaps — the positive and negative ones cancel to zero (that's exactly what "balance point" means). So we square each gap first (squares are never negative), then take the probability-weighted average of the squares.
D(X) = Σ pi(xi − E)², and σ = √D(X).
The variance D(X) is the average squared distance from the mean. Because it squares, its units are awkward (dollars²). Taking the square root gives the standard deviation σ, which lives in the same units as X (dollars) — a clean "typical distance from the average."
Game A (always $3): the only value is 3 with probability 1, gap 0, so D(X) = 1·(3−3)² = 0, σ = 0. No swing at all.
Game B ($0 or $6, each ½): E = 3, gaps are −3 and +3, so
D(X) = ½·(0−3)² + ½·(6−3)² = ½·9 + ½·9 = 9, σ = √9 = 3.
Same expectation $3, wildly different spread: σA = 0 vs σB = 3.
Conclusion: variance weights the squared gaps by probability; its root σ is the typical swing of X, in X's own units.
E(X) need not be a value X can take. A die's E(X) = 3.5, but the die never shows 3.5. Expectation is a balance point, not a prediction.
Variance uses squared, weighted deviations. Don't average the raw gaps (they cancel to 0), and don't forget the probabilities pi. It is Σ pi(xi − E)², not Σ(xi − E) and not Σ(xi − E)².
Variance has the same friendly behavior under shifts and scales as expectation — with one twist. A pure shift b slides every value over together, so the swing doesn't change: D(X + b) = D(X). But scaling by a stretches every gap by a, and since variance squares the gaps, it grows by a².
D(aX + b) = a²·D(X), so σ(aX + b) = |a|·σ(X).
Adding a constant b shifts the center but never the spread; multiplying by a stretches the spread by |a| (the standard deviation) or a² (the variance).
Now the payoff for risk. Suppose two investment plans have the same expected return E(X). Which would you choose? The one that swings less — the one with the smaller variance — because it delivers that same average return more reliably, with fewer nasty surprises. Equal expectation, smaller σ: the safer bet.
Plan A returns 2%, 4%, 6% with probabilities 0.25, 0.5, 0.25. Plan B returns 0%, 4%, 8% with the same probabilities 0.25, 0.5, 0.25.
Both have E = 2·0.25 + 4·0.5 + 6·0.25 = 4% (and B: 0·0.25 + 4·0.5 + 8·0.25 = 4%). But
DA = 0.25·(2−4)² + 0.5·0 + 0.25·(6−4)² = 1 + 0 + 1 = 2 (σA ≈ 1.41%),
DB = 0.25·(0−4)² + 0.5·0 + 0.25·(8−4)² = 4 + 0 + 4 = 8 (σB ≈ 2.83%).
Same 4% average, but B swings twice as much. For a steady investor, Plan A is the safer bet.
Conclusion: when expectations tie, the smaller variance wins — variance is the mathematical name for risk.
Two plans, both with E(X) = 4, drawn side by side. Spread plan B's mass out from the center and watch its amber ±σ band widen while its mean stays pinned. Smaller band = steadier.
| Idea | Formula | What it tells you |
|---|---|---|
| Expectation E(X) | Σ xipi | the long-run average — the balance point of the distribution |
| Linearity | E(aX + b) = a·E(X) + b | shift & scale ride straight through |
| Variance D(X) | Σ pi(xi − E)² | the average squared swing around E(X) |
| Std. deviation σ | √D(X) | typical swing, in X's own units |
| Variance scaling | D(aX + b) = a²·D(X) | shift leaves spread alone; scale by a multiplies D by a² |
| Risk rule | equal E, smaller D | the steadier (safer) choice |
Six questions to lock it in. Tap the answer you think is right.
This lesson introduces the two summary measures of a discrete random variable: the expected value E(X) = Σxipi as a probability-weighted mean and balance point, and the variance D(X) = Σpi(xi − E)² with its root σ as a measure of spread. It addresses CCSS HSS-MD.A.2 and HSS-MD.A.3 (calculate the expected value of a random variable and interpret it as the mean) and HSS-MD.B.5 / B.6 / B.7 (weigh outcomes and use expected values to evaluate fairness and make decisions). The recurring pitfalls to watch are believing E(X) must be an attainable value (a die's E = 3.5) and computing variance without squaring the deviations or without weighting them by the probabilities. Next lesson meets the named distributions — Bernoulli, binomial, hypergeometric — and the continuous normal curve.