IB Mathematics: Analysis and Approaches · Topic 4 · Statistics and probability
4.7 Discrete random variables
Define a discrete random variable, build and check its probability distribution table, and calculate its expected value and variance.
1/5A random variable turns outcomes into numbers
- A random variable turns outcomes into numbers
- A probability distribution lists every value with its probability
- The expected value is the long-run average
- Variance measures how far values spread around the mean
- Unknown probabilities and fair games use the same rules
- Check your recall
- Practice: 10 questions
Part 1 of 5: A random variable turns outcomes into numbers
Roll a fair die and record the score. Before the roll, you cannot say which number will appear. A random variable gives a numerical value to each outcome of a random process. We name it with a capital letter, such as .
Counting heads in three coin tosses is another example. The possible values are 0, 1, 2 and 3. Because the values can be listed one by one, is a discrete random variable.
Exact height is different, since it can take any value in an interval. That variable is not discrete. A small letter stands for one particular value, and is the probability that takes it.
Key terms · tap one for its definition
random variable
A random variable is a quantity whose numerical value depends on the outcome of a random process.
discrete random variable
A discrete random variable is a random variable whose possible values can be listed individually, often as whole numbers.
Part 2 of 5: A probability distribution lists every value with its probability
Now that has possible values, each value needs a probability. Imagine a spinner with four sectors that score 1, 2, 3 or 4. The probability distribution of the score lists every value with its probability.
Probability distribution of the spinner score X
- x
- 1
- P(X = x)
- 0.1
- x
- 2
- P(X = x)
- 0.3
- x
- 3
- P(X = x)
- 0.4
- x
- 4
- P(X = x)
- 0.2
You can read probabilities directly from the table. For example, , so 3 is the most likely score. You can also add entries, so .
Two rules must always hold for a distribution.
- Every probability lies between 0 and 1.
- The probabilities add up to 1, so .
Key term
probability distribution
A probability distribution is the complete set of values of together with their probabilities, which sum to 1.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: C · Worked explanation
Part 3 of 5: The expected value is the long-run average
Suppose you spin the spinner many times and average the scores. That average settles near a fixed number. This number is the expected value of , written .
To find it, multiply each value by its probability and add the results. So . It is a weighted mean, with the probabilities as weights.
Think of the weights as long-run fractions of the time. A score with probability 0.4 appears in about 40% of spins. So it contributes 40% of its value to the average.
Worked example
Expected value of the spinner score
- Use .
- Substitute: .
- Evaluate: .
Answer:
Key term
expected value
The expected value of a discrete random variable is , the long-run mean of its values.
Part 4 of 5: Variance measures how far values spread around the mean
Two spinners can share the same expected value yet behave differently. One may give scores close together, and another may give scores far apart. The variance measures this spread.
Write . Then , which is easier to compute as . Here .
The standard deviation is the square root of the variance. It is in the same units as .
A large variance means the values are widely spread. A variance of 0 means always takes one value. Variance is never negative, because it averages squared distances.
Worked example
Variance of the spinner score
- Find .
- Evaluate: .
- Subtract : .
- Take the square root: .
Answer: and the standard deviation is 0.9.
Key terms · tap one for its definition
variance
The variance of is , the expected squared distance from the mean .
standard deviation
The standard deviation of is the square root of its variance and has the same units as .

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: A · Worked explanation
Part 5 of 5: Unknown probabilities and fair games use the same rules
Sometimes a distribution contains an unknown constant. Because the probabilities must sum to 1, you can form an equation and solve it.
Worked example
Finding an unknown constant
- The probabilities sum to 1: .
- So and .
- Then .
- Evaluate: .
Answer: and
Expected value can also judge a game of chance. The expected gain is the expected prize minus the cost to play. A fair game has an expected gain of 0. For example, a game costing £2 with an expected prize of £2 is fair.
Fairness describes the average over many plays, not the result of one play.
If the expected gain is negative, the player loses money on average over many plays. The organiser then expects a profit.
Key term
fair game
A fair game is a game in which the expected gain for a player is zero.
Check your recall[14 marks]
6 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Define[2 marks]
Define a discrete random variable.
Show mark schemeHide mark scheme
Model answer
A discrete random variable is a variable whose numerical value depends on the outcome of a random process. Its possible values can be listed individually.
- 1 mark for stating that its value depends on the outcome of a random process
- 1 mark for stating that its possible values can be listed individually
- 2.Explain[2 marks]
Explain why the probabilities 0.5, 0.4 and 0.3 cannot form a probability distribution for .
Show mark schemeHide mark scheme
Model answer
The probabilities of a distribution must sum to 1. Here , which is greater than 1.
- 1 mark for stating that the probabilities must sum to 1
- 1 mark for showing that the given probabilities sum to 1.2
- 3.Calculate[2 marks]
The variable has , , and . Calculate .
Show mark schemeHide mark scheme
Model answer
.
- 1 mark for multiplying each value by its probability and adding
- 1 mark for obtaining
- 4.Calculate[3 marks]
For the same variable, calculate .
Show mark schemeHide mark scheme
Model answer
. So .
- 1 mark for finding
- 1 mark for subtracting
- 1 mark for obtaining
- 5.Determine[2 marks]
A variable has , , and . Determine .
Show mark schemeHide mark scheme
Model answer
The probabilities sum to 1, so . Then and .
- 1 mark for forming the equation
- 1 mark for solving to obtain
- 6.Determine[3 marks]
A game costs £3 to play. The expected prize is £2.40. Determine the expected gain and state whether the game is fair.
Show mark schemeHide mark scheme
Model answer
Expected gain , so the expected gain is £0.60. This is not zero, so the game is not fair.
- 1 mark for subtracting the cost from the expected prize
- 1 mark for obtaining an expected gain of £0.60
- 1 mark for stating that the game is not fair because the expected gain is not zero

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyIdentify[1 mark]
Show answer and explanation
Answer: B · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: D · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: A · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: B · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardIdentify[2 marks]
Show answer and explanation
Answer: D · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation