M
hscscience Maths Adv · Y12
0/100daily goal
0
0
0 due
0
L1 · 0 XP
KJ
Your weak spots
Insights load after your first practice round.
MAV-12-07 · Discrete random variables ~40 min ⚡ +95 XP available

Expected Value and Variance

A distribution is a whole table of numbers. Two summary values compress it: the expected value says where the distribution sits, and the variance says how far it spreads. Both are averages, which is the idea that makes the variance formula stop looking arbitrary.

Today's hook, The expected value of one roll of a fair die is $3.5$, a number the die can never show. So what exactly is being "expected"? Get that straight and the whole topic falls into place.
0/5QUESTS
1

Orient to expectation

Commit to a prediction about what expected value means.

01
Recall, your gut answer first
+5 XP warm-up

The expected value of a single roll of a fair die is $3.5$. Without looking ahead answer two things: is "expected value" a badly chosen name, and what would you actually have to do to observe the number $3.5$?

auto-saved
2

Define expected value

Define E(X) and read it as a measure of centre.

02
The expected value, defined
core concept

We just saw a distribution as a table of values and probabilities. That raises a question: a whole table is hard to compare with another whole table, so is there a single number that says where a distribution sits? This card answers it → the expected value, a weighted average of the values with the probabilities as weights.

An ordinary average treats every number equally. An expected value weights each value by how likely it is, which is the only sensible way to average when the values do not occur equally often.

$$E(X) = \mu = \sum_{\text{all } x} x\,p(x)$$

The three notations $E(X)$, $\mu$ and $\mu_X$ all name the same number. Read it as a measure of centre for the distribution, exactly as the mean is a measure of centre for a data set.

The fair die. Each of the six values has probability $\tfrac{1}{6}$, so

$E(X) = 1 \cdot \tfrac{1}{6} + 2 \cdot \tfrac{1}{6} + \dots + 6 \cdot \tfrac{1}{6} = \dfrac{1 + 2 + 3 + 4 + 5 + 6}{6} = \dfrac{21}{6} = 3.5$

The uniform shortcut. When $X$ is uniform, every weight is the same $\tfrac{1}{n}$, so the weighted average collapses to the ordinary average of the values. That is why the die's expected value is just $\tfrac{1+2+\dots+6}{6}$.

What "expected" actually means. It is not the value you expect to see on any one trial, and it need not be a possible value at all. It is the long-run average: roll the die 10 000 times and the mean of your results will sit very close to $3.5$. Physically, it is the balance point of the bar graph.

$E(X) = \mu = \sum x\,p(x)$, the probability-weighted average of the values.; $E(X)$ is a long-run average and need NOT be a value the variable can take.

Pause, copy the definition $E(X) = \sum x\,p(x)$ together with the warning that the expected value need not be an attainable value, into your book.

Quick check: A random variable has $p(1) = 0.5$, $p(2) = 0.2$, $p(5) = 0.3$. What is $E(X)$?

3

Variance is an expected value

See why the variance is itself an expected value.

03
The variance, and why it is an average too
core concept

We just saw that $E(X)$ locates the centre of a distribution. That raises a question: two distributions can share a centre and look nothing alike, so how do we measure spread? This card answers it → take the squared distance of each value from the mean and average that, weighting by probability, which is exactly an expected value.

Start from what we want: a typical distance from the centre. The raw distances $x - \mu$ are no use on their own, because they cancel — the positive and negative departures always sum to zero. Squaring removes the cancellation:

$$\operatorname{Var}(X) = \sigma^2 = E\!\left[(X - \mu)^2\right] = \sum_{\text{all } x} (x - \mu)^2\,p(x)$$

Read the middle expression carefully. $(X - \mu)^2$ is itself a random variable: it takes the value $(x - \mu)^2$ whenever $X$ takes the value $x$. So the variance is the expected value of the squared deviation, computed by exactly the rule from card 02, applied to a different variable.

This is the point the syllabus asks you to recognise. The variance is not a new kind of object with its own arbitrary formula. It is $E(\text{something})$, and the something is the squared distance from the mean. Everything else in this lesson is arithmetic.

Worked directly from the definition. Take $p(0) = 0.1$, $p(1) = 0.3$, $p(2) = 0.4$, $p(3) = 0.2$.

First $\mu = 0(0.1) + 1(0.3) + 2(0.4) + 3(0.2) = 0 + 0.3 + 0.8 + 0.6 = 1.7$.

Then, squaring each deviation and weighting:

$\operatorname{Var}(X) = (0 - 1.7)^2(0.1) + (1 - 1.7)^2(0.3) + (2 - 1.7)^2(0.4) + (3 - 1.7)^2(0.2)$

$= 2.89(0.1) + 0.49(0.3) + 0.09(0.4) + 1.69(0.2) = 0.289 + 0.147 + 0.036 + 0.338 = 0.81$

True or false: The deviations are squared in the variance formula mainly to make the arithmetic easier.

4

The computational formula

Use the computational formula and the standard deviation.

04
Var(X) = E(X²) − μ²
core concept

We just saw the variance computed from its definition, which needed the mean first and then a squared deviation for every value. That raises a question: is there a form that takes one pass through the table instead of two? This card answers it → yes, $\operatorname{Var}(X) = E(X^2) - \mu^2$, which is the version you should use under exam pressure.

$$\operatorname{Var}(X) = E(X^2) - \left[E(X)\right]^2 = \sum x^2 p(x) - \mu^2$$

Both formulas always give the same answer. Check it on the distribution from card 03:

$E(X^2) = 0^2(0.1) + 1^2(0.3) + 2^2(0.4) + 3^2(0.2) = 0 + 0.3 + 1.6 + 1.8 = 3.7$

$\operatorname{Var}(X) = 3.7 - (1.7)^2 = 3.7 - 2.89 = 0.81$ ✓ — the same $0.81$ as before.

Standard deviation. The variance is in squared units, which makes it awkward to interpret. Taking the positive square root returns it to the units of $X$:

$$\operatorname{SD}(X) = \sigma = \sqrt{\operatorname{Var}(X)}$$

Here $\sigma = \sqrt{0.81} = 0.9$. So the distribution is centred at $1.7$ with values typically about $0.9$ away from that centre, which is the sentence an exam answer should be able to produce.

$\operatorname{Var}(X) = E(X^2) - \mu^2$ where $E(X^2) = \sum x^2 p(x)$, and $\sigma = \sqrt{\operatorname{Var}(X)}$.; $E(X^2)$ squares the VALUES, not the probabilities: $\sum x^2 p(x)$, never $\sum x^2 p(x)^2$.

Pause, copy the computational formula $\operatorname{Var}(X) = E(X^2) - \mu^2$, the definition $E(X^2) = \sum x^2 p(x)$, and $\sigma = \sqrt{\operatorname{Var}(X)}$, into your book.

Fill the blanks: A variable has $p(1) = 0.4$, $p(3) = 0.6$. Give each answer as a decimal.
$E(X) =$
$E(X^2) =$
$\operatorname{Var}(X) =$

5

Work the examples

Work three examples, then read the traps.

05
Worked examples
worked
PROBLEM 1 · THE FAIR DIE, FULLY

For one roll of a fair six-sided die, find $E(X)$, $\operatorname{Var}(X)$ and $\sigma$, giving the standard deviation to three decimal places.

1
$E(X) = \dfrac{1+2+3+4+5+6}{6} = \dfrac{21}{6} = 3.5$
Uniform, so the weighted average is the ordinary average of the six values.
PROBLEM 2 · FROM A TABLE

A random variable $X$ has $p(2) = 0.2$, $p(4) = 0.5$, $p(6) = 0.3$. Find the mean, variance and standard deviation.

1
$\mu = 2(0.2) + 4(0.5) + 6(0.3) = 0.4 + 2 + 1.8 = 4.2$
Weighted average. Note it lies between 2 and 6, as any mean must.
PROBLEM 3 · IS THE GAME WORTH PLAYING?

A stall charges $\$2$ per go. You roll one fair die: a 6 pays $\$10$, a 4 or 5 pays $\$2$, anything else pays nothing. Find the expected profit per go and interpret it.

1
$P(\text{pay } \$10) = \tfrac{1}{6}, \quad P(\text{pay } \$2) = \tfrac{2}{6}, \quad P(\text{pay } \$0) = \tfrac{3}{6}$
Let $W$ be the amount paid out. Convert the rule into a distribution first, before any arithmetic.
06
Where these marks are lost
exam technique
Trap 01
The mean of the squares is not the square of the mean
$E(X^2) \neq [E(X)]^2$, and the whole variance is precisely the gap between them. Confusing the two gives a variance of zero every time, which should be an immediate alarm.
Trap 02
Averaging the values instead of weighting them
$E(X)$ is $\sum x\,p(x)$, not the ordinary average of the listed values. Those agree only when the distribution is uniform, which is exactly when the mistake goes undetected.
Trap 03
Reporting the variance as the standard deviation
If the question asks for spread in the original units, take the square root. Writing $0.81$ where $0.9$ was wanted loses the mark even though the working was right.
Trap 04
Expecting the expected value
$E(X) = 3.5$ for a die, and 3.5 is unrollable. An expected value is a long-run average, so it is under no obligation to be attainable, or even to be close to the most likely value.

Odd one out: Three of these correctly compute a variance. Which one is wrong?

6

Practise and reflect

Work the quick-fire set, then revisit your prediction.

07
Quick-fire set
practice
1

$p(0) = 0.5$, $p(1) = 0.5$. Find $E(X)$, $\operatorname{Var}(X)$ and $\sigma$.

2

$p(10) = 0.7$, $p(20) = 0.3$. Find the mean and standard deviation.

3

A fair eight-sided die is rolled. Use the uniform shortcut to write down $E(X)$ without a weighted sum, and say why the shortcut is valid.

4

A variable takes only the value 7, with probability 1. Find $E(X)$ and $\operatorname{Var}(X)$, and explain the variance in words.

5

A student computes $\operatorname{Var}(X) = -0.4$. Explain how you know, without seeing any working, that a mistake has been made.

Match each symbol or expression to what it means:

  • $\sum x\,p(x)$
  • $\sum x^2 p(x)$
  • $E\!\left[(X - \mu)^2\right]$
  • $\sqrt{\operatorname{Var}(X)}$
  • the standard deviation, in the units of $X$
  • $E(X^2)$, the mean of the squared values
  • the expected value, a measure of centre
  • the variance, written as an expected value
08
Revisit your thinking

Earlier you were asked whether "expected value" is a badly chosen name, and what you would have to do to observe $3.5$. The name is misleading, and it is worth saying why precisely: nothing about $E(X)$ predicts a single trial, and $3.5$ is not a face on the die. To observe it you would have to roll the die many times and take the mean of your results, which drifts steadily toward $3.5$ as the number of rolls grows. "Long-run average" is what the term actually means, and answers that say so score better than answers that say "the value you expect".

auto-saved
09
Where this goes next

Everything here was a sum over a finite list of values. When the variable becomes continuous, the list becomes an interval and there is nothing left to add up one term at a time. The two formulas survive the change essentially unaltered, with the sum replaced by an integral, and that is the arc of the lessons that follow.

Complete the short-answer practice

Apply the lesson methods, then compare each response with its comprehensive answer.

01
Focus-area checkpoint
checkpoint

Use the visible short-answer practice below during this lesson. After completing the focus area, use Checkpoint 3 for the checkpoint question bank.

02
Short answer
ApplyBand 43 marks

Q1. A discrete random variable $X$ has the distribution below.

$x$1234
$p(x)$0.10.20.40.3

(a) Find $E(X)$. (b) Find $E(X^2)$ and hence $\operatorname{Var}(X)$. (c) Find $\sigma$ and write one sentence interpreting the pair $(\mu, \sigma)$ in context. (3 marks)

auto-saved
ApplyBand 53 marks

Q2. An insurance policy costs $\$300$ per year. In any year there is a probability of $0.02$ that the insurer must pay a claim of $\$8000$, and a probability of $0.05$ that it must pay a smaller claim of $\$1000$. Otherwise nothing is paid.

(a) Construct the probability distribution of the amount $C$ paid out by the insurer in one year. (b) Find $E(C)$. (c) Find the insurer's expected profit per policy, and explain why the insurer is nevertheless exposed to risk in any single year. (3 marks)

auto-saved
EvaluateBand 63 marks

Q3. Two production lines both make components with mean length $\mu = 50$ mm. Line A has $\sigma = 0.2$ mm; line B has $\sigma = 2.0$ mm. A manager writes: "Both lines average 50 mm, so they are performing equally well."

(a) Explain what the two standard deviations tell you that the means do not. (b) A component is acceptable if its length is within $0.5$ mm of 50 mm. Argue, without assuming any particular distribution, which line will produce more acceptable components. (c) Describe one situation in which the manager's statement would nevertheless be the right thing to say, and justify it. (3 marks)

auto-saved
Comprehensive answers (click to reveal)

Drill 1: $E(X) = 0(0.5) + 1(0.5) = 0.5$. $E(X^2) = 0(0.5) + 1(0.5) = 0.5$. $\operatorname{Var}(X) = 0.5 - 0.25 = 0.25$, so $\sigma = 0.5$. Note $E(X^2) = E(X)$ here only because $0^2 = 0$ and $1^2 = 1$; that coincidence does not generalise.

Drill 2: $\mu = 10(0.7) + 20(0.3) = 7 + 6 = 13$. $E(X^2) = 100(0.7) + 400(0.3) = 70 + 120 = 190$. $\operatorname{Var}(X) = 190 - 169 = 21$, so $\sigma = \sqrt{21} \approx 4.583$.

Drill 3: $E(X) = \tfrac{1+2+\dots+8}{8} = \tfrac{36}{8} = 4.5$. The shortcut is valid because every value carries the identical weight $\tfrac{1}{8}$, so the weighted average $\sum x \cdot \tfrac{1}{8}$ factorises to $\tfrac{1}{8}\sum x$, which is the ordinary average.

Drill 4: $E(X) = 7(1) = 7$ and $\operatorname{Var}(X) = (7-7)^2(1) = 0$. In words: the variable is not random at all. There is no spread because there is nothing to spread — every trial gives 7. A variance of zero always means the variable is a constant.

Drill 5: The variance is an average of squared quantities, $\sum (x - \mu)^2 p(x)$, in which every squared deviation is non-negative and every probability is non-negative. A sum of non-negative terms cannot be negative, so a negative variance is impossible and signals an arithmetic error, most often subtracting $E(X^2)$ from $\mu^2$ instead of the other way round.

Q1 (3 marks): (a) $E(X) = 1(0.1) + 2(0.2) + 3(0.4) + 4(0.3) = 0.1 + 0.4 + 1.2 + 1.2 = 2.9$ [1]. (b) $E(X^2) = 1(0.1) + 4(0.2) + 9(0.4) + 16(0.3) = 0.1 + 0.8 + 3.6 + 4.8 = 9.3$. So $\operatorname{Var}(X) = 9.3 - 2.9^2 = 9.3 - 8.41 = 0.89$ [1]. (c) $\sigma = \sqrt{0.89} \approx 0.943$. The distribution is centred at $2.9$, with individual values typically falling about $0.94$ away from that centre — which is a substantial spread relative to a range of only 1 to 4 [1].

Q2 (3 marks): (a) $C$ takes the value $8000$ with probability $0.02$, $1000$ with probability $0.05$, and $0$ with probability $1 - 0.02 - 0.05 = 0.93$ [1]. (b) $E(C) = 8000(0.02) + 1000(0.05) + 0(0.93) = 160 + 50 = 210$, so the expected payout is $\$210$ [1]. (c) Expected profit per policy is $300 - 210 = \$90$. The insurer is still exposed because the expected value describes a long-run average across many policies, not any single year: in a given year on a single policy the payout is $\$0$ with probability $0.93$ but $\$8000$ with probability $0.02$, and $\$8000$ dwarfs the $\$300$ premium. Insurers manage this by writing many independent policies, which is precisely the condition under which the average becomes reliable [1].

Q3 (3 marks): (a) The mean locates the centre of each distribution and here it is identical, so it cannot distinguish the lines at all. The standard deviation measures typical departure from that centre, and line B's is ten times line A's, so B is far more variable [1]. (b) The tolerance of $0.5$ mm is $\tfrac{0.5}{0.2} = 2.5$ standard deviations for line A but only $\tfrac{0.5}{2.0} = 0.25$ standard deviations for line B. A tolerance measured in standard deviations is the meaningful comparison, and line A's is ten times wider, so line A will produce far more acceptable components. This argument uses only that both distributions are centred at 50, not their shape [1]. (c) The statement would be right if the quantity of interest were the total or average output over a very large number of components — for instance if the components were being melted down by weight, or if the manager were forecasting total material used. There the individual variation averages out and only the mean matters. It is wrong whenever each component is judged individually against a tolerance [1].

Review and complete

Retrieve the central ideas, then mark the lesson complete or continue to the module quiz.

01
Retrieve the lesson before you leave
  1. Write both variance formulas from memory and say which one you would use in an exam, and why.
  2. Explain in one sentence why the variance counts as an expected value.
  3. Give an example of a distribution whose expected value is not one of its possible values, and one whose variance is zero.

Answer from memory first, then return to the matching Learn checkpoint to check and correct your response.

01
Take the full module quiz
quiz

A full module quiz covering every lesson in this module, not just this one. Set aside a decent block of time and treat it like a real assessment.

Start the module quiz →

Mark lesson as complete

Tick when you've finished the practice and review.