Expected value and variance of a random variable
The expected value is the long-run average of a random variable; the variance measures the spread around it.
Formulas
- E(X) = Σ xᵢ · P(X = xᵢ)
- Var(X) = Σ (xᵢ − E(X))² · P(X = xᵢ)
- Shortcut: Var(X) = E(X²) − E(X)²
Your turn
Three problems on this topic. Comma or point, fractions like 1/6 work too.
Task 1 of 3Expected value
Task
The random variable X has this distribution. Work out the expected value and the variance.
| x | P(X = x) |
|---|---|
| 0 | 0.40 |
| 2 | 0.10 |
| 3 | 0.20 |
| 4 | 0.30 |
E(X) (2 decimal places)
Var(X) (2 decimal places)
Comma or point; fractions like 1/6 work too.
Worked example
The random variable X has this distribution. Work out the expected value and the variance.
Worked solution
- 1.E(X) = Σ xᵢ · pᵢ = 2 · 0.40 + 3 · 0.10 + 4 · 0.40 + 5 · 0.10 = 3.20
- 2.Var(X) = Σ (xᵢ − E(X))² · pᵢ = 1.16
- 3.Or: Var(X) = E(X²) − E(X)² = 11.4000 − 3.2000² = 1.16
Typical mistake: Confusing E(X²) with E(X)².
Frequently asked questions
Must the probabilities add up to 1?
Yes, for a complete distribution. It is a good check before you calculate.
