Variance of a Discrete Random Variable and Coding with aX + b | Analysis and Approaches 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 for the mean.
- The distance of a value x from the mean is . 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.
- The standard deviation is . Square-rooting puts it back in the same units as X (pounds, not pounds squared).
- So variance is also written .
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 and . 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 .
- Start: .
- Expand the square: , so the sum is . (μ is a fixed number, so it comes outside the sums.)
- Now use what we know: , and .
- So .
💡 In plain words
- "Mean of the squares minus the square of the mean."
- Find and 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 , x = 1, 2, 3, 4, both ways
| What I write | Why I do it |
|---|---|
| We found these in the last note. | |
| Quick formula: mean of squares minus square of mean. | |
| Definition, as a check: squared distances 4, 1, 0, 1. | |
| Same answer, so both formulas agree. | |
| Standard 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:
- .
- .
- .
- (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.
All notes in HL: Continuous random variables (AHL 4.14)
- Variance of a Discrete Random Variable and Coding with aX + b
- Continuous Random Variables: Probability Density Functions and Areas
- Medians, Quartiles, Mode and Skewness of a Continuous Random Variable
- Mean and Variance of a Continuous Random Variable
Video
What's inside for this topic
4 teacher notes, 72 practice questions, 40 flashcards, 2 quizzes.
Get the full notes, every practice question, flashcards, quizzes and mock papers.
Next note: Continuous Random Variables: Probability Density Functions and Areas