Variance of a Discrete Random Variable and Coding with aX + b (Discrete Random Variables) | OCR B (MEI) A Level Further Maths notes

Free preview: Variance of a Discrete Random Variable and Coding with aX + b

Variance: Measuring the Spread of X

Watch: 1-minute explainer

Year 1 (AS) for OCR B (MEI). For AQA, Edexcel and OCR A, check your own specification for whether it is AS or A level content.

Let's start with two games. In game A you always win £5. In game B you toss a coin: heads wins £10, tails wins nothing. Work out the expected winnings: both are £5. Yet the games feel completely different. Game B is risky; game A is not.

  • The mean alone can't tell these apart. We need a second number that measures spread: how far the values tend to land from the mean.
  • That number is the variance. You met the idea in A Level Maths for data: variance is the mean of the squared distances from the mean. Now we do the same for a random variable.

The definition

  • Write μ=E(X) for the mean.
  • The distance of a value x from the mean is x−μ. Some distances are positive, some negative.
  • If we just averaged them, they would cancel to 0 every time. So we square them first. Squares are never negative.
  • The variance is the expected squared distance from the mean.

Var(X)=E((X−μ)2)=∑(x−μ)2P(X=x)

  • The standard deviation is σ=Var(X). Square-rooting puts it back in the same units as X (pounds, not pounds squared).
  • So variance is also written σ2.

Check with the games. Game A: every distance is 0, so the variance is 0. Game B: each value is 5 from the mean, so the variance is 25(0.5)+25(0.5)=25 and σ=5. The risk now shows up in a number.

A quicker formula

The definition is fine, but when μ is an awkward decimal the brackets get messy. Expanding the bracket gives the formula used in almost every question. Write p for P(X=x).

  1. Start: Var(X)=∑(x−μ)2p.
  2. Expand the square: (x−μ)2=x2−2μx+μ2, so the sum is ∑x2p−2μ∑xp+μ2∑p. (μ is a fixed number, so it comes outside the sums.)
  3. Now use what we know: ∑x2p=E(X2), ∑xp=μ and ∑p=1.
  4. So Var(X)=E(X2)−2μ2+μ2=E(X2)−μ2.

Var(X)=E(X2)−[E(X)]2

💡 In plain words

  • "Mean of the squares minus the square of the mean."
  • Find E(X) and E(X2) first, then subtract.
  • Variance can never be negative. If you get a negative answer, look for an arithmetic slip.

👀 Watch me do it: find Var(X) for P(X=x)=x10, x = 1, 2, 3, 4, both ways

What I writeWhy I do it
E(X)=3, E(X2)=10We found these in the last note.
Var(X)=10−32=1Quick formula: mean of squares minus square of mean.
∑(x−3)2p=4(0.1)+1(0.2)+0(0.3)+1(0.4)Definition, as a check: squared distances 4, 1, 0, 1.
=0.4+0.2+0+0.4=1Same answer, so both formulas agree.
σ=1=1Standard deviation.

Unlock the full note: start 7 days free.

Log in or subscribe to read the rest of this note. Members also get the AI tutor, practice quizzes, mock exams and flashcards for this topic.

Log in · Subscribe · Start free trial

All notes in Discrete Random Variables

  1. Discrete Random Variables: Probability Functions, Cumulative Distributions and Expectation
  2. Variance of a Discrete Random Variable and Coding with aX + b

Video

What's inside for this topic

2 teacher notes, 49 practice questions, 44 flashcards, 2 quizzes.

Get the full notes, every practice question, flashcards, quizzes and mock papers.

Start your free 7-day trial

Questions? Chat with us on WhatsApp · Try one live lesson

Previous note: Discrete Random Variables: Probability Functions, Cumulative Distributions and Expectation

Variance of a Discrete Random Variable and Coding with aX + b on other exam boards

All OCR B (MEI) A Level Further Maths topics · A Level Further Maths