The expected value is a long-run average: Imagine running an experiment thousands of times and writing down the result each time. The expected value E(X) is the average you'd settle on.
You don't need to run anything — just weight each possible value by how likely it is and add them up: E(X) = Σ x·P(X = x). Likely values pull the average towards them; rare values barely count.
E(X) need not be a value X can actually take — the expected number of heads in one coin flip is 0.5, even though you only ever see 0 or 1.
Variance measures the spread: Two variables can share the same mean but behave very differently — one tightly bunched, one wildly spread. Variance Var(X) measures that spread.
The quick formula is Var(X) = E(X²) − [E(X)]²: find the mean of the squares, then subtract the square of the mean. The standard deviation is √Var(X), back in the original units.
It can never be negative — if your answer is, you've made a slip.
IB-style question — mean and variance from a table
A phone-repair shop records X = the number of cracked screens in a randomly chosen batch of 3 phones, with the distribution below.
x: 0, 1, 2, 3 with P(X = x): 0.5, 0.3, 0.15, 0.05.
Find E(X) and Var(X).
Step by step
- First check the probabilities add to 1 (a valid distribution).
- E(X): each value times its probability, summed.
- E(X²): square each value, then weight by probability.
- Variance = mean of squares − square of the mean.
Final answer
E(X) = 0.75 cracked screens per batch; Var(X) = 0.7875 (SD ≈ 0.887). On average about three-quarters of a screen per batch of three is cracked.
Let your GDC do the arithmetic: Type the x-values into one statistics list (L1) and the probabilities into another (L2), then run 1-Var Stats with L1 as the data and L2 as the frequencies. The GDC returns x̄ = E(X) and σ = the standard deviation directly — square σ to get the variance.
Rescale and shift — the mean follows, the spread only scales: Real questions rarely ask for the raw variable. They convert it: a repair cost is £5 per cracked screen plus a £20 call-out, a temperature flips from °C to °F. That's a linear transformation Y = aX + b.
The mean does exactly what each value does: E(aX + b) = aE(X) + b.
But the spread doesn't care where the data sits, only how stretched it is. Adding b just slides every value along — the gaps between them are unchanged — so b drops out of the variance. Multiplying by a stretches the gaps by a, and variance is built from squared gaps, so it scales by a²: Var(aX + b) = a²Var(X).
What happens to the standard deviation: Take the square root of Var(aX + b) = a²Var(X):
SD(aX + b) = |a| · SD(X).
The standard deviation is multiplied by |a| (absolute value, since SD can't be negative) and — like the variance — is completely unaffected by the shift b. Doubling every value doubles the SD; adding 10 to every value leaves it alone.
IB-style question — repair cost
Using X from §1 (E(X) = 0.75, Var(X) = 0.7875 cracked screens), the repair cost in pounds is C = 5X + 20 (£5 per cracked screen plus a £20 call-out fee).
Find the mean and standard deviation of the cost C.
Step by step
- Mean: apply E(aX + b) = aE(X) + b with a = 5, b = 20.
- Variance: the +20 drops out; only the ×5 counts, squared.
- Standard deviation: square-root the variance (or use SD = |5|·SD(X)).
Final answer
The expected repair cost is £23.75 with a standard deviation of about £4.44. The £20 fee lifts the average but adds nothing to the variability.
IB-style question — Celsius to Fahrenheit
Daily temperatures at a site have mean 18 °C and standard deviation 4 °C. The thermometer is recalibrated to Fahrenheit using F = 1.8C + 32.
Find the mean and standard deviation of the Fahrenheit readings.
Step by step
- Mean: a = 1.8, b = 32, so the shift +32 stays.
- SD: multiply by |a| = 1.8; the +32 has no effect on spread.
Final answer
Mean 64.4 °F, standard deviation 7.2 °F. The +32 shifted the average but the spread only stretched by the scale factor 1.8.