James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AI SL › Statistics & probability › Discrete random variables

Discrete random variables

A discrete random variable takes a list of values, each with a probability. This page covers probability distributions given as tables or formulae, finding unknown probabilities, the expected value E(X), and fair games.

SL 4.7Paper 1Paper 2GDC allowed≈ 40 min to work through
Before you start: probability and sample spaces (Probability, Venn & tree diagrams).

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Read a probability distribution from a table or a formulaSL 4.7
  • Use the fact that the probabilities add to 1 to find an unknownSL 4.7
  • Find the expected value E(X), by hand or on the GDCSL 4.7
  • Use E(X) to find an expected total over many trialsSL 4.7
  • Decide whether a game is fair: E(gain)=0SL 4.7

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

The expected value E(X) is the long-run average: what you would get per trial if you repeated the experiment many times. It is a weighted mean, each value weighted by its probability. A game is fair when a player’s expected gain is zero: in the long run, nobody wins or loses.

2.1 Probability distributions

Distributions and expected value In formula booklet
∑P(X=x)=1E(X)=∑xP(X=x)
Worked example 1Paper 1
The distribution of X is shown. Find k and E(X).
x12345
P(X=x)0.10.20.150.05k
0.1+0.2+0.15+0.05+k=1⇒k=0.5
E(X)=1(0.1)+2(0.2)+3(0.15)+4(0.05)+5(0.5)=3.65
On the GDC: put the values in one list and the probabilities in another, then One-Variable Statistics with the probabilities as the frequency list: x̄ = E(X).
Worked example 2Paper 1
P(X=x)=4+x18 for x∈{1,2,3}. Show that this is a probability distribution and find E(X).
P(X=1)=518, P(X=2)=618, P(X=3)=718; total 1818=1 ✓
E(X)=5+12+2118=3818=2.11
Worked example 3Paper 2
X takes the values 0, 1, 2, 3 with probabilities a, 0.3, b, 0.1, and E(X)=1.4. Find a and b.
Probabilities add to 1: a+b=0.6
E(X): 0(a)+1(0.3)+2b+3(0.1)=1.4⇒b=0.4
a=0.2
With two unknowns, write two equations; the GDC can solve them as a system.

2.2 Fair games

Let X be the player’s gain (prize minus the cost to play). The game is fair if E(X)=0. If E(X)<0, the player loses on average (the organiser profits).

Worked example 4Paper 2
A game costs €2 to play. A fair die is rolled: a six wins €6, a 4 or 5 wins €3, anything else wins nothing. Is the game fair?
Gains: 6−2=4, 3−2=1, 0−2=−2, with probabilities 16, 26, 36
Subtract the cost from every prize, including "nothing".
E(X)=4(16)+1(26)−2(36)=0
Yes, the game is fair.
Worked example 5 (faded)Paper 1
A spinner gives 1, 2 or 3 points with probabilities 0.5, 0.3 and 0.2. Find the expected total score in 50 spins.
E(X)=0.5+0.6+0.6= 1.7  ← you work this out
Expected total =50×1.7= 85  ← you work this out
On your TI-Nspire Calculator tricks →

E(X) on the GDC: list 1 = values of x, list 2 = probabilities. menu → Statistics → Stat Calculations → One-Variable Statistics, with list 2 as the frequency list. The mean x¯ is E(X) (check that Σx of the frequencies, shown as n, is 1).

3Explore it

The distribution of the total score when fair dice are rolled. Choose the number of dice and a target total.

4Common mistakes & exam tips

Common mistakes

  • Forgetting that the probabilities must add to exactly 1.
  • Using the prize instead of the gain (prize − cost) in a fair-game question.
  • Rounding E(X) to a value X can take: the expected value need not be a possible value.
  • Dividing by the number of values, as if all were equally likely.

Exam tips

  • E(X) is in the formula booklet.
  • Show the substitution in ∑xP(X=x) before giving the GDC answer.
  • "Expected number in n trials" is n× the probability, and "expected total in n trials" is n×E(X).
  • For "find the prize that makes the game fair", set E(gain)=0 and solve.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
X takes values 1, 2, 3 with probabilities 0.2, 0.5, k. Find k and E(X).
k=0.3; E(X)=2.1
FluencyP2
P(X=x)=x10 for x∈{1,2,3,4}. Find E(X).
1+4+9+1610=3
FluencyP3
E(X)=2.5. Find the expected total of 40 independent values of X.
100
FluencyP4
A game has E(gain)=−0.4 euros. What does this mean?
On average a player loses 40 cents per game.
Problem solvingP5
A game costs $5. Two dice are rolled; a double wins $x, otherwise nothing. Find x for a fair game.
(x−5)16−5·56=0⇒x=30
Problem solvingP6
Two fair 4-sided spinners (1 to 4) are spun; X is the larger score. Find the distribution of X and E(X).
116,316,516,716; E(X)=3.125

6Exam-style questions

Original questions in the style of the IB Maths AI SL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[6 marks]

The number of goals X scored by a team in a match has the distribution below.

x01234
P(X=x)0.150.30.25k0.1

  • (a)Find k.[2]
  • (b)Find E(X).[2]
  • (c)The team plays 38 matches in a season. Find the expected number of goals scored.[2]
(a)
0.15+0.3+0.25+k+0.1=1(M1)
k=0.2A1
(b)
0(0.15)+1(0.3)+2(0.25)+3(0.2)+4(0.1)(M1)
1.8A1
(c)
38×1.8(M1)
68.4 goalsA1
Question 2Paper 1[5 marks]

A game costs $5 to play. Two fair dice are rolled. If they show a double, the player wins $x; otherwise the player wins nothing.

  • (a)Write down the probability of rolling a double.[1]
  • (b)Find the value of x for which the game is fair.[4]
(a)
16A1
(b)
gains x−5 and −5(M1)
(x−5)16+(−5)56=0(M1)(A1)
x=30A1
Question 3Paper 2[6 marks]

Two fair four-sided spinners, each numbered 1 to 4, are spun. X is the larger of the two scores (or the common score if they are equal).

  • (a)Show that P(X=4)=716.[2]
  • (b)Find the probability distribution of X.[2]
  • (c)Find E(X).[2]
(a)
sample space of 16 outcomes; 7 contain a 4M1
716AG A1
(b)
116, 316, 516, 716 for x=1,2,3,4A2
(c)
1+6+15+2816(M1)
3.125A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you're scoring well above, try these real IB Maths AI SL questions. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
May 2024 · TZ1 · Paper 1Q12Spinner fundraiser: expected winnings, find k★★★
Nov 2024 · TZ1 · Paper 1Q11Fair game with win, draw and loss points★★☆
May 2023 · TZ2 · Paper 1Q12Target hits: find k, decide whether the game is fair★☆☆
May 2026 · TZ3 · Paper 1Q11Dice game: distribution, E(Y), when to stop★☆☆
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake