Discrete Random Variables (AI SL)
A discrete random variable \(X\) takes a countable set of values, each with its own probability - roll a die, count defective items, tally a spinner's payout. Once you have the distribution table you can find the expected value \(E(X)\), the long-run average outcome. This page covers that one formula, with worked examples and the mistakes that lose the most marks. It's part of the broader Distributions topic.
21 questions on this sub-topic.
The key formula
Covered under IB syllabus reference SL4.7: the concept of discrete random variables and their probability distributions, and the expected value \(E(X)\) for discrete data - including that \(E(X)=0\) signals a fair game when \(X\) is a player's gain.
Expected value
\(E(X)=\sum x\,P(X=x)\)
Multiply each outcome by its probability and add up. This is in the formula booklet, so you don't need to memorise it.
Probabilities sum to 1
\(\sum P(X=x)=1\)
Almost every question starts here - if one probability is unknown, this is how you find it before touching \(E(X)\).
Need the full syllabus wording and formula-booklet reference table? See Distributions.
Worked examples
The distribution of \(X\) is given in the table.
| \(x\) | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| \(P(X=x)\) | 0.2 | 0.3 | 0.4 | \(p\) |
(a) Find \(p\).
(b) Find \(E(X)\).
Worked solution
(a) 0.2+0.3+0.4+p = 1, so p = 0.1 A1
(b) E(X) = 1(0.2) + 2(0.3) + 3(0.4) + 4(0.1) M1
= 0.2 + 0.6 + 1.2 + 0.4 M1
= 2.4 A1
A die game pays $5 for a six and costs $1 otherwise.
Find the expected gain per roll.
Worked solution
Roll a six (gain \(+5\)) with probability \(\tfrac16;\) roll anything else (gain \(-1\)) with probability \(\tfrac56.\) A1
\(E(X)=5\cdot\tfrac16+(-1)\cdot\tfrac56=\tfrac{5}{6}-\tfrac{5}{6}=0.\) M1 A1
The expected gain is \($0\) per roll, so in the long run the game is fair. R1
Common mistakes
- Forgetting to find the missing probability first. If one probability in the table is unknown, use \(\sum P(X=x)=1\) before attempting \(E(X)\) - plugging an unsolved variable straight into the expectation formula is a common early slip.
- Dropping the sign on a loss. In a game or gamble, a "cost" or "loss" outcome is a negative value of \(x\), not zero - forgetting the minus sign silently inflates \(E(X)\) and can turn a fair game into an apparently profitable one.
- Using the normal distribution for a discrete count. A count of successes from a fixed number of trials (e.g. number of heads in 20 flips) is binomial, not normal - check whether the data is discrete or continuous before choosing a model.
Ready to practise properly?
22 discrete-random-variable questions, marked instantly like the real exam.
Quick answers
What is a discrete random variable?
A variable \(X\) that can only take a countable set of values (like 1, 2, 3, ...), each with its own probability \(P(X=x)\), where all the probabilities sum to 1.
What does E(X) = 0 mean in a game?
If \(X\) represents a player's gain, \(E(X)=0\) means the game is fair - over many repeats, the player neither gains nor loses money on average.