Discrete Random Variables (AI HL)

A discrete random variable takes a finite (or countable) set of values, each with its own probability, usually laid out as a table or a formula. This page covers how to find a missing probability, how to calculate the expected value \(E(X)\), and what it means when \(E(X)=0\) in a game - with worked examples and the mistakes that lose the most marks. It's part of the broader Probability & Distributions topic.

12 questions on this sub-topic.

Practise discrete random variables → Try exam-style questions

The two formulas

Covered under IB syllabus reference SL4.7: the concept of discrete random variables and their probability distributions, and expected value \(E(X)\) for discrete data - including that \(E(X)=0\) indicates a fair game where \(X\) is a player's gain. Neither formula is in the formula booklet.

Expected value

\(E(X) = \Sigma xP(X=x)\)

Multiply each value of \(X\) by its probability, then add. This is the long-run average of \(X\).

Variance

\(\text{Var}(X) = E(X^2)-[E(X)]^2\)

Find \(E(X^2) = \Sigma x^2P(X=x)\) first, then subtract the square of \(E(X)\).

Need the full syllabus wording and formula-booklet reference table? See Probability & Distributions. For calculator routines, see the parent topic's GDC guidance.

Worked examples

1
Easy
No calc
[3 marks]

The distribution of \(X\) is given in the table.

\(x\)1234
\(P(X=x)\)0.20.30.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) = 0.2 + 0.6 + 1.2 + 0.4 M1
= 2.4 A1

A1 P-value M1 E(X) formula A1 Answer
2
Medium
GDC
[4 marks]

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

A1 Payoffs and probabilities M1 Apply \(E(X)=\sum x\,P(x):\) A1 Expectation set-up and value R1 Interpretation

Common mistakes

Ready to practise properly?

11 discrete-random-variable questions, marked instantly like the real exam.

Quick answers

What is the formula for the expected value of a discrete random variable?

\(E(X) = \Sigma xP(X=x)\) - multiply each value of \(X\) by its probability and add the results.

What does E(X) = 0 mean in a game?

If \(X\) is a player's gain and \(E(X) = 0\), the game is fair - in the long run a player expects to neither win nor lose money.

← Back to Applications & Interpretation HL topics