Variance of a Discrete Random Variable and Coding with aX + b | Applications and Interpretation IB Maths notes

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

Variance: Measuring the Spread of X

Analysis and approaches and Applications and interpretation: HL only (AHL 4.14 in both courses)

Watch: 1-minute explainer

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 SL 4.3: 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.

✏️ YOUR TURN 1

Try this first:

X takes the values 0, 1, 2 with probabilities 0.5, 0.3, 0.2. Find E(X), Var(X) and the standard deviation.

Answer:

  • E(X)=0+0.3+0.4=0.7.
  • E(X2)=0+1(0.3)+4(0.2)=1.1.
  • Var(X)=1.1−0.72=1.1−0.49=0.61.
  • σ=0.61=0.781 (3 s.f.).

✏️ YOUR TURN 2

Try this first:

X takes the values 1, 2, 3 with probabilities 0.25, 0.5, 0.25. Find Var(X) using the definition, then check with the quick formula.

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 HL: Data design and combining random variables (AHL 4.12, 4.14, 4.15)

  1. Variance of a Discrete Random Variable and Coding with aX + b
  2. Designing Data Collection: Reliability and Validity
  3. Combining Random Variables: Expectation and Variance of aX + bY
  4. Linear Combinations of Independent Normal Random Variables
  5. The Sample Mean as a Random Variable and Unbiased Estimators
  6. The Distribution of the Sample Mean
  7. The Central Limit Theorem: Why Sample Means Become Normal

Video

What's inside for this topic

7 teacher notes, 66 practice questions, 40 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

Next note: Designing Data Collection: Reliability and Validity

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

All Applications and Interpretation IB Maths topics · IB Maths