Expected value, variance and standard deviation
In Year 12 Mathematical Methods (Queensland, QCAA), a discrete random variable is summarised by two numbers: the expected value \(E(X)=\mu\), a measure of centre, and the variance \(\operatorname{Var}(X)\) with its square root the standard deviation, measures of spread — the tools of Unit 3 Topic 5, General discrete random variables.
A discrete random variable \(X\) takes a list of values, each with a probability \(P(X=x)\). The probabilities are non-negative and add to \(1\). Two summary numbers describe the distribution.
Expected value (mean). The measure of centre is the probability-weighted average \(E(X)=\mu=\sum x\,P(X=x)\). It is the long-run average of \(X\) over many repetitions and need not equal any single possible value.
Variance. The measure of spread about the mean is \(\operatorname{Var}(X)=\sum (x-\mu)^2\,P(X=x)\). The identical shortcut \(\operatorname{Var}(X)=E(X^2)-\mu^2\) is usually quicker, where \(E(X^2)=\sum x^2\,P(X=x)\).
Standard deviation. Since variance is in squared units, the standard deviation \(\sigma=\sqrt{\operatorname{Var}(X)}\) returns the spread to the same units as \(X\).
Expected value (mean) — a measure of centre:
Variance — a measure of spread (two equal forms):
Standard deviation — spread in the original units:
How to find \(E(X)\), \(\operatorname{Var}(X)\) and \(\sigma\)
- Check the probabilities. Confirm they are non-negative and sum to \(1\); solve for any missing probability first.
- Find the mean. Add a row \(x\,P(X=x)\); its total is \(\mu=E(X)\).
- Find \(E(X^2)\). Add a row \(x^2\,P(X=x)\); its total is \(E(X^2)\).
- Variance and standard deviation. \(\operatorname{Var}(X)=E(X^2)-\mu^2\), then \(\sigma=\sqrt{\operatorname{Var}(X)}\).
| \(x\) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| \(P(X=x)\) | 0.2 | 0.3 | 0.2 | 0.3 |
Sum \(x\,P(X=x)\).
| \(E(X)\) | \(=\) | \(0(0.2)+1(0.3)+2(0.2)+3(0.3)\) |
| \(\) | \(=\) | \(0+0.3+0.4+0.9=1.6\) |
First \(E(X^2)=\sum x^2 P(X=x)\), then subtract \(\mu^2\).
| \(E(X^2)\) | \(=\) | \(0+1(0.3)+4(0.2)+9(0.3)=3.8\) |
| \(\operatorname{Var}(X)\) | \(=\) | \(E(X^2)-\mu^2\) |
| \(\) | \(=\) | \(3.8-1.6^2=3.8-2.56=1.24\) |
Take the square root of the variance.
| \(\sigma\) | \(=\) | \(\sqrt{\operatorname{Var}(X)}=\sqrt{1.24}\) |
| \(\) | \(\approx\) | \(1.11\) |
| \(x\) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| \(P(X=x)\) | 0.15 | \(k\) | 0.15 | 0.45 |
Probabilities sum to \(1\), so \(k=1-0.75=0.25\).
| \(E(X)\) | \(=\) | \(0+1(0.25)+2(0.15)+3(0.45)\) |
| \(\) | \(=\) | \(0.25+0.30+1.35=1.90\) |
Common pitfalls
Frequently asked questions
What is the expected value of a discrete random variable?
It is the probability-weighted average \(E(X)=\mu=\sum x\,P(X=x)\), a measure of centre — the long-run average of \(X\) over many trials.
How do you calculate the variance?
Use \(\operatorname{Var}(X)=E(X^2)-\mu^2\), where \(E(X^2)=\sum x^2 P(X=x)\). This equals \(\sum (x-\mu)^2 P(X=x)\) but is quicker.
What is the standard deviation?
The square root of the variance, \(\sigma=\sqrt{\operatorname{Var}(X)}\), giving a spread in the same units as \(X\).
Can the expected value be impossible for a single trial?
Yes. \(E(X)\) is a weighted average, so a fair die has \(E(X)=3.5\) even though \(3.5\) never appears on a single roll.
What are the mean and variance of a uniform discrete variable?
Every value is equally likely with probability \(\tfrac{1}{n}\); the mean is the ordinary average of the values and \(\operatorname{Var}(X)=E(X^2)-\mu^2\).