Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Applications and Interpretation
  3. ›4 Statistics and probability
  4. ›4.7 Discrete random variables

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.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A random variable turns each outcome into a number
  1. 1A random variable turns each outcome into a number
  2. 2A probability distribution lists every value with its probability
  3. 3The expected value is the long-run mean of a random variable
  4. 4Variance measures how widely the values are spread
  5. 5Expected value helps decide whether a game is fair
  6. Check your recall
  7. Practice: 10 questions
1

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 XXX, and write its values as lower-case xxx.

A discrete random variable takes only separate, countable values, usually whole numbers. The number of heads is discrete. For two coins, P(X=1)=12P(X=1)=\frac12P(X=1)=21​, 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 P(X=x)P(X=x)P(X=x) for the probability that XXX takes the value xxx.

Key terms · tap one for its definition

random variable

A random variable, written XXX, 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 1 done

2

Part 2 of 5: A probability distribution lists every value with its probability

A probability distribution gives the probability of every possible value of XXX. 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 xxx, and the next lists P(X=x)P(X=x)P(X=x).

Number of heads when two fair coins are tossed

xxx012
P(X=x)P(X=x)P(X=x)14\frac1441​12\frac1221​14\frac1441​
$x$
P(X=x)P(X=x)P(X=x)
0
14\frac1441​
1
12\frac1221​
2
14\frac1441​

Two rules always hold. Each probability lies between 0 and 1. All the probabilities add to 1, so ∑P(X=x)=1\sum P(X=x)=1∑P(X=x)=1. The coin table shows this: 14+12+14=1\frac14+\frac12+\frac14=141​+21​+41​=1. This sum rule is the quickest way to find an unknown probability.

Worked example

Finding a missing probability

A spinner gives a score XXX with P(X=1)=0.1P(X=1)=0.1P(X=1)=0.1, P(X=2)=0.2P(X=2)=0.2P(X=2)=0.2, P(X=3)=kP(X=3)=kP(X=3)=k and P(X=4)=0.3P(X=4)=0.3P(X=4)=0.3. Find kkk.
  1. 1
    The probabilities must add to 1: 0.1+0.2+k+0.3=10.1+0.2+k+0.3=10.1+0.2+k+0.3=1.
  2. 2
    Simplify: 0.6+k=10.6+k=10.6+k=1.
  3. 3
    Solve: k=1−0.6=0.4k=1-0.6=0.4k=1−0.6=0.4.

Answer: k=0.4k=0.4k=0.4.

Key term

probability distribution

A probability distribution is a list or table giving P(X=x)P(X=x)P(X=x) for every possible value xxx of a random variable.

Part 2 done

Quick check

One question on the part you just read

Easy

Identify the quantity that is a discrete random variable.
Show answer and explanation

Answer: B · Worked explanation

The number of goals takes separate, countable values such as 0, 1 or 2, and it depends on chance. Height, time and mass can take any value within a range, so they are not discrete. Height is a tempting answer because it varies by chance, but it is not countable.
3

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, E(X)E(X)E(X). Multiply each value by its probability, then add the results: E(X)=∑xP(X=x)E(X)=\sum xP(X=x)E(X)=∑xP(X=x).

Worked example

Calculating an expected value

Find E(X)E(X)E(X) for the spinner. Scores 1, 2, 3 and 4 have probabilities 0.1, 0.2, 0.4 and 0.3.
  1. 1
    Multiply each score by its probability: 1(0.1)1(0.1)1(0.1), 2(0.2)2(0.2)2(0.2), 3(0.4)3(0.4)3(0.4) and 4(0.3)4(0.3)4(0.3).
  2. 2
    Add the results: 0.1+0.4+1.2+1.2=2.90.1+0.4+1.2+1.2=2.90.1+0.4+1.2+1.2=2.9.

Answer: E(X)=2.9E(X)=2.9E(X)=2.9.

Figure 1. The tallest bar is at 3, so the mean of 2.9 sits close to it. The mean falls between possible scores.

The expected value need not be a possible value of XXX. 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.

Common mistake

Do not divide by the number of values. The probabilities already act as weights, so you only add the products.

Key term

expected value

The expected value E(X)E(X)E(X) of a discrete random variable is the sum of each value multiplied by its probability, ∑xP(X=x)\sum xP(X=x)∑xP(X=x).

Part 3 done

4

Part 4 of 5: Variance measures how widely the values are spread

Two distributions can share a mean but differ in spread. The variance, Var(X)\mathrm{Var}(X)Var(X), measures spread about the mean μ=E(X)\mu=E(X)μ=E(X). A convenient form is Var(X)=E(X2)−[E(X)]2\mathrm{Var}(X)=E(X^2)-[E(X)]^2Var(X)=E(X2)−[E(X)]2, where E(X2)=∑x2P(X=x)E(X^2)=\sum x^2P(X=x)E(X2)=∑x2P(X=x).

The standard deviation, σ\sigmaσ, 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 E(X)E(X)E(X) first, then E(X2)E(X^2)E(X2), then subtract. This order keeps the working short and clear.

Worked example

Calculating variance

Find the variance and standard deviation for the spinner, where E(X)=2.9E(X)=2.9E(X)=2.9.
  1. 1
    Find E(X2)=12(0.1)+22(0.2)+32(0.4)+42(0.3)E(X^2)=1^2(0.1)+2^2(0.2)+3^2(0.4)+4^2(0.3)E(X2)=12(0.1)+22(0.2)+32(0.4)+42(0.3).
  2. 2
    E(X2)=0.1+0.8+3.6+4.8=9.3E(X^2)=0.1+0.8+3.6+4.8=9.3E(X2)=0.1+0.8+3.6+4.8=9.3.
  3. 3
    Var(X)=9.3−2.92=9.3−8.41=0.89\mathrm{Var}(X)=9.3-2.9^2=9.3-8.41=0.89Var(X)=9.3−2.92=9.3−8.41=0.89.
  4. 4
    σ=0.89≈0.943\sigma=\sqrt{0.89}\approx0.943σ=0.89​≈0.943.

Answer: The variance is 0.89 and the standard deviation is σ≈0.943\sigma\approx0.943σ≈0.943.

Exam tip

A calculator can check your work. Enter the values xxx with their probabilities as a frequency list.

Key terms · tap one for its definition

variance

The variance, Var(X)\mathrm{Var}(X)Var(X), is the expected value of the squared deviation from the mean, E[(X−μ)2]E\big[(X-\mu)^2\big]E[(X−μ)2].

standard deviation

The standard deviation, σ\sigmaσ, is the positive square root of the variance, measured in the same units as XXX.

Part 4 done

Quick check

One question on the part you just read

Easy

State the sum of all the probabilities in a probability distribution.
Show answer and explanation

Answer: D · Worked explanation

Exactly one value of XXX must occur, so the probabilities cover every possibility and add to 1, written ∑P(X=x)=1\sum P(X=x)=1∑P(X=x)=1. The sum is not the number of values, and it is not the expected value. The expected value multiplies each probability by its value, so it changes with the distribution.
5

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?

A game costs £3 to play. The prize XXX in pounds is 0 with probability 0.5, 2 with probability 0.3 and 10 with probability 0.2. Determine whether the game is fair.
  1. 1
    Find the expected prize: E(X)=0(0.5)+2(0.3)+10(0.2)E(X)=0(0.5)+2(0.3)+10(0.2)E(X)=0(0.5)+2(0.3)+10(0.2).
  2. 2
    E(X)=0+0.6+2.0=2.6E(X)=0+0.6+2.0=2.6E(X)=0+0.6+2.0=2.6.
  3. 3
    Expected gain === expected prize −-− cost =2.6−3=−0.4=2.6-3=-0.4=2.6−3=−0.4.

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.

Exam tip

State the sign and the units of the expected gain, then say who the game favours.

Key term

fair game

A fair game is a game whose expected gain, the expected winnings minus the cost to play, is zero.

Note read

Check your recall[15 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 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. 2.Determine[4 marks]

    Determine kkk and E(X)E(X)E(X) for a random variable XXX with P(X=1)=0.2P(X=1)=0.2P(X=1)=0.2, P(X=2)=0.3P(X=2)=0.3P(X=2)=0.3, P(X=3)=kP(X=3)=kP(X=3)=k and P(X=4)=0.1P(X=4)=0.1P(X=4)=0.1.

    Show mark schemeHide mark scheme

    Model answer

    The probabilities add to 1, so 0.2+0.3+k+0.1=10.2+0.3+k+0.1=10.2+0.3+k+0.1=1 and k=0.4k=0.4k=0.4. Then E(X)=1(0.2)+2(0.3)+3(0.4)+4(0.1)=0.2+0.6+1.2+0.4=2.4E(X)=1(0.2)+2(0.3)+3(0.4)+4(0.1)=0.2+0.6+1.2+0.4=2.4E(X)=1(0.2)+2(0.3)+3(0.4)+4(0.1)=0.2+0.6+1.2+0.4=2.4.

    • 1 mark for using the fact that the probabilities add to 1
    • 1 mark for obtaining k=0.4k=0.4k=0.4
    • 1 mark for multiplying each value by its probability and adding
    • 1 mark for obtaining E(X)=2.4E(X)=2.4E(X)=2.4
  3. 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. 4.Calculate[3 marks]

    Calculate Var(X)\mathrm{Var}(X)Var(X) for a random variable with E(X)=2.4E(X)=2.4E(X)=2.4 and distribution P(X=1)=0.2P(X=1)=0.2P(X=1)=0.2, P(X=2)=0.3P(X=2)=0.3P(X=2)=0.3, P(X=3)=0.4P(X=3)=0.4P(X=3)=0.4, P(X=4)=0.1P(X=4)=0.1P(X=4)=0.1.

    Show mark schemeHide mark scheme

    Model answer

    E(X2)=1(0.2)+4(0.3)+9(0.4)+16(0.1)=6.6E(X^2)=1(0.2)+4(0.3)+9(0.4)+16(0.1)=6.6E(X2)=1(0.2)+4(0.3)+9(0.4)+16(0.1)=6.6. Then Var(X)=6.6−2.42=6.6−5.76=0.84\mathrm{Var}(X)=6.6-2.4^2=6.6-5.76=0.84Var(X)=6.6−2.42=6.6−5.76=0.84.

    • 1 mark for finding E(X2)=6.6E(X^2)=6.6E(X2)=6.6
    • 1 mark for subtracting [E(X)]2=5.76[E(X)]^2=5.76[E(X)]2=5.76
    • 1 mark for obtaining Var(X)=0.84\mathrm{Var}(X)=0.84Var(X)=0.84
  5. 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 1.50−2=−0.501.50-2=-0.501.50−2=−0.50, 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. 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.

3.

Easy·Identify[1 mark]

Identify the formula for the expected value E(X)E(X)E(X) of a discrete random variable.
Show answer and explanation

Answer: B · Worked explanation

The expected value multiplies each value by its probability and adds the results, so E(X)=∑xP(X=x)E(X)=\sum xP(X=x)E(X)=∑xP(X=x). The expression ∑x2P(X=x)\sum x^2P(X=x)∑x2P(X=x) is E(X2)E(X^2)E(X2), which is used in the variance. Adding the values alone ignores the probabilities, and adding the probabilities only gives 1.
4.

Medium·Calculate[1 mark]

A random variable has P(X=0)=0.15P(X=0)=0.15P(X=0)=0.15, P(X=1)=0.35P(X=1)=0.35P(X=1)=0.35, P(X=2)=kP(X=2)=kP(X=2)=k and P(X=3)=0.25P(X=3)=0.25P(X=3)=0.25. Calculate kkk.
Show answer and explanation

Answer: D · Worked explanation

The probabilities add to 1, so k=1−(0.15+0.35+0.25)=1−0.75=0.25k=1-(0.15+0.35+0.25)=1-0.75=0.25k=1−(0.15+0.35+0.25)=1−0.75=0.25. The value 0.75 is the sum of the other three probabilities, which is the tempting error because it is never subtracted from 1. The value 0.5 leaves out 0.25 when subtracting, so the full set would not add to 1. The value 0.2 does not satisfy the sum rule either.
5.

Medium·Calculate[2 marks]

A random variable has P(X=0)=0.1P(X=0)=0.1P(X=0)=0.1, P(X=1)=0.4P(X=1)=0.4P(X=1)=0.4, P(X=2)=0.3P(X=2)=0.3P(X=2)=0.3 and P(X=3)=0.2P(X=3)=0.2P(X=3)=0.2. Calculate E(X)E(X)E(X).
Show answer and explanation

Answer: B · Worked explanation

E(X)=0(0.1)+1(0.4)+2(0.3)+3(0.2)=0+0.4+0.6+0.6=1.6E(X)=0(0.1)+1(0.4)+2(0.3)+3(0.2)=0+0.4+0.6+0.6=1.6E(X)=0(0.1)+1(0.4)+2(0.3)+3(0.2)=0+0.4+0.6+0.6=1.6. The value 1.5 is the plain mean of the values 0, 1, 2 and 3, which ignores their different probabilities. The value 6 only adds the values, and 0.25 is the mean of the probabilities, which says nothing about the scores.
6.

Medium·Calculate[2 marks]

A random variable has E(X)=3E(X)=3E(X)=3 and E(X2)=10.4E(X^2)=10.4E(X2)=10.4. Calculate Var(X)\mathrm{Var}(X)Var(X).
Show answer and explanation

Answer: C · Worked explanation

Use Var(X)=E(X2)−[E(X)]2\mathrm{Var}(X)=E(X^2)-[E(X)]^2Var(X)=E(X2)−[E(X)]2 with E(X)=3E(X)=3E(X)=3 and E(X2)=10.4E(X^2)=10.4E(X2)=10.4, so Var(X)=10.4−32=10.4−9=1.4\mathrm{Var}(X)=10.4-3^2=10.4-9=1.4Var(X)=10.4−32=10.4−9=1.4. The value 7.4 subtracts E(X)E(X)E(X) instead of its square. The value 19.4 adds the square instead of subtracting it, and 4.4 subtracts 2×32\times32×3, which is not part of the formula.
7.

Medium·Determine[2 marks]

A game costs £4 to play. The prize is £0 with probability 0.6, £5 with probability 0.3 and £10 with probability 0.1. Determine the expected gain for a player.
Show answer and explanation

Answer: C · Worked explanation

The expected prize is 0(0.6)+5(0.3)+10(0.1)=0+1.5+1.0=2.50(0.6)+5(0.3)+10(0.1)=0+1.5+1.0=2.50(0.6)+5(0.3)+10(0.1)=0+1.5+1.0=2.5 pounds. Expected gain is 2.5−4=−1.52.5-4=-1.52.5−4=−1.5, a loss of £1.50 per game. The value £2.50 is the expected prize and ignores the cost. A positive £1.50 comes from reversing the subtraction, and −£4.00 ignores the prizes altogether.
8.

Hard[2 marks]

A spinner scores 1, 2, 3 or 4, and E(X)=2.9E(X)=2.9E(X)=2.9. Which conclusion is correct?
Show answer and explanation

Answer: D · Worked explanation

The expected value is the long-run average, so over many spins the mean score settles near 2.9. It is not a possible score, so no single spin gives 2.9. Spins are independent, so earlier results do not force the next score to balance them, and rounding does not make every spin score 3.
9.

Hard[2 marks]

A random variable has P(X=0)=0.5P(X=0)=0.5P(X=0)=0.5, P(X=2)=0.3P(X=2)=0.3P(X=2)=0.3 and P(X=4)=0.2P(X=4)=0.2P(X=4)=0.2. Calculate Var(X)\mathrm{Var}(X)Var(X).
Show answer and explanation

Answer: D · Worked explanation

First E(X)=0(0.5)+2(0.3)+4(0.2)=1.4E(X)=0(0.5)+2(0.3)+4(0.2)=1.4E(X)=0(0.5)+2(0.3)+4(0.2)=1.4. Then E(X2)=0+4(0.3)+16(0.2)=1.2+3.2=4.4E(X^2)=0+4(0.3)+16(0.2)=1.2+3.2=4.4E(X2)=0+4(0.3)+16(0.2)=1.2+3.2=4.4, so Var(X)=4.4−1.42=4.4−1.96=2.44\mathrm{Var}(X)=4.4-1.4^2=4.4-1.96=2.44Var(X)=4.4−1.42=4.4−1.96=2.44. The value 3.00 subtracts 1.4 without squaring it. The value 4.40 is E(X2)E(X^2)E(X2) alone, and 6.36 adds the square instead of subtracting it. Both slips ignore the formula for variance, and a variance can never be negative.
10.

Hard[2 marks]

A game costs ccc pounds to play. The prize is £12 with probability 0.25 and £0 otherwise. Determine the value of ccc that makes the game fair.
Show answer and explanation

Answer: B · Worked explanation

A fair game has an expected gain of zero, so the cost equals the expected prize: c=12×0.25=3c=12\times0.25=3c=12×0.25=3. The cost is therefore £3. The value £12 is the prize itself, and £9 is the prize multiplied by the probability of winning nothing. The value £48 comes from dividing 12 by 0.25.

Keep going

Next topic4.8 Binomial distributionPrevious topic4.6 Combined events and diagrams

More in Topic 4 · Statistics and probability

  1. 4.3Measures of central tendency and spreadNotes · 10 questions
  2. 4.4Correlation and regressionNotes · 10 questions
  3. 4.5Probability conceptsNotes · 10 questions
  4. 4.6Combined events and diagramsNotes · 10 questions
  5. 4.7Discrete random variablesNotes · 10 questions
  6. 4.8Binomial distributionNotes · 10 questions
  7. 4.9Normal distributionNotes · 10 questions
  8. 4.10Spearman's rank correlationNotes · 10 questions
  9. 4.11Chi-squared and t-testsNotes · 10 questions

All IB Mathematics: Applications and Interpretation topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1A random variable turns each outcome into a number
  2. 2A probability distribution lists every value with its probability
  3. 3The expected value is the long-run mean of a random variable
  4. 4Variance measures how widely the values are spread
  5. 5Expected value helps decide whether a game is fair
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe