Skip to content
IB Diploma ProgrammeSL & HL

Discrete random variables

Mathematics: Applications and Interpretation SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Discrete random variables notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Discrete random variables notes as text: skim, search, and jump between subtopics.

~13 min read

1. Probability distributions

A discrete random variable X takes separate values x. A probability distribution gives P(X =x) for every value, as a table or as a formula such as P(X =x) = 1/18(4 +x) for x ∈ {1, 2, 3}.

Every probability is between 0 and 1, and the probabilities add to 1. This finds a missing probability: the markscheme credits an attempt to subtract the sum of their probabilities from 1.

When a probability is given as a multiple of another, write it as that product first, such as 0.002 × 6. The markscheme credits that working before the value.

sum P(X = x) = 1

0 ≤ P(X = x) ≤ 1

Worked example 14 marks

Mathilda works at a local service station that sells lottery scratchcards. Each scratchcard costs textdollar1. The prizes, and the probability of winning each prize according to the lottery company, are given in the following table.

(a) Given that the probability of winning textdollar5 is six times the probability of winning textdollar100 for each scratchcard, find the value of(i) a.(ii) b.

Prize (textdollar)02510100500
Probabilityb0.085a0.0040.0020.001
  1. 1

    (A1): the probability of winning textdollar5 is 6 × 0.002 [1]

  2. 2

    A1: a = 0.012 [1]

  3. 3

    (M1): attempt to subtract sum of their probabilities from 1 [1]

  4. 4

    A1: b = 1 - (0.085 + 0.012 + 0.004 + 0.002 + 0.001) = 0.896 [1]

2. Expected value

The expected value (mean) of X is E(X). Multiply each value by its probability, then add. The markscheme credits an attempt to use the expectation formula.

A value can be an expression. If an outcome loses all of Hailey's x points, its value is -x, so E(Y) is an expression in x.

Here every probability is 1/6, so the markscheme adds the values and divides by 6. With unequal probabilities, multiply each value by its own probability. Follow-through marks are not allowed if the value of b is not a function of x.

E(X) = sum x P(X = x)

Worked example 15 marks

Hailey is playing a game in which a die is rolled. Each time Hailey rolls the die she receives the number she rolls as points, but if she rolls a 2 she instead loses all her points.

The following table shows the distribution of Y, where Y is the amount of points Hailey could receive when she already has x points.

(a) Write down(i) the value of a.(ii) an expression for b in terms of x.

(b) Find an expression for E(Y).

Before each roll of the die, Hailey has the choice to stop playing the game and keep all her points, or to continue playing and risk losing all her points. Hailey decides to stop when E(Y) < 0.

(c) Find the least number of points Hailey could have when she decides to stop.

Number on the die123456
Points received (y)ab3456
P(Y = y)1/61/61/61/61/61/6
  1. 1

    A1: (a)(i) a = 1 [1]

  2. 2

    A1: (a)(ii) b = -x [1]

  3. 3

    (M1):(b) attempt to use the expectation formula [1]

  4. 4

    A1: E(Y) = (1 + 3 + 4 + 5 + 6 - x)/6 = (19 - x)/6 [1]

  5. 5

    A1:(c) (19 - x)/6 < 0 gives x > 19, so the least number of points is x = 20 [1]

3. Fair games and expected gain

A game is fair when the expected gain of the player is zero: E(X) = 0, where X is the gain. Prizes and the cost of playing are both in the question, so compare them.

The markscheme credits an attempt to multiply probabilities by prize values. Then compare the expected prize with the cost of one play.

The R1 is awarded only if 0.97 ≠ 1, 1 - 0.97 = 0.03 or E(X) = -0.03 is seen. Then write the conclusion: therefore the game is not fair.

expected gain = E(prize) - cost

fair game iff E(X) = 0

Worked example 14 marks

Mathilda works at a local service station that sells lottery scratchcards. Each scratchcard costs textdollar1. The prizes, and the probability of winning each prize according to the lottery company, are given in the following table.

From part (a), a = 0.012 and b = 0.896.

(b) Determine whether a scratchcard represents a fair game. Justify your answer.

Prize (textdollar)02510100500
Probability0.8960.0850.0120.0040.0020.001
  1. 1

    (M1): attempt to multiply probabilities by prize values [1]

  2. 2

    (A1): 0.896 × 0 + 0.085 × 2 + 0.012 × 5 + 0.004 × 10 + 0.002 × 100 + 0.001 × 500 [1]

  3. 3

    A1: expectation = 0.97, or E(X) = -0.03 [1]

  4. 4

    R1: 0.97 ≠ 1 or E(X) ≠ 0, therefore the game is not fair [1]

4. Finding a value that makes a game fair

Sometimes the question leaves the cost of playing unknown. The gain is the prize minus the cost, so E(X) = E(prize) - c.

Set E(X) = 0 for a fair game and solve for c. Do not set E(prize) = 0: the prizes are never negative, so that has no solution.

E(prize) - c = 0

Worked example 14 marks

At a school fair, a game costs c dollars to play. A spinner gives a prize of 0, 4 or 10 dollars with the probabilities in the table.

Find the value of c that makes the game fair.

Prize (dollars)0410
Probability0.60.30.1
  1. 1

    M1: expected prize = 0 × 0.6 + 4 × 0.3 + 10 × 0.1 [1]

  2. 2

    A1: expected prize = 1.2 + 1.0 = 2.2 dollars [1]

  3. 3

    M1: the gain is prize - c, so E(X) = 2.2 - c, and a fair game has E(X) = 0 [1]

  4. 4

    A1: c = 2.2, so the game costs 2.20 dollars [1]

Recap

  • A discrete random variable has a probability for each value. The probabilities add to 1, so a missing one is 1 minus the rest.
  • E(X) = sum x P(X = x): multiply each value by its probability, then add.
  • A value can be an expression, such as -x for losing all x points. Keep it as an expression.
  • Expected gain = E(prize) - cost. A fair game has E(X) = 0. Show the comparison, then write the conclusion.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State the sum of all the probabilities in the probability distribution of a discrete random variable.1 mark
    Answer
    1. The probabilities add to 1.

    Trap: Answering 100 or 100%, or the number of values the variable can take.

  2. X has the probability distribution in the table. Find the value of k. | x | 1 | 2 | 3 | 4 | | --- | --- | --- | --- | --- | | P(X = x) | 0.3 | 0.2 | k | 0.1 |2 marks
    Answer
    1. The probabilities add to 1: 0.3 + 0.2 + k + 0.1 = 1.
    2. 0.6 + k = 1, so k = 0.4.

    Trap: Leaving out one of the given probabilities, such as 0.1, which gives k = 0.5.

  3. X has P(X = x) = 1/18(4 + x) for x ∈ {1, 2, 3}. Show that this is a probability distribution.3 marks
    Answer
    1. P(X = 1) = 5/18, P(X = 2) = 6/18, P(X = 3) = 7/18.
    2. Each probability is between 0 and 1.
    3. The sum is (5 + 6 + 7)/18 = 18/18 = 1, as required.

    Trap: Checking that each probability is between 0 and 1 but never adding them to show the total is 1.

  4. X has the distribution in the table. Which is the value of E(X)? A. 1.5  B. 1.6  C. 1.0  D. 0.25 | x | 0 | 1 | 2 | 3 | | --- | --- | --- | --- | --- | | P(X = x) | 0.1 | 0.4 | 0.3 | 0.2 |1 mark
    Answer
    1. E(X) = 0 × 0.1 + 1 × 0.4 + 2 × 0.3 + 3 × 0.2 = 1.6.
    2. The answer is B.
    3. A is the mean of the values 0, 1, 2, 3. C is the sum of the probabilities. D is the mean of the probabilities, 1 ÷ 4.

    Trap: Averaging the values 0, 1, 2, 3 gives 1.5 and ignores the probabilities.

  5. The random variable X has P(X = x) = x/10 for x ∈ {1, 2, 3, 4}. Calculate E(X).3 marks
    Answer
    1. E(X) = 1 × 1/10 + 2 × 2/10 + 3 × 3/10 + 4 × 4/10.
    2. = (1 + 4 + 9 + 16)/10 = 30/10.
    3. E(X) = 3.

    Trap: Dividing the sum sum x P(X = x) by 4 again, as if finding the mean of data, which gives 0.75.

  6. A player pays 2 dollars to roll a fair die and wins 9 dollars for a 6, nothing otherwise. Determine whether the game is fair. Justify your answer.3 marks
    Answer
    1. Expected prize = 9 × 1/6 + 0 × 5/6 = 1.5 dollars.
    2. Expected gain = 1.5 - 2 = -0.5 dollars.
    3. E(X) ≠ 0, therefore the game is not fair.

    Trap: Comparing the expected prize, 1.5, with 0 instead of with the cost of 2 dollars.

  7. Ben has x dollars. He tosses a fair coin: heads, he gains 4 dollars; tails, he loses half his money. (a) Find E(G), his expected gain in dollars, in terms of x. (b) Ben plays only while E(G) > 0. Find the greatest whole number of dollars he can have and still play.4 marks
    Answer
    1. (a)
    2. E(G) = 1/2(4) + 1/2(-x/2) = 2 - x/4.
    3. (b)
    4. 2 - x/4 > 0 gives x < 8.
    5. The greatest whole number is 7.

    Trap: Giving 8: at x = 8 the expected gain is 0, which is not greater than 0.

  8. X has the distribution in the table, and E(X) = 2.8. Find the value of p and the value of q. | x | 1 | 2 | 3 | 4 | | --- | --- | --- | --- | --- | | P(X = x) | 0.1 | p | q | 0.3 |4 marks
    Answer
    1. The probabilities add to 1: 0.1 + p + q + 0.3 = 1, so p + q = 0.6.
    2. E(X) = 0.1 + 2p + 3q + 1.2 = 2.8, so 2p + 3q = 1.5.
    3. Substitute p = 0.6 - q: 1.2 - 2q + 3q = 1.5, so q = 0.3.
    4. Then p = 0.3. Check: 0.1 + 0.6 + 0.9 + 1.2 = 2.8.

    Trap: Writing only the equation from E(X), which has two unknowns and cannot be solved alone.

  9. A one-year phone insurance policy costs c dollars. A policy has a claim of 400 dollars with probability 0.05, a claim of 1000 dollars with probability 0.01, and otherwise none. (a) Write down the probability that a policy has no claim. (b) Find E(X), the company's expected gain per policy in dollars, in terms of c. (c) Determine c for an expected gain of 15 dollars per policy.5 marks
    Answer
    1. (a) 1 - 0.05 - 0.01 = 0.94.
    2. (b) X is c with probability 0.94, c - 400 with probability 0.05, and c - 1000 with probability 0.01.
    3. E(X) = 0.94c + 0.05(c - 400) + 0.01(c - 1000).
    4. = c - 20 - 10 = c - 30.
    5. (c) c - 30 = 15, so c = 45: the policy costs 45 dollars.

    Trap: Working from the customer's side, so the gain becomes 30 - c and 30 - c = 15 gives a wrong price of 15 dollars.

  10. At a fairground stall a player pays 3 dollars and throws one ball. The score X has P(X = x) = k(5 - x) for x ∈ {1, 2, 3, 4}. The prize for each score is given in the table, where a is a constant. (a) Show that k = 0.1. (b) Calculate E(X). (c) Determine the value of a that makes the game fair. | Score x | 1 | 2 | 3 | 4 | | --- | --- | --- | --- | --- | | Prize (dollars) | 0 | 2 | 5 | a |7 marks
    Answer
    1. (a) 4k + 3k + 2k + k = 1, so 10k = 1 and k = 0.1.
    2. (b) The probabilities are 0.4, 0.3, 0.2 and 0.1.
    3. E(X) = 1 × 0.4 + 2 × 0.3 + 3 × 0.2 + 4 × 0.1 = 2.
    4. (c) Expected prize = 0 × 0.4 + 2 × 0.3 + 5 × 0.2 + a × 0.1 = 1.6 + 0.1a.
    5. Expected gain = 1.6 + 0.1a - 3, and a fair game has expected gain 0.
    6. 0.1a = 1.4, so a = 14.
    7. Check: 0.6 + 1 + 1.4 = 3, the cost of one throw.

    Trap: Using the expected score, 2, as the expected prize: the prizes are not the scores, so the expected prize must be built from the prize values.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
the game is not fair, because 0.97 is not 00.97 ≠ 1 or E(X) ≠ 0, therefore the game is not fair, with 0.97 ≠ 1, 1 - 0.97 = 0.03 or E(X) = -0.03 seen
b = 2, the number on the face of the dieb = -x: an expression in x, since the whole score is lost
the least number of points is x > 19, or x = 19x = 20: the least whole number of points with (19 - x)/6 < 0

Frequently asked questions

What must the probabilities in a discrete probability distribution add up to?
The probabilities add up to 1, so a missing probability is 1 minus the sum of the rest. Each probability is between 0 and 1. For 0.3 + 0.2 + k + 0.1 = 1, the value is k = 0.4.
How do you calculate the expected value of a discrete random variable?
Multiply each value by its probability, then add: E(X) = sum x P(X = x). The expected value is the mean of X. If P(X = x) = x/10 for x ∈ {1, 2, 3, 4}, then E(X) = (1 + 4 + 9 + 16)/10 = 3.
How do you decide whether a game is fair?
A game is fair when the expected gain of the player is zero, E(X) = 0, where X is the gain. The expected gain is the expected prize minus the cost of playing. For a die where a 6 wins 9 dollars and the game costs 2 dollars, the expected prize is 1.5 dollars and the expected gain is -0.5 dollars, so the game is not fair.
How do you find the cost that makes a game fair when the cost is unknown?
Set E(X) = 0 for a fair game, so E(prize) - c = 0, and solve for c. Do not set E(prize) = 0, because the prizes are never negative. For an expected prize of 1.2 + 1.0 = 2.2 dollars, c = 2.2, so the game costs 2.20 dollars.
How do you find the expected value when the value of an outcome is an expression?
Keep the value as an expression. If an outcome loses all of Hailey's x points, its value is -x, and E(Y) = (19 - x)/6. Solving (19 - x)/6 < 0 gives x > 19, so the least whole number of points is 20.
What mistakes do students make with discrete probability distributions?
Leaving out one of the given probabilities, such as 0.1, gives k = 0.5 instead of 0.4. Averaging the values 0, 1, 2, 3 gives 1.5 and ignores the probabilities, so use E(X) = sum x P(X = x). Checking that each probability is between 0 and 1 is not enough: add them to show the total is 1.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters