SECTION 1
Historical Context & Motivation
Long before statisticians had computers or calculators, people were fascinated by games of chance. Card games, dice, and lotteries drove early thinkers to ask a deceptively simple question: if I play this game many times, how much should I expect to win or lose on average? This quest to quantify randomness gave birth to the concept of a random variable — a way to assign numbers to the outcomes of chance experiments — and to the formulas for expected value and variance that we still use today.
1654 • Pascal & Fermat Correspondence
1713 • Bernoulli's Ars Conjectandi
1812 • Laplace's Théorie Analytique
1900s • Modern Probability Theory
The central question these mathematicians tackled remains at the heart of SL 4.5: given a random experiment with numerical outcomes, how do we summarize the center and spread of its probability distribution? That is exactly what expected value and variance accomplish.
SECTION 2
Core Principles & Definitions
Before diving into formulas, it is important to build a clear vocabulary. A discrete random variable is a variable whose value is determined by the outcome of a random process and that can only take on a countable number of distinct values — think of the result of rolling a die (1, 2, 3, 4, 5, or 6) or the number of heads in five coin flips (0, 1, 2, 3, 4, or 5). The word "discrete" distinguishes these from continuous random variables, which can take any value in an interval.
Random Variable (X)
Probability Distribution
Expected Value E(X)
Variance Var(X)
Standard Deviation σ
KEY TAKEAWAY
SECTION 3
Visualizing a Probability Distribution
The diagram below shows a probability distribution for a discrete random variable X representing the number of goals scored by a football team in a match. Each bar's height represents the probability of that outcome. Notice how all the bar heights add up to 1, and the dashed line marks the expected value — the balance point of the distribution.
Two important observations stand out. First, the expected value of 1.80 is not an integer, even though the team can only score whole numbers of goals — the expected value represents the theoretical average over many matches, not a single game's result. Second, the distribution is not symmetric: the bars are taller on the left side, indicating the team is more likely to score 1 or 2 goals than 3 or 4. This asymmetry is captured numerically by the variance and standard deviation.
SECTION 4
Mathematical Framework
Now let's formalize the ideas with the formulas you will use on the IB exam. All of them boil down to one principle: multiply each value by its probability and add up the results.
VALIDITY CONDITION
For a valid probability distribution, every individual probability must be between 0 and 1 (inclusive), and all the probabilities must sum to exactly 1.
EXPECTED VALUE (MEAN)
Multiply each possible value xᵢ by its probability, then sum all such products. The result, μ (mu), is the long-run average.
VARIANCE (DEFINITION FORM)
For each value, compute its squared deviation from the mean, multiply by its probability, and sum. This gives the average squared distance from the mean — the variance σ².
VARIANCE (SHORTCUT FORM)
An equivalent and often faster formula. First compute E(X²) = ∑ xᵢ² · P(X = xᵢ), then subtract the square of the mean. This form is provided in the IB formula booklet.
STANDARD DEVIATION
The standard deviation is simply the square root of the variance, returning the measure of spread to the same units as X.
IB Formula Booklet
SECTION 5
Building and Interpreting Probability Tables
In many IB problems, you are given a partially completed probability table and must find a missing probability before computing E(X) or Var(X). The key constraint is that the probabilities must sum to 1. The table below shows the distribution from our football example, along with the intermediate columns needed for calculating E(X) and E(X²).
| x | P(X = x) | x · P(X = x) | x² | x² · P(X = x) |
|---|---|---|---|---|
| 0 | 0.10 | 0.00 | 0 | 0.00 |
| 1 | 0.30 | 0.30 | 1 | 0.30 |
| 2 | 0.35 | 0.70 | 4 | 1.40 |
| 3 | 0.20 | 0.60 | 9 | 1.80 |
| 4 | 0.05 | 0.20 | 16 | 0.80 |
| Totals | 1.00 | 1.80 | — | 4.30 |
Complete probability distribution with calculation columns
From the totals row, we read off E(X) = 1.80 and E(X²) = 4.30. Using the shortcut variance formula: Var(X) = 4.30 − 1.80² = 4.30 − 3.24 = 1.06. The standard deviation is σ = √1.06 ≈ 1.03 goals. This tells us that on a typical match, the team's score deviates from the average by about 1 goal.
SECTION 6
Worked Example
A spinner is divided into four sections. The random variable X represents the prize (in dollars) a player wins on each spin. The probability distribution is shown below. Find the expected value E(X), the variance Var(X), and the standard deviation σ.
| x (dollars) | P(X = x) |
|---|---|
| 0 | 0.40 |
| 2 | 0.30 |
| 5 | 0.20 |
| 10 | 0.10 |
Spinner prize distribution
Finding E(X), Var(X), and σ
- 1
Step 1 — Verify the Distribution
Check that the probabilities sum to 1: 0.40 + 0.30 + 0.20 + 0.10 = 1.00. ✓ Each probability is between 0 and 1. ✓ This is a valid probability distribution.∑P = 1.00 ✓ - 2
Step 2 — Calculate E(X)
E(X) = ∑ x · P(X = x) = (0)(0.40) + (2)(0.30) + (5)(0.20) + (10)(0.10) = 0 + 0.60 + 1.00 + 1.00 = 2.60.E(X) = $2.60 - 3
Step 3 — Calculate E(X²)
E(X²) = ∑ x² · P(X = x) = (0²)(0.40) + (2²)(0.30) + (5²)(0.20) + (10²)(0.10) = 0 + (4)(0.30) + (25)(0.20) + (100)(0.10) = 0 + 1.20 + 5.00 + 10.00 = 16.20.E(X²) = 16.20 - 4
Step 4 — Apply the Variance Formula
Var(X) = E(X²) − [E(X)]² = 16.20 − (2.60)² = 16.20 − 6.76 = 9.44.Var(X) = 9.44 - 5
Step 5 — Find the Standard Deviation
σ = √Var(X) = √9.44 ≈ 3.07. On average, a player's prize deviates from the mean of $2.60 by about $3.07, which indicates fairly high variability relative to the mean.σ ≈ $3.07
SECTION 7
Key Properties and Common Pitfalls
When working with expected value and variance, certain properties save time and help avoid mistakes on IB exams. The table below summarizes the most important rules alongside the common errors students make.
| Property / Rule | Formula | Common Mistake |
|---|---|---|
| Probabilities sum to 1 | ∑ P(X = xᵢ) = 1 | Forgetting to use this to find a missing probability before proceeding |
| E(X) need not be a possible value of X | — | Rounding E(X) to the nearest integer because 'it should be a real outcome' |
| Linear transformation of E(X) | E(aX + b) = aE(X) + b | Applying this rule to variance (variance treats constants differently) |
| Linear transformation of Var(X) | Var(aX + b) = a²Var(X) | Including the +b term (adding a constant shifts values but doesn't change spread) |
| Variance is always ≥ 0 | σ² ≥ 0 | Getting a negative variance (usually a calculation error — recheck your work) |
Key properties of E(X) and Var(X) alongside common student errors
KEY TAKEAWAY
SECTION 8
Connection to Advanced Topics
The concepts you have learned here form the foundation for several more advanced topics in the IB course and beyond. Understanding expected value and variance now will make the jump to named distributions, hypothesis testing, and even the normal distribution much smoother.
| What You Know Now (SL 4.5) | Where It Leads |
|---|---|
| General discrete distributions with tables | Binomial distribution (SL 4.7) — a specific formula for counting successes in repeated trials |
| E(X) as a weighted average | Continuous distributions where E(X) becomes an integral (HL) |
| Var(X) as a measure of spread | Normal distribution (SL 4.9) where μ and σ fully define the bell curve |
| Checking if a distribution is valid | Chi-squared goodness of fit tests — comparing observed data to expected distributions |
How SL 4.5 concepts extend to later topics
In particular, the binomial distribution you will encounter next is simply a specific type of discrete random variable where each trial has exactly two outcomes (success or failure). Its expected value and variance have their own neat shortcut formulas, but they are derived from the same ∑ xᵢ · P(X = xᵢ) principle you practiced here. Mastering the general case now means you already understand the engine that powers every named distribution.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
A discrete random variable assigns numerical values to the outcomes of a random experiment, and its probability distribution lists every possible value alongside its probability. For the distribution to be valid, all probabilities must be between 0 and 1, and they must sum to exactly 1. The expected value E(X) = ∑ x · P(X = x) gives the long-run average — the center of the distribution. It does not need to be a value the variable can actually take.
The variance Var(X) = E(X²) − [E(X)]² measures how spread out the distribution is, and the standard deviation σ = √Var(X) expresses that spread in the original units of the variable. Under linear transformations, E(aX + b) = aE(X) + b but Var(aX + b) = a²Var(X), because adding a constant shifts the center without affecting the spread. These tools form the foundation for every named distribution — especially the binomial and normal distributions — you will study later in the IB course.