IB Mathematics: Applications and Interpretation · Topic 4 · Statistics and probability
4.7 Discrete random variables
Define a discrete random variable, build and use a probability distribution table, and calculate expected value and variance.
1/5A random variable turns each outcome into a number
- A random variable turns each outcome into a number
- A probability distribution lists every value with its probability
- The expected value is the long-run mean of a random variable
- Variance measures how widely the values are spread
- Expected value helps decide whether a game is fair
- Check your recall
- Practice: 10 questions
Part 1 of 5: A random variable turns each outcome into a number
Toss two coins and count the heads. The count is 0, 1 or 2, depending on chance. A random variable assigns such a number to each outcome. We name it with a capital letter, such as , and write its values as lower-case .
A discrete random variable takes only separate, countable values, usually whole numbers. The number of heads is discrete. For two coins, , because two of the four equally likely outcomes give one head. Height is not discrete, because it can take any value within a range.
We write for the probability that takes the value .
Key terms · tap one for its definition
random variable
A random variable, written , is a variable whose numerical value is determined by the outcome of a random process.
discrete random variable
A discrete random variable is a random variable that takes only separate, countable values, such as whole numbers.
Part 2 of 5: A probability distribution lists every value with its probability
A probability distribution gives the probability of every possible value of . For a discrete variable, we usually show it as a table. Every possible value must appear, even one with a small probability. One row lists the values , and the next lists .
Number of heads when two fair coins are tossed
- $x$
- 0
- 1
- 2
Two rules always hold. Each probability lies between 0 and 1. All the probabilities add to 1, so . The coin table shows this: . This sum rule is the quickest way to find an unknown probability.
Worked example
Finding a missing probability
- The probabilities must add to 1: .
- Simplify: .
- Solve: .
Answer: .
Key term
probability distribution
A probability distribution is a list or table giving for every possible value of a random variable.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: B · Worked explanation
Part 3 of 5: The expected value is the long-run mean of a random variable
Suppose you spin the spinner many times and average the scores. That long-run average is the expected value, . Multiply each value by its probability, then add the results: .
Worked example
Calculating an expected value
- Multiply each score by its probability: , , and .
- Add the results: .
Answer: .
The expected value need not be a possible value of . Here, 2.9 is not a score the spinner can give. It describes the balance point of the distribution, not a prediction for one trial. It is also called the mean of the distribution.
Key term
expected value
The expected value of a discrete random variable is the sum of each value multiplied by its probability, .
Part 4 of 5: Variance measures how widely the values are spread
Two distributions can share a mean but differ in spread. The variance, , measures spread about the mean . A convenient form is , where .
The standard deviation, , is the positive square root of the variance. A larger variance means the values are more widely spread. Variance has squared units, so the standard deviation is often easier to interpret.
In calculations, find first, then , then subtract. This order keeps the working short and clear.
Worked example
Calculating variance
- Find .
- .
- .
- .
Answer: The variance is 0.89 and the standard deviation is .
Key terms · tap one for its definition
variance
The variance, , is the expected value of the squared deviation from the mean, .
standard deviation
The standard deviation, , is the positive square root of the variance, measured in the same units as .

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: D · Worked explanation
Part 5 of 5: Expected value helps decide whether a game is fair
Expected value also guides decisions. In a game, the expected gain is the expected prize minus the cost to play. A fair game has an expected gain of zero. A negative expected gain favours the organiser, and a positive one favours the player.
Worked example
Is the game fair?
- Find the expected prize: .
- .
- Expected gain expected prize cost .
Answer: The expected gain is −£0.40 per game, so the game is not fair. It favours the organiser.
This is a long-run average, not the result of one play. Over many plays, a player loses about £0.40 per game. A game can be fair even when single plays differ widely, because only the long-run average matters.
Key term
fair game
A fair game is a game whose expected gain, the expected winnings minus the cost to play, is zero.
Check your recall[15 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 value depends on the outcome of a random process and which takes only separate, countable values.
- 1 mark for stating that its value is determined by the outcome of a random process
- 1 mark for stating that it takes only separate, countable values
- 2.Determine[4 marks]
Determine and for a random variable with , , and .
Show mark schemeHide mark scheme
Model answer
The probabilities add to 1, so and . Then .
- 1 mark for using the fact that the probabilities add to 1
- 1 mark for obtaining
- 1 mark for multiplying each value by its probability and adding
- 1 mark for obtaining
- 3.State[2 marks]
State two rules that every probability distribution must satisfy.
Show mark schemeHide mark scheme
Model answer
Each probability must lie between 0 and 1. The probabilities must add to 1.
- 1 mark for stating that each probability lies between 0 and 1
- 1 mark for stating that the probabilities add to 1
- 4.Calculate[3 marks]
Calculate for a random variable with and distribution , , , .
Show mark schemeHide mark scheme
Model answer
. Then .
- 1 mark for finding
- 1 mark for subtracting
- 1 mark for obtaining
- 5.Deduce[2 marks]
Deduce whether a game is fair, when it costs £2 to play and the expected prize is £1.50.
Show mark schemeHide mark scheme
Model answer
The expected gain is , so it is not zero. The game is not fair and favours the organiser.
- 1 mark for finding the expected gain as the expected prize minus the cost
- 1 mark for concluding that the game is not fair because the expected gain is not zero
- 6.Explain[2 marks]
Explain why the expected value of a discrete random variable need not be one of its possible values.
Show mark schemeHide mark scheme
Model answer
The expected value is a long-run weighted average of all the values. An average can fall between possible values, so it need not equal any of them.
- 1 mark for stating that the expected value is a long-run weighted average
- 1 mark for explaining that an average can lie between the possible values

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[1 mark]
Show answer and explanation
Answer: D · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: B · Worked explanation
MediumCalculate[2 marks]
Show answer and explanation
Answer: C · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation
Hard[2 marks]
Show answer and explanation
Answer: D · Worked explanation
Hard[2 marks]
Show answer and explanation
Answer: D · Worked explanation
Hard[2 marks]
Show answer and explanation
Answer: B · Worked explanation