Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Methods (Unit 3 & 4) Refresher on probability and discrete random variables

Expected value, variance and standard deviation

20 practice questions 0 video lessons Theory + worked examples

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\).

Key idea. Build a table of \(x\), \(P(X=x)\), \(xP(X=x)\) and \(x^2P(X=x)\); the column sums give \(\mu=E(X)\) and \(E(X^2)\); then \(\operatorname{Var}(X)=E(X^2)-\mu^2\) and \(\sigma=\sqrt{\operatorname{Var}(X)}\).
Probability distribution with the mean markedA bar graph of the probabilities for x equals 0, 1, 2 and 3 with heights 0.2, 0.3, 0.2 and 0.3. A dashed vertical line at x equals 1.6 marks the mean, the balance point of the distribution. μ 0 1 2 3 P x
\(E(X)=\mu\) is the balance point of the probability distribution
Standard deviation as a spread about the meanA number line with the mean mu marked in the centre and arrows reaching one standard deviation sigma to the left and right, showing that sigma measures how far the values typically sit from the mean. μ σ σ μ−σ μ+σ
\(\sigma=\sqrt{\operatorname{Var}(X)}\) measures the typical distance from \(\mu\)

Expected value (mean) — a measure of centre:

\[E(X)=\mu=\sum x\,P(X=x)\]
E(X)=μ=xP(X=x)

Variance — a measure of spread (two equal forms):

\[\operatorname{Var}(X)=\sum (x-\mu)^2\,P(X=x)=E(X^2)-\mu^2\]
Var(X)=E(X2)-μ2

Standard deviation — spread in the original units:

\[\sigma=\sqrt{\operatorname{Var}(X)}\]
σ=Var(X)
Where \(E(X^2)\) comes from. \(E(X^2)=\sum x^2\,P(X=x)\) — square each value, weight by its probability, and add. It is not \(\big(E(X)\big)^2\).

How to find \(E(X)\), \(\operatorname{Var}(X)\) and \(\sigma\)

  1. Check the probabilities. Confirm they are non-negative and sum to \(1\); solve for any missing probability first.
  2. Find the mean. Add a row \(x\,P(X=x)\); its total is \(\mu=E(X)\).
  3. Find \(E(X^2)\). Add a row \(x^2\,P(X=x)\); its total is \(E(X^2)\).
  4. Variance and standard deviation. \(\operatorname{Var}(X)=E(X^2)-\mu^2\), then \(\sigma=\sqrt{\operatorname{Var}(X)}\).
Reverse problems. If you are told \(E(X)\) or \(\operatorname{Var}(X)\) and asked for unknown probabilities, form two equations — one from \(\sum P=1\) and one from the given mean or variance — and solve simultaneously.
Example 1 — Expected value
Find \(E(X)\) for the distribution below.
\(x\)0123
\(P(X=x)\)0.20.30.20.3
Solution

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\)
E(X)=1.6
Example 2 — Variance
Using the same distribution, find \(\operatorname{Var}(X)\).
Solution

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\)
Var(X)=1.24
Example 3 — Standard deviation
For the same variable, find the standard deviation \(\sigma\) to \(2\) decimal places.
Solution

Take the square root of the variance.

\(\sigma\)\(=\)\(\sqrt{\operatorname{Var}(X)}=\sqrt{1.24}\)
\(\)\(\approx\)\(1.11\)
σ1.11
Example 4 — A missing probability
Given \(P(X=1)\) is missing, find \(E(X)\).
\(x\)0123
\(P(X=x)\)0.15\(k\)0.150.45
Solution

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\)
E(X)=1.9

Common pitfalls

\(E(X^2)\) is not \(\big(E(X)\big)^2\). Square each value before weighting: \(E(X^2)=\sum x^2 P(X=x)\). Squaring the mean instead makes the variance come out \(0\).
Do not forget to subtract \(\mu^2\). The value \(E(X^2)\) on its own is not the variance; \(\operatorname{Var}(X)=E(X^2)-\mu^2\).
Standard deviation, not variance, matches the units. Variance is in squared units; take the square root for a spread comparable to the values of \(X\).
Solve for a missing probability first. If a cell is blank, use \(\sum P(X=x)=1\) before computing any mean or variance.

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\).

Create a free accountTrack your progress and save your work as you go.
Create free account