Skip to content
Cambridge AS & A Level9709

Discrete random variables

Mathematics 9709 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.

~15 min read

1. Probability distribution tables

A probability distribution table lists each value x that X can take with its probability P(X = x).

The probabilities sum to 1. When they contain a constant k, use this to find k. If the question asks for the table in terms of k, stop there. Otherwise give numerical fractions, not multiples of k.

sum P(X = x) = 1

P(X = x) = kx² ⇒ sum kx² = 1 gives k

Examiner insight

“A significant number of candidates gave the probabilities in their table as multiples of k instead of as numerical fractions.” “Weaker solutions included probabilities in the table which did not sum to 1, or were negative.”

Worked example 13 marks

The random variable X takes the values -2, 1, 2, 3. It is given that P(X =x) = kx², where k is a constant. Draw up the probability distribution table for X, giving the probabilities as numerical fractions.

  1. 1

    probabilities sum to 1: 4k + k + 4k + 9k = 18k = 1 [1]

  2. 2

    k = 1/18 [1]

  3. 3

    P(X=-2) = 4/18, P(X=1) = 1/18, P(X=2) = 4/18, P(X=3) = 9/18 [1]

2. Expectation and variance from a table

E(X) is the sum of each value multiplied by its probability. Var(X) is the mean of the squares minus the square of the mean.

Write the unsimplified expression for each before evaluating it, so one slip in the arithmetic still earns the method mark. A bare variance with no working does not earn full credit.

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

Var(X) = sum x² P(X = x) - [E(X)]²

Examiner insight

“Weaker solutions failed to subtract the square of the given expected value.” “It is important that candidates are aware that problems involving syllabus content do require clear supporting work, and simply stating the variance value will not gain full credit.”

Worked example 13 marks

The random variable X takes the values -2, 2 and 3. It is given that P(X =x) = k(x² - 1), where k is a constant. Find E(X) and Var(X).

  1. 1

    3k + 3k + 8k = 1, so k = 1/14 and the probabilities are 3/14, 3/14, 8/14

  2. 2

    E(X) = -2 × 3/14 + 2 × 3/14 + 3 × 8/14 = 12/7 [1]

  3. 3

    sum x² P(X =x) = 4 × 3/14 + 4 × 3/14 + 9 × 8/14 = 48/7 [1]

  4. 4

    Var(X) = 48/7 - (12/7)² = 192/49 [1]

3. Unknown probabilities in a table

Two unknown probabilities need two equations. One is that the probabilities sum to 1. The other comes from a given E(X), or from a stated relation such as P(X ≥ 0) = 3P(X < 0).

Solve the pair simultaneously and show the working. Do not guess a relation between the unknowns that the question has not given.

sum P(X = x) = 1

E(X) = given value

Examiner insight

“Weaker candidates often correctly stated the expression for E(X) and then attempted to solve this, often assuming p = q to form an equation in one unknown.” “If a calculator was used, the equations needed to be prepared in the same format, ideally with the unknowns on one side of the = sign and the constant on the other, with this being evidenced in the answer space.”

Worked example 14 marks

The probability distribution table for a random variable X is given below. Given that E(X) = 0.28, find the value of p and the value of q.

x−2−10.512
P(X = x)0.12pq0.160.3
  1. 1

    sum of probabilities: 0.12 + p + q + 0.16 + 0.3 = 1, so p + q = 0.42 [1]

  2. 2

    E(X): -2(0.12) - p + 0.5q + 0.16 + 2(0.3) = 0.28, so -p + 0.5q = -0.24 [1]

  3. 3

    solve the two equations simultaneously [1]

  4. 4

    q = 0.12 and p = 0.3 [1]

4. The binomial distribution B(n, p)

Use the binomial distribution B(n,p) when a fixed number of trials, n, is made, each with the same probability p of success. X is the number of successes. Write q = 1 - p.

Turn the wording into a probability statement before you calculate. ‘At least 3’ means X ≥ 3, which is 1 - P(X ≤ 2). Keep full accuracy in the working and round only the final answer.

X ∼ B(n, p)

P(X = r) = dbinomnr p^(r)q^(n-r), r = 0, 1, …, n

P(X ≥ r) = 1 - P(X ≤ r - 1)

Examiner insight

“Again, the interpretation of the context condition was challenging for many, with ‘at least three times’ being treated as more than three times.” “Premature approximation was noted as a common inaccurate answer of 0.224 was seen following a correct unsimplified expression.”

Worked example 13 marks

A fair six-sided die, with faces marked 1, 2, 3, 4, 5, 6, is thrown 10 times. Find the probability that a 4 is obtained at least 3 times.

  1. 1

    X ∼ B(10, 1/6) and P(X ≥ 3) = 1 - P(X ≤ 2) [1]

  2. 2

    1 - [(5/6)¹⁰ + dbinom1011/6(5/6)⁹ + dbinom102(1/6)²(5/6)⁸] [1]

  3. 3

    = 1 - (0.16151 + 0.32301 + 0.29071) = 0.225 [1]

5. Mean and variance of B(n, p); mean of Geo(p)

For X ∼ B(n, p), the expectation is np and the variance is npq. For X ∼ Geo(p), the expectation is 1/p. Proofs are not required.

The mean of a geometric distribution is the reciprocal of the probability of success. It is not the probability itself.

X ∼ B(n, p): E(X) = np, Var(X) = npq

X ∼ Geo(p): E(X) = 1/p

Examiner insight

“A significant minority simply stated their probability of throwing a 5.”

Worked example 14 marks

Each seed germinates with probability 0.8, independently of the others.

(a) 60 seeds are planted. The number that germinate is X. Find E(X) and Var(X).

(b) Seeds are planted one at a time until one fails to germinate. Find the expected number of seeds planted.

  1. 1

    (a) X ∼ B(60, 0.8) with q = 0.2 [1]

  2. 2

    E(X) = np = 60 × 0.8 = 48 [1]

  3. 3

    Var(X) = npq = 60 × 0.8 × 0.2 = 9.6 [1]

  4. 4

    (b) failure has probability 0.2, so the mean is 1/0.2 = 5 [1]

6. The geometric distribution Geo(p)

Use the geometric distribution Geo(p) when trials are repeated until the first success. X is the number of the trial on which the first success occurs.

The first r - 1 trials are failures and trial r is a success. This is q^(r-1)p. Read the context with care: an ‘ordinary fair die’ has six faces.

X ∼ Geo(p)

P(X = r) = p q^(r-1), r = 1, 2, 3, …

E(X) = 1/p

Examiner insight

“A significant minority attempted to use the binomial distribution without success.” “Several candidates interpreted the context of ‘an ordinary fair die’ as a ‘die with 5 sides’.”

Worked example 15 marks

An ordinary fair die is thrown repeatedly until a 5 is obtained. The number of throws taken is denoted by the random variable X.

(a) Write down the mean of X.

(b) Find the probability that a 5 is first obtained after the 3rd throw but before the 8th throw.

(c) Find the probability that a 5 is first obtained in fewer than 10 throws.

  1. 1

    (a) X ∼ Geo(1/6), so the mean is 1/p = 6 [1]

  2. 2

    (b) first 5 on throw 4, 5, 6 or 7: (5/6)³1/6 + (5/6)⁴1/6 + (5/6)⁵1/6 + (5/6)⁶1/6 [1]

  3. 3

    = 0.300 [1]

  4. 4

    (c) fewer than 10 throws means X ≤ 9: 1 - (5/6)⁹ [1]

  5. 5

    = 0.806 [1]

7. Limits and tail probabilities for Geo(p)

To fail on the first r trials is q^(r), so P(X >r) = q^(r). Then P(X ≤r) = 1 - q^(r). These replace a long sum.

Read each limit word with care. ‘Fewer than 6’ is X ≤ 5. ‘More than 8’ is X > 8, not X = 8. For ‘either 10 or 11’, add two probabilities.

P(X > r) = q^(r) P(X ≤ r) = 1 - q^(r)

P(a < X ≤ b) = q^(a) - q^(b)

Examiner insight

“The most common error was interpreting ‘fewer than six throws’ to include throw 6.” “There was some confusion about the difference between 3 decimal places and 3 significant figures and the rounded answer of 0.043 was seen frequently.”

Worked example 15 marks

An ordinary fair die is thrown until a 6 is obtained.

(a) Find the probability that obtaining a 6 takes more than 8 throws.

Two ordinary fair dice are thrown together until a pair of 6s is obtained. The number of throws taken is denoted by the random variable X.

(b) Find the expected value of X.

(c) Find the probability that obtaining a pair of 6s takes either 10 or 11 throws.

  1. 1

    (a) more than 8 throws means eight failures: (5/6)⁸ [1]

  2. 2

    = 0.233 [1]

  3. 3

    (b) p = 1/36, so E(X) = 36 [1]

  4. 4

    (c) P(X = 10) + P(X = 11) = (35/36)⁹1/36 + (35/36)¹⁰1/36 [1]

  5. 5

    = 0.0425 [1]

8. Choosing between B(n, p) and Geo(p)

Ask what ends the trials. A fixed number of trials (‘thrown 10 times’) is binomial. Trials that go on until a success are geometric. One question can use both.

For the kth success on trial n, the first n - 1 trials hold exactly k - 1 successes. That is a binomial probability. Then multiply by p for the success on trial n.

P(kth success on trial n) = dbinomn-1k-1 p^(k) q^(n-k)

Examiner insight

“Many solutions used the geometric approximation again, which was not appropriate.”

Worked example 14 marks

A fair six-sided dice with faces labelled 1, 2, 3, 4, 5, 6 is thrown repeatedly until a 6 is obtained.

(a) Find the probability that a 6 is obtained for the first time on the 8th throw.

(b) Find the probability that a 6 is obtained for the third time on the 7th throw.

  1. 1

    (a) (5/6)⁷1/6 = 0.0465 [1]

  2. 2

    (b) the first 6 throws hold exactly two 6s: dbinom62(1/6)²(5/6)⁴ [1]

  3. 3

    multiply by 1/6 for the 6 on the 7th throw: dbinom62(1/6)³(5/6)⁴ [1]

  4. 4

    = 0.0335 [1]

Recap

  • A table's probabilities sum to 1. Use this to find k, then give numerical fractions.
  • E(X) = sum xP(X=x). Var(X) = sum x²P(X=x) - [E(X)]². Write the unsimplified working.
  • Two unknown probabilities: sum = 1 plus a second condition. Solve simultaneously. Never assume p = q.
  • B(n,p): fixed n, same p. P(X=r) = binomnrp^(r)q^(n-r). E(X) = np, Var(X) = npq.
  • Geo(p): until the first success. P(X=r) = pq^(r-1). E(X) = 1/p.
  • Geometric tails: P(X>r) = q^(r) and P(X≤ r) = 1-q^(r). Fewer than 6 is X ≤ 5.
  • ‘Thrown 10 times’ is binomial. ‘Until’ is geometric. The kth success on trial n is binomn-1k-1p^(k)q^(n-k).

End-of-chapter exercise

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

  1. The random variable X has the probability distribution given below. Find p and E(X). | x | 1 | 2 | 3 | 4 | | --- | --- | --- | --- | --- | | P(X = x) | 0.1 | 0.3 | p | 0.2 |2 marks
    Answer
    1. p = 1 - (0.1 + 0.3 + 0.2) = 0.4.
    2. E(X) = 1(0.1) + 2(0.3) + 3(0.4) + 4(0.2) = 0.1 + 0.6 + 1.2 + 0.8 = 2.7.

    Trap: Dividing the sum sum xP(X=x) by 4: the probabilities already do the weighting.

  2. The number of customers out of 40 who pay by card is X, where X ∼ B(40, 0.15). Find E(X) and Var(X).3 marks
    Answer
    1. E(X) = np = 40 × 0.15 = 6.
    2. q = 1 - 0.15 = 0.85.
    3. Var(X) = npq = 40 × 0.15 × 0.85 = 5.1.

    Trap: Using p twice, 40 × 0.15 × 0.15 = 0.9: the variance needs q = 1 - p.

  3. A fair coin is tossed 8 times. Find the probability of exactly 3 heads, as a fraction in its lowest terms.3 marks
    Answer
    1. X ∼ B(8, 1/2).
    2. P(X=3) = dbinom83(1/2)³(1/2)⁵ = 56 × 1/256.
    3. = 7/32.

    Trap: Leaving out dbinom83 = 56 gives 1/256, the probability of one particular order.

  4. A spinner lands on red with probability 1/5 on each spin, independently. It is spun until it lands on red. Find the probability that the first red is on the 4th spin, and the expected number of spins. Give exact answers.3 marks
    Answer
    1. X ∼ Geo(1/5) and q = 4/5.
    2. P(X=4) = (4/5)³1/5 = 64/625.
    3. E(X) = 1/(1/5) = 5.

    Trap: Writing q⁴p: the 4th spin is the success, so only three failures come before it.

  5. The random variable X takes the values 1, 2 and 3, with P(X = x) = kx, where k is a constant. Find k, E(X) and Var(X). Give exact answers.4 marks
    Answer
    1. k + 2k + 3k = 1, so k = 1/6.
    2. E(X) = (1 + 4 + 9)/6 = 7/3.
    3. sum x²P(X=x) = (1 + 8 + 27)/6 = 6.
    4. Var(X) = 6 - (7/3)² = 5/9.

    Trap: Subtracting E(X) instead of [E(X)]² gives 6 - 7/3 = 11/3.

  6. The random variable X ∼ Geo(p) has mean 8. Find p and P(X = 2). Give exact answers.3 marks
    Answer
    1. E(X) = 1/p = 8, so p = 1/8.
    2. q = 7/8.
    3. P(X=2) = qp = 7/8 × 1/8 = 7/64.

    Trap: Writing P(X=2) = p²: the first trial must be a failure.

  7. A test has 12 questions. Each has 4 options and exactly one is correct. A student guesses every answer. Find the probability that the student gets at least 4 correct.4 marks
    Answer
    1. X ∼ B(12, 0.25) and P(X ≥ 4) = 1 - P(X ≤ 3).
    2. P(0) = 0.031676, P(1) = 0.126705, P(2) = 0.232293, P(3) = 0.258104.
    3. Sum = 0.648779.
    4. P(X ≥ 4) = 1 - 0.648779 = 0.351.

    Trap: Subtracting P(X ≤ 4) also removes the case X = 4, which ‘at least 4’ includes.

  8. Each customer at a stall buys something with probability 0.35, independently. Customers are served in turn. Find the probability that the first sale is after the 2nd customer and before the 6th customer.3 marks
    Answer
    1. The first sale is to customer 3, 4 or 5, so 2 < X ≤ 5.
    2. P = P(X ≤ 5) - P(X ≤ 2) = 0.65² - 0.65⁵.
    3. = 0.4225 - 0.1160 = 0.306.

    Trap: Subtracting P(X ≤ 3) drops the case X = 3, which ‘after the 2nd’ includes.

  9. A box contains 4 working bulbs and 3 faulty bulbs. Bulbs are taken at random, one at a time and without replacement, until a working bulb is taken. X is the number of bulbs taken. (a) Explain why X does not have a geometric distribution. (b) Draw up the probability distribution table for X, giving the probabilities as fractions. (c) Find E(X) and Var(X), giving exact answers.7 marks
    Answer
    1. (a)
    2. The bulbs are not replaced, so the probability of a working bulb changes from one draw to the next. X also cannot be more than 4.
    3. (b)
    4. P(X=1) = 4/7 = 20/35. P(X=2) = 3/7 × 4/6 = 10/35.
    5. P(X=3) = 3/7 × 2/6 × 4/5 = 4/35. P(X=4) = 3/7 × 2/6 × 1/5 × 1 = 1/35.
    6. Check: 20 + 10 + 4 + 1 = 35, so the probabilities sum to 1.
    7. (c)
    8. E(X) = (1(20) + 2(10) + 3(4) + 4(1))/35 = 56/35 = 8/5.
    9. sum x²P(X=x) = (20 + 40 + 36 + 16)/35 = 112/35 = 16/5.
    10. Var(X) = 16/5 - (8/5)² = (80 - 64)/25 = 16/25.

    Trap: Treating X as Geo(4/7), with mean 7/4: without replacement the probability of success changes after each draw.

  10. Each chip a machine makes is faulty with probability p, independently. Chips are tested one at a time until a faulty chip is found. The mean number of chips tested is 25. (a) Find p. (b) Find the probability that the first faulty chip is found after the 10th chip tested but no later than the 20th. (c) Chips are packed in boxes of 30. A box is rejected if it contains more than 2 faulty chips. Find the probability that exactly 1 box out of 4 is rejected.8 marks
    Answer
    1. (a)
    2. E(X) = 1/p = 25, so p = 0.04 and q = 0.96.
    3. (b)
    4. The first faulty chip is chip 11 to 20, so 10 < X ≤ 20: P = 0.96¹⁰ - 0.96²⁰.
    5. = 0.664833 - 0.442002 = 0.223.
    6. (c)
    7. Y ∼ B(30, 0.04) for the faulty chips in one box. More than 2 is Y ≥ 3 = 1 - P(Y ≤ 2).
    8. P(Y ≤ 2) = 0.96³⁰ + dbinom301(0.04)(0.96)²⁹ + dbinom302(0.04)²(0.96)²⁸ = 0.883103.
    9. P(rejected) = 1 - 0.883103 = 0.116897.
    10. W ∼ B(4, 0.116897) for the rejected boxes: P(W=1) = 4 × 0.116897 × 0.883103³ = 0.322.

    Trap: Stopping at 0.117, the probability for one box: the question is about 4 boxes, so a second binomial stage is needed.

Say this, not that

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

Loses the markGets the mark
assume p = q to get one equation in one unknownform two equations (sum = 1 and the E(X) condition) and solve them simultaneously
Var(X) = E(X²)Var(X) = E(X²) - [E(X)]²: subtract the square of the mean
‘fewer than six throws’ includes throw 6, and ‘at least 3’ means more than 3fewer than 6 is X ≤ 5, so P = 1 - q⁵; at least 3 is X ≥ 3
a geometric probability rounded to 3 decimal places (0.043)three significant figures: 0.0425

Frequently asked questions

How do you find the value of k in a probability distribution table?
The probabilities sum to 1, so write the sum of all the probabilities in terms of k and set it equal to 1. For P(X = x) = kx² with X = −2, 1, 2, 3, the sum is 18k = 1, so k = 1/18. Give the probabilities as numerical fractions if the question asks for them.
How do you find E(X) and Var(X) from a distribution table?
E(X) is the sum of each value multiplied by its probability. Var(X) is the sum of x² multiplied by its probability, minus the square of E(X). Write the unsimplified expression before evaluating it, because a bare variance with no working does not earn full credit.
How do you find two unknown probabilities in a distribution table?
Use two equations: the probabilities sum to 1, and the second comes from the given E(X). Solve them simultaneously and show the working. Do not assume p = q, because that gives one equation in one unknown.
When do you use the binomial distribution B(n, p)?
Use B(n, p) when a fixed number of trials n is made, each with the same probability p of success, and X is the number of successes. Write q = 1 − p. For 'at least 3', use P(X ≥ 3) = 1 − P(X ≤ 2), and round only the final answer.
When should I use the geometric distribution Geo(p) instead of the binomial distribution?
Use Geo(p) when trials are repeated until the first success, so X is the number of the trial on which the first success occurs. P(X = r) = pq^(r−1) and E(X) = 1/p. A fixed number of trials, such as 'thrown 10 times', is binomial.
What is a common mistake when finding a geometric tail probability such as P(X < 6)?
The most common error is to read 'fewer than 6 throws' as including throw 6. Fewer than 6 means X ≤ 5, so P(X ≤ 5) = 1 − q⁵. Also, P(X > r) = q^r, and 'more than 8' means X > 8, not X = 8.

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