Salam Academy
LearnYMA01WST01 · Statistics 1Discrete random variablesExpectation, variance and the discrete uniform distribution
Discrete random variables · Subtopic 2 of 2

Expectation, Variance and the Discrete Uniform Distribution

E(X)=∑xP(X=x)E(X)=\sum xP(X=x) is the long-run average. Var(X)=E(X2)−[E(X)]2\text{Var}(X)=E(X^2)-[E(X)]^2 measures spread. For linear changes, E(aX+b)=aE(X)+bE(aX+b)=aE(X)+b but Var(aX+b)=a2Var(X)\text{Var}(aX+b)=a^2\text{Var}(X): adding a constant shifts values without spreading them.

Edexcel YMA01 WST01AQA 7367 Paper 3≈ 35 minRevision 6 · updated 2026-10-27
Section 1 of 14

Learning objectives

  • Calculate E(X)E(X), E(X2)E(X^2) and Var(X)\text{Var}(X).
  • Use E(aX+b)E(aX+b) and Var(aX+b)\text{Var}(aX+b).
  • Find unknown probabilities from a given mean.
  • Use the discrete uniform distribution and its mean and variance.
Pause and think

Everyone in a class gets 55 bonus marks. What happens to the average mark, and to how spread out the marks are?

Section 2 of 14

Core idea

Start hereThe long-run average

Roll a die thousands of times and average the scores: you'll get very close to 3.5, a number the die can never show. That long-run average is the expectation.

The big idea

E(X)=∑xP(X=x)E(X)=\sum xP(X=x); Var⁡(X)=E(X2)−[E(X)]2\operatorname{Var}(X)=E(X^2)-[E(X)]^2; E(aX+b)=aE(X)+bE(aX+b)=aE(X)+b; Var⁡(aX+b)=a2Var⁡(X)\operatorname{Var}(aX+b)=a^2\operatorname{Var}(X).

1. Calculating

E(X)=∑xpVar⁡(X)=∑x2p−(∑xp)2E(X)=\sum xp\qquad\operatorname{Var}(X)=\sum x^2p-\left(\sum xp\right)^2
where
pp
P(X=x)P(X=x).
Worked examplex=1,2,3,4x=1,2,3,4 with p=0.1,0.3,0.4,0.2p=0.1,0.3,0.4,0.2

E(X)E(X), Var⁡(X)\operatorname{Var}(X), and for Y=3X−2Y=3X-2.

Goal
Four values.
Strategy
Table, then rules.
  1. E(X)=0.1+0.6+1.2+0.8=2.7E(X)=0.1+0.6+1.2+0.8=2.7
    ∑xp\sum xp.
  2. E(X2)=0.1+1.2+3.6+3.2=8.1E(X^2)=0.1+1.2+3.6+3.2=8.1
    ∑x2p\sum x^2p.
  3. Var⁡(X)=8.1−2.72=0.81\operatorname{Var}(X)=8.1-2.7^2=0.81
    Formula.
  4. E(Y)=3(2.7)−2=6.1, Var⁡(Y)=9(0.81)=7.29E(Y)=3(2.7)-2=6.1,\ \operatorname{Var}(Y)=9(0.81)=7.29
    Linear rules.
Answer2.72.7, 0.810.81; 6.16.1, 7.297.29.
✓ CheckE(X)E(X) lies between 1 and 4, nearer 3 where probability is largest ✓.
Common misconceptionE(X2)≠[E(X)]2E(X^2)\neq[E(X)]^2 8.18.1 vs 7.297.29: the difference is the variance.

2. Discrete uniform

Discrete uniform: a fair die
1234560.050.10.150.20.25scoreP(X = x)E(X) = 3.5
All bars equal. For 11 to nn: E(X)=n+12E(X)=\dfrac{n+1}{2} and Var(X)=n2−112\text{Var}(X)=\dfrac{n^2-1}{12}. For a die, 3512=2.92\dfrac{35}{12}=2.92.
Mean and variance for 1,…,n1,\ldots,n
  1. E(X)=1n⋅n(n+1)2=n+12E(X)=\frac1n\cdot\frac{n(n+1)}2=\frac{n+1}2
    Sum of 11 to nn.
  2. E(X2)=1n⋅n(n+1)(2n+1)6=(n+1)(2n+1)6E(X^2)=\frac1n\cdot\frac{n(n+1)(2n+1)}6=\frac{(n+1)(2n+1)}6
    Sum of squares.
  3. Var⁡=(n+1)(2n+1)6−(n+1)24=(n+1)[2(2n+1)−3(n+1)]12\operatorname{Var}=\frac{(n+1)(2n+1)}6-\frac{(n+1)^2}4=\frac{(n+1)[2(2n+1)-3(n+1)]}{12}
    Common factor (n+1)(n+1), denominator 12.
  4. =(n+1)(n−1)12=n2−112=\frac{(n+1)(n-1)}{12}=\frac{n^2-1}{12}
    4n+2−3n−3=n−14n+2-3n-3=n-1.
Worked exampleA fair die

E(X)E(X), Var⁡(X)\operatorname{Var}(X), E(2X+1)E(2X+1).

Goal
Values.
Strategy
n=6n=6.
  1. E=72=3.5, Var⁡=3512E=\tfrac72=3.5,\ \operatorname{Var}=\tfrac{35}{12}
    Formulas.
  2. E(2X+1)=8E(2X+1)=8
    Linear rule.
Answer3.53.5, 3512\frac{35}{12}, 88.
✓ CheckDirect: 1+4+⋯+366=916\frac{1+4+\cdots+36}6=\frac{91}6; 916−12.25=2.917=3512\frac{91}6-12.25=2.917=\frac{35}{12} ✓.

Summary

  • Mean and variance from the table.
  • Linear rules.
  • Uniform formulas.
Key words
Expectation
Long-run mean.
Discrete uniform
All values equally likely.
HistoryHuygens' expectation. Christiaan Huygens wrote the first printed book on probability in 1657 and introduced the idea of the "value of a chance", what we call the expected value: the fair price to pay to play a game of chance.
Fun factExpectation you can never get. The expected score on a fair dice is 3.53.5, a value you can never actually roll. Expectation is a long-run average, not a likely single result.
Keep reading for free

Create a free account to read the rest of this lesson: key formulae, worked examples, explore the graph, common mistakes, exam tip, guided practice and more. Your answers are checked and your progress is saved.