Expectation of a discrete random variable
Multiply each possible value by its probability and add the products.
For a finite distribution, E(X) = ΣxP(X = x). Check that all probabilities are nonnegative and sum to one before calculating. The expected value need not be a possible outcome: it is a probability-weighted average.
For a function g, E(g(X)) = Σg(x)P(X = x). In general E(X²) is not [E(X)]²; their difference is the variance. Keep units meaningful, particularly when a variable represents money or a measured quantity.
Worked example
X is 0, 1 or 2 with probabilities 0.2, 0.5 and 0.3. Find E(X).
- The probabilities sum to 1.
- Calculate 0 × 0.2 + 1 × 0.5 + 2 × 0.3.
Answer: 1.1
A mean can lie between possible outcomes
For a discrete random variable, multiply each outcome by its probability and add. Check that probabilities sum to one before calculating. Variance is E(X²)−[E(X)]², so square outcomes for the first expectation, not probabilities. An expected value describes a long-run average, rather than a guaranteed or most likely outcome.
A mean that never occurs
Let X take 0,1,2 with probabilities 1/4,1/2,1/4. Then E(X)=1, E(X²)=3/2 and Var(X)=1/2. For a fair die, E(X)=7/2 even though 3.5 is not an available score.
A linear transformation
If Y=3X−2 for the first distribution, and . Adding a constant shifts the centre without changing spread.
A mistake worth checking
In general E(X²) is not [E(X)]². Their difference measures variation; equality holds only for a variable that is constant with probability one.
Can a variance be negative?
No. It is the expectation of the nonnegative quantity (X−E(X))². A negative calculation indicates an error or invalid probabilities.
Try this before opening the working
Let X take −1 and 2 with probabilities 2/3 and 1/3. Find its mean and variance.
Compare your reasoning
E(X)=0 and E(X²)=2, so Var(X)=2. The mean is not a possible outcome, and the larger positive value balances the more frequent negative value.
Practise expectation of a discrete random variable
Course mapping
These specification references show where the topic occurs. The questions cover only some parts of each topic.
- 9FM0 · FS1 · Discrete random variables: Expected value of a discrete variable
- 7367 · statistics · Discrete random variables: Expected value of a discrete variable
- H245 · statistics · Discrete random variables: Expected value of a discrete variable
- H645 · Y422 · Discrete random variables: Expected value of a discrete variable
- H645 · Y432 · Discrete random variables: Expected value of a discrete variable
- 9FM0 · FS2 · 3.1 Geometric distributions: A geometric waiting-time probability
- H245 · statistics · 5.02f–g Geometric distributions: A geometric waiting-time probability
- H645 · Y422 · SR16–R17 Geometric distributions: A geometric waiting-time probability
- H645 · Y432 · SR16–R17 Geometric distributions: A geometric waiting-time probability
- H635 · Y412 · SR16–R17 Geometric distributions: A geometric waiting-time probability
Next practice: Binomial probabilities.