Discrete Random Variables (AI HL)
A discrete random variable takes separate values, each with a probability, and the probabilities always add up to . To use one, list the values and probabilities in a table, find any missing probability by subtracting the others from , then combine them to get the expected value. It covers fair games, where the expected gain is . It's part of the broader Probability & Distributions topic.
12 questions on this sub-topic.
Syllabus
| Code | Syllabus content |
|---|---|
| SL4.7 | Concept of discrete random variables and their probability distributions, given as a table or a formula. Expected value for discrete data, and its applications - including that indicates a fair game where is a player's gain. |
Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).
Skills practised on this page:
- Construct a discrete probability distribution table given a rule or context, using the fact that probabilities sum to 1.
- Calculate the expected value E(X) of a discrete random variable.
- Calculate the variance of a discrete random variable directly from its probability distribution table.
The two formulas
Neither formula is in the formula booklet.
Expected value
Multiply each value of by its probability, then add. This is the long-run average of .
Variance
Find first, then subtract the square of .
Need the full syllabus wording and formula-booklet reference table? See Probability & Distributions. For calculator routines, see the parent topic's GDC guidance.
Key terms
What is a probability distribution?
A probability distribution lists every possible value of with its probability . Each probability lies between and , and together they sum to .
e.g. If , and , then .
What does expected value mean?
The expected value is the long-run mean of over many repeats. It is found by multiplying each value by its probability and adding the results.
e.g. For a fair six-sided die, , even though can never be rolled.
How do you find the variance of a discrete random variable?
Find by squaring each value before weighting it by its probability, then use .
e.g. If and , then and , so .
How do you find the probability of a range of values?
Add the probabilities of every value in the range. Read the inequality carefully: excludes , while includes it.
e.g. If , and , then but .
Worked examples
The distribution of is given in the table.
| 1 | 2 | 3 | 4 | |
| 0.2 | 0.3 | 0.4 |
(a) Find .
(b) Find .
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
A die game pays $5 for a six and costs $1 otherwise.
Find the expected gain per roll.
Worked solution
Roll a six (gain ) with probability roll anything else (gain ) with probability A1
M1A1
The expected gain is per roll, so in the long run the game is fair.On the GDC. Find the expected gain per roll. The calculator shows about 0.
The distribution of is given in the table.
| 0 | 1 | 2 | 3 | |
| 0.1 | 0.3 | 0.4 | 0.2 |
Given , find
Worked solution
M1
A1
M1
A1On the GDC. Find the variance of X. The calculator shows about 0.81.
Common mistakes
- Using when the question means . For a discrete variable, "fewer than 3" is , not - always translate the wording into an inequality before reaching for binomcdf.
- Forgetting the probabilities must sum to 1. Whenever a table has an unknown , the very first line should be an equation setting the sum of all the probabilities equal to - it's easy to jump straight to and skip this check.
- Missing the sign of a loss in . In a game, a cost or loss must be entered as a negative value of - writing it as positive by mistake flips the sign of the whole expected value and can turn a fair game into a winning (or losing) one on paper.
Using your GDC
Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.
The reverse of a normal probability: given a percentage, find the cut-off value (e.g. the mark for the top 10%).
- Work out the area to the LEFT of the value you want.
- 2nd → VARS (DISTR) → invNorm(area, μ, σ). Newer OS lets you pick the tail.TI-84
- menu → Probability → Distributions → Inverse Normal; enter the area, μ and σ.Nspire
- Main menu → Statistics → DIST → NORM → InvN; set the tail and enter area, σ, μ.Casio
Tip: invNorm needs the area to the LEFT. For "top 10%", use area = 0.90; for "bottom 25%", use area = 0.25.
Given a probability and one parameter, work back to the missing or - a standard exam twist.
- Turn the probability into a -value using the inverse normal with , .
- invNorm(area-to-left, 0, 1) gives ; then solve for the unknown.TI-84
- Use Inverse Normal with , to get , then solve the standardising equation for or .Nspire
- DIST → NORM → InvN with , gives ; substitute into .Casio
- If two probabilities are given, form two equations and solve them simultaneously for and .
Tip: Always sketch the curve first so you can tell which side of the mean each value should fall on.
See the full GDC guide for more calculator models and topics.
Quick questions
What is the formula for the expected value of a discrete random variable?
- multiply each value of by its probability and add the results.
What does E(X) = 0 mean in a game?
If is a player's gain and , the game is fair - in the long run a player expects to neither win nor lose money.
How do I find the expected gain in a game with a cost to play?
Record each outcome as a net gain, so a prize of $5 with an entry fee of $2 gives a net gain of $3, and a lost game gives a net gain of -$2. Then find from those net values.
Can an expected value be a number the variable cannot take?
Yes. The expected value is a long-run average, so it need not be a possible value of . A fair die has , which is never rolled.
What should I check if my probabilities do not add up to 1?
Recheck the arithmetic and any probability found by subtraction. Every must lie between and , so a negative value for a missing probability means an earlier probability is wrong.
Ready to practise properly?
12 discrete-random-variable questions, marked instantly like the real exam.