Skip to content

9709 · Unit 26 · Paper 5: Probability and Statistics 1

Discrete random variables.

9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

Probability distributions

§5.4 · Discrete random variables

Draw one card and read its score. That score is a random variable, X: a number decided by chance. Group the cards by score. Each score with its probability makes the probability distribution, which adds up to 1.

1From cards to a table

ScoreEqually likely cardsCount−2ABCD41EFGHIJK74LMNOPQ67RST3Each letter names one distinct card
Worked example

One of these 20 cards is drawn at random. Find the distribution of its score X.

  1. Each card has probability 1/20
    P(X=4) = 6/20 = 0.3
  2. Do the same for every score
    4/20, 7/20, 6/20, 3/20
  3. Check the total
    0.2 + 0.35 + 0.3 + 0.15=1
  4. Answer
    P(X = −2, 1, 4, 7) = 0.2, 0.35, 0.3, 0.15
x−2147
P(X = x)0.20.350.30.15
00.10.20.30.4Probability mass−20.210.3540.370.15supported value
  • The support is {−2, 1, 4, 7}: the values X can take.
  • A score can be negative; a probability cannot.
  • No card scores 2, so P(X = 2) = 0.
  • The most likely score, 1, is the mode.

2Find a missing constant: make the total 1

Worked example

P(X = x) is 4k, 7k, 6k, 3k for x = −2, 1, 4, 7. Find k.

  1. Add all four
    4k + 7k + 6k + 3k=1
  2. Answer
    20k = 1, so k = 1/20k multiplies the counts, not the scores.
Worked example

W takes −1, 0, 2 only, with P(W = w) = k(w² + 2). Find k.

  1. Put each listed w into w² + 2
    3k, 2k, 6k
  2. Answer
    11k = 1, so k = 1/11P(W = −1, 0, 2) = 3/11, 2/11, 6/11.
P(X = x) is 4k, 7k, 6k, 3k for x = −2, 1, 4, 7. Find k.
4k + 7k + 6k + 3k = 1Add all four.20k = 1, so k = 1/20k multiplies the counts, not the scores.
W takes −1, 0, 2 only, with P(W = w) = k(w² + 2). Find k.
3k, 2k, 6kPut each listed w into w² + 2.11k = 1, so k = 1/11P(W = −1, 0, 2) = 3/11, 2/11, 6/11.
Substitute only the listed values. Then check that every probability is between 0 and 1.

3A variable made from two draws

Draw twice with replacement and let Y = |X₁ − X₂|. Find Y for every pair of scores; a pair has probability p₁ × p₂. Add the pairs that give the same Y.
First ↓Second score →−2147−20369130364630379630Cells show Y = |first score − second score|
Worked example

Find P(Y = 6).

  1. Pairs 6 apart: (−2, 4), (4, −2), (1, 7), (7, 1)
    0.2 × 0.3=0.06, twice0.35 × 0.15=0.0525, twice
  2. Add the four blue cells
    0.06 + 0.06 + 0.0525 + 0.0525
  3. Answer
    P(Y = 6) = 0.225
y0369
P(Y = y)0.2750.440.2250.06
The total is 1. For the sum X₁ + X₂, the pair (−2, 4) would give 2, not 6: use the rule the question gives.

4Try it

Your turn

1 A bag holds 10 discs: 3 show 0, 5 show 1 and 2 show 5. One is drawn. Write the distribution of the number shown.

2 P(Y = y) = ky for y = 1, 2, 3, 4. Find k.

3 A fair spinner shows 1, 2 or 3. It is spun twice and D = |first − second|. Find the distribution of D.

  1. 1
    P(0) = 0.3, P(1) = 0.5, P(5) = 0.2
  2. 2
    10k = 1, so k = 1/10
  3. 3
    P(D = 0) = 3/9 = 1/3, P(D = 1) = 4/9, P(D = 2) = 2/9
Tick what you can do now
Practise with s26/51 Q1(a); s26/55 Q5(a); s26/53 Q2(a)
1 / 7
9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

Events and the expected value

§5.4 · Discrete random variables

“More than 1” asks about values, not about the number line: list the scores that count, then add their probabilities. The same table gives the expected value E(X), the average score per draw over a long run.

1Events: list the values that count

x−2147
P(X = x)0.20.350.30.15
00.10.20.30.4X > 1: select 4 and 7−20.210.3540.370.15supported value
Worked example

Find P(X > 1).

  1. Which scores are more than 1?
    4 and 7
  2. Add their probabilities
    0.3 + 0.15
  3. Answer
    P(X > 1) = 0.45
✓Check P(X ≤ 1) = 0.2 + 0.35 = 0.55 = 1 − 0.45
EventValues that countProbability
X < 1−20.2
X ≤ 1−2, 10.55
−2 < X < 71, 40.35 + 0.3 = 0.65
X ≥ 44, 70.45
1 ≤ X ≤ 41, 40.65
P(X > 1) is not 1 − P(X = 1): that keeps −2 as well. A complement removes the whole event.

2Expected value: weight each value by its probability

E(X) = Σ x P(X = x): multiply each value by its probability, then add.
xP(X = x)x P(X = x)
−20.2−0.4
10.350.35
40.31.2
70.151.05
Worked example

Find E(X).

  1. Multiply each score by its probability
    −0.4, 0.35, 1.2, 1.05
  2. Add, keeping the negative term
    −0.4 + 0.35 + 1.2 + 1.05
  3. Answer
    E(X) = 2.2

3A long-run total, and a value no card has

No card scores 2.2: an expected value need not be a possible score. Over 40 independent draws the expected total is 40 × 2.2 = 88; a real total can differ.
Do not divide by 4. The probabilities already add to 1; averaging the four scores treats them as equally likely.

4Try it

Your turn

X has this distribution.

x0123
P(X = x)0.10.40.30.2

1 Find P(X ≥ 2).

2 Find P(0 < X < 3).

3 Find E(X).

4 Find the expected total over 50 independent repeats.

  1. 1
    0.3 + 0.2 = 0.5
  2. 2
    0.4 + 0.3 = 0.7
  3. 3
    0 + 0.4 + 0.6 + 0.6 = 1.6
  4. 4
    50 × 1.6 = 80
Tick what you can do now
Practise with s26/53 Q2(a) (related distribution practice); s26/53 Q1(c) (related bound-selection practice); s26/51 Q1(b); s26/55 Q5(b)
2 / 7
9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

Variance, and unknown probabilities

§5.4 · Discrete random variables

Two games can have the same average score but very different swings. Variance measures the spread: the average squared distance from the mean. Its square root, the standard deviation, is back in the units of X.

1Variance: E(X²) minus the square of the mean

Var(X) = E(X²) − [E(X)]². Square each value first, weight it, add, then subtract the square of the mean.
Worked example

X has the distribution below and E(X) = 2.2. Find Var(X) and the standard deviation, to 3 significant figures.

x−2147
P(X = x)0.20.350.30.15
  1. Find E(X²): square each value, then weight it
    E(X²)=4(0.2) + 1(0.35) + 16(0.3) + 49(0.15)=0.8 + 0.35 + 4.8 + 7.35=13.3
  2. Subtract the square of the mean
    Var(X)=13.3 − 2.2²=13.3 − 4.84 = 8.46
  3. Take the square root
    SD=√8.46 = 2.9086…
  4. Answer
    Var(X) = 8.46; standard deviation = 2.91 (3 s.f.)
✓Check Σ(x − 2.2)² P(X = x) = 0.2(4.2)² + 0.35(1.2)² + 0.3(1.8)² + 0.15(4.8)² = 8.46

2Unknown probabilities: one equation for each fact

Two unknowns need two equations: the probabilities add to 1, and the given mean is Σ x P(X = x).
00.10.20.30.4Unknown: a + b = 0.65−20.21a4b70.15supported value
Worked example

X takes −2, 1, 4, 7 with probabilities 0.2, a, b, 0.15, and E(X) = 2.2. Find a and b.

  1. The total is 1
    0.2 + a + b + 0.15=1a + b=0.65
  2. Use the mean
    −0.4 + a + 4b + 1.05=2.2a + 4b=1.55
  3. Subtract the first equation
    3b=0.9, so b = 0.3
  4. Back-substitute
    a=0.65 − 0.3 = 0.35
  5. Answer
    a = 0.35, b = 0.3
✓Check both lie between 0 and 1, and the table gives E(X) = 2.2

3Try it

Your turn

X has this distribution.

x0123
P(X = x)0.10.40.30.2

1 This table has E(X) = 1.6. Find E(X²) and Var(X).

2 Find the standard deviation to 3 significant figures.

3 Y takes 1, 2, 3 with probabilities 0.2, a, b, and E(Y) = 2.3. Find a and b.

  1. 1
    E(X²) = 0.4 + 1.2 + 1.8 = 3.4; Var(X) = 3.4 − 1.6² = 0.84
  2. 2
    √0.84 = 0.917
  3. 3
    a + b = 0.8 and 2a + 3b = 2.1, so b = 0.5, a = 0.3
Tick what you can do now
Practise with s26/51 Q1(b); s26/53 Q2(b); s26/53 Q2(a), Q2(b) (related inverse-table and moment practice)
3 / 7
9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

The binomial distribution

§5.4 · Discrete random variables

Draw a card eight times, putting it back each time, and count how often you get a 4. When the number of trials is fixed, the trials are independent and each has the same chance, that count follows the binomial distribution, written B(n, p).

1When B(n, p) fits: check the experiment

Eight trials; count successes1S2F3F4S5F6S7F8FS: score 4 · F: any other score
ConditionEight draws with replacement
A fixed number of trialsEight draws, whatever happens.
Two results per trialScore 4 is success; any other score is failure.
Independent trials, same pEach card goes back, so p = 6/20 = 0.3 every time.
So N ~ B(8, 0.3), where N counts successes, not scores.

2When it does not fit

Without replacement, a 4 drawn first leaves 5 score-4 cards among 19; any other card leaves 6 among 19. The chance changes, so the count is not B(8, 0.3).
“At random” alone does not make trials independent. Check how the experiment is run.

3Exactly r successes: positions × one order

P(N = r) = ⁿCᵣ pʳ (1 − p)ⁿ⁻ʳ: ⁿCᵣ chooses which trials succeed; pʳ(1 − p)ⁿ⁻ʳ is one such order.
00.10.20.30.4Exactly 3 successes012345678supported value
Worked example

N ~ B(8, 0.3). Find P(N = 3).

  1. Choose the 3 success positions
    ⁸C₃=56
  2. One order of 3 successes and 5 failures
    0.3³ × 0.7⁵
  3. Multiply
    56 × 0.3³ × 0.7⁵=0.25412184
  4. Answer
    P(N = 3) ≈ 0.254
✓Check keep all the digits until the last line
Worked example

Find P(N = 0).

  1. Answer
    0.7⁸ = 0.05764801One order: all failures.
Worked example

Find P(N = 8).

  1. Answer
    0.3⁸ = 0.00006561One order: all successes.
Find P(N = 0).
0.7⁸ = 0.05764801One order: all failures.
Find P(N = 8).
0.3⁸ = 0.00006561One order: all successes.

4Try it

Your turn

1 N ~ B(6, 0.4). Find P(N = 2).

2 N ~ B(6, 0.4). Find P(N = 0).

3 A bag holds 10 counters, 3 of them red. Four are drawn without replacement. Is the number of red B(4, 0.3)?

  1. 1
    ⁶C₂ × 0.4² × 0.6⁴ = 15 × 0.16 × 0.1296 = 0.311
  2. 2
    0.6⁶ = 0.0467
  3. 3
    no: without replacement the chance of red changes after each draw
Tick what you can do now
Practise with s26/52 Q4(a); m26/52 Q6(c) (related binomial practice)
4 / 7
9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

Binomial ranges, mean and variance

§5.4 · Discrete random variables

N can only be a whole number from 0 to 8, so “between 1 and 3” or “more than 5” is a short list of counts. List them first, then add. The mean and variance of a binomial count have their own short formulas.

1Choose the counts, then add

00.10.20.30.41 ≤ N ≤ 3012345678supported value
Worked example

N ~ B(8, 0.3). Find P(1 ≤ N ≤ 3).

  1. List the counts: 1, 2 and 3
    0 is left out
  2. Add the three terms
    0.19765032 + 0.29647548 + 0.25412184
  3. Answer
    P(1 ≤ N ≤ 3) ≈ 0.748
00.10.20.30.4N > 5: select 6, 7 and 8012345678supported value
Worked example

Find P(N > 5).

  1. List the counts: 6, 7 and 8
    5 is left out
  2. Add the three terms
    0.01000188 + 0.00122472 + 0.00006561
  3. Answer
    P(N > 5) ≈ 0.0113
✓Check the same as 1 − P(N ≤ 5)

2At least one: use the complement

“At least one” is everything except 0: P(N ≥ 1) = 1 − P(N = 0) = 1 − 0.7⁸ = 0.94235199.
“At most 5” includes 5. “Fewer than 5” stops at 4.

3Mean and variance: np and np(1 − p)

For N ~ B(n, p): E(N) = np and Var(N) = np(1 − p).
Worked example

N ~ B(8, 0.3). Work out E(N), Var(N) and the standard deviation.

  1. Mean: np
    E(N)=8 × 0.3 = 2.4
  2. Variance: np(1 − p)
    Var(N)=8 × 0.3 × 0.7 = 1.68
  1. Standard deviation: the square root of the variance
    SD=√1.68 ≈ 1.30
  2. Answer
    E(N) = 2.4, Var(N) = 1.68, SD ≈ 1.30

4Work back to n and p

Worked example

A binomial count has mean 2.4 and variance 1.68. Find n and p.

  1. Write both equations
    np=2.4np(1 − p)=1.68
  2. Divide the second by the first
    1 − p=1.68 ÷ 2.4 = 0.7p=0.3
  3. Find n
    n=2.4 ÷ 0.3 = 8
  4. Answer
    n = 8, p = 0.3
✓Check n is a positive whole number and 0 < p < 1

5Try it

Your turn

1 N ~ B(10, 0.2). Find P(N ≥ 1).

2 Find P(2 ≤ N ≤ 3).

3 Find E(N) and Var(N).

4 A binomial count has mean 6 and variance 4.2. Find n and p.

  1. 1
    1 − 0.8¹⁰ ≈ 0.893
  2. 2
    P(N = 2) + P(N = 3) ≈ 0.302 + 0.201 = 0.503
  3. 3
    E(N) = 2, Var(N) = 1.6
  4. 4
    1 − p = 0.7, so p = 0.3 and n = 20
Tick what you can do now
Practise with s26/53 Q1(c); m26/52 Q6(c) (related binomial practice); s26/52 Q4(a)
5 / 7
9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

Waiting for a success: the geometric distribution

§5.4 · Discrete random variables

Keep drawing, with replacement, until a −2 turns up. The number of draws needed, T, follows the geometric distribution, Geo(p). There is no fixed number of trials, and T starts at 1 because the successful draw is counted.

1First success on trial r

P(T = r) = (1 − p)ʳ⁻¹ p: r − 1 failures, then the success. Here p = 4/20 = 0.2.
T = 4: first success on trial 41F2F3F4ST > 4: no success in the first 41F2F3F4FS: score −2; independent replacement draws
Worked example

T ~ Geo(0.2). Find P(T = 4) and P(T > 4).

  1. Three failures, then a success
    P(T=4) = 0.8³ × 0.2 = 0.1024
  2. T > 4: the first four draws all fail
    P(T > 4)=0.8⁴
  3. Answer
    P(T = 4) = 0.1024; P(T > 4) = 0.4096

2By, before and after trial r

WordsEventProbability for p = 0.2, r = 4
after draw 4T > 40.8⁴ = 0.4096
by draw 4T ≤ 41 − 0.8⁴ = 0.5904
before draw 4T < 4, so T ≤ 31 − 0.8³ = 0.488
E(T) = 1/p = 1/0.2 = 5 draws on average, counting the success. It is not a promise of success by draw 5.

3Second or third success: count the earlier positions

Waiting for a second success is not geometric. The last draw is a success; choose where the earlier successes go.
Second success on trial 51F2S3F4F5SOne S among trials 1–4; trial 5 is SThird success on trial 71S2F3F4S5F6F7STwo S among trials 1–6; trial 7 is SEach row is one order; count all allowed orders
Worked example

Find the probability that the second −2 comes on draw 5.

  1. One success among draws 1–4
    ⁴C₁=4 positions
  2. Two successes and three failures in all
    4 × 0.2² × 0.8³
  3. Answer
    P = 0.08192
Worked example

Third −2 on draw 7.

  1. Two successes among draws 1–6
    ⁶C₂=15
  2. Answer
    15 × 0.2³ × 0.8⁴ = 0.049152Three successes, four failures.
Worked example

Second −2 on draw 5 or draw 6.

  1. Draw 6: one success among draws 1–5
    4 × 0.2² × 0.8³ + 5 × 0.2² × 0.8⁴
  2. Answer
    0.08192 + 0.08192 = 0.16384The two events cannot both happen: add.
Third −2 on draw 7.
⁶C₂ = 15Two successes among draws 1–6.15 × 0.2³ × 0.8⁴ = 0.049152Three successes, four failures.
Second −2 on draw 5 or draw 6.
4 × 0.2² × 0.8³ + 5 × 0.2² × 0.8⁴Draw 6: one success among draws 1–5.0.08192 + 0.08192 = 0.16384The two events cannot both happen: add.

4Try it

Your turn

1 T ~ Geo(0.25). Find P(T = 3).

2 Find P(T > 3).

3 Find E(T).

4 With p = 0.25 on every trial, find the probability that the second success comes on trial 4.

  1. 1
    0.75² × 0.25 = 0.140625
  2. 2
    0.75³ = 0.421875
  3. 3
    1/0.25 = 4
  4. 4
    ³C₁ × 0.25² × 0.75² = 0.10546875
Tick what you can do now
Practise with m26/52 Q4(a); s26/53 Q1(a), Q1(b); m26/52 Q4(b); s26/55 Q5(d); s26/52 Q2(c)
6 / 7
9709 · Unit 26 · Discrete random variables
Revisionbyexamplicity

Check the model first

§5.4 · Discrete random variables

Binomial and geometric tables only work when every trial is independent with the same chance. When cards are not put back, or one “trial” is really two draws, stop and build what the question describes.

1Without replacement: build the table

Separate six-card experimentA−2B−2E1F1L4R7Keep each drawn card outStop at the first score −2
Worked example

Six cards score −2, −2, 1, 1, 4, 7. Draw without replacement until a −2 appears; R is the number of draws. Find P(R = 2), then the distribution of R.

  1. Not −2, then −2
    (4/6) × (2/5)=4/15
  2. The two −2 cards sit in one of ⁶C₂ = 15 position pairs
    first −2 at r leaves 6 − r places for the second
  3. Answer
    P(R = 1, 2, 3, 4, 5) = 5/15, 4/15, 3/15, 2/15, 1/15
r12345
P(R = r)5/154/153/152/151/15
After a miss the chance is 2/5, not 2/6: R is not Geo(1/3). R cannot be more than 5.

2Its mean and variance: the usual table method

  1. Weight each value of r by its probability
    E(R)=(5 + 8 + 9 + 8 + 5)/15 = 7/3
  2. Square r before weighting
    E(R²)=(5 + 16 + 27 + 32 + 25)/15 = 7
  3. Answer
    Var(R) = 7 − (7/3)² = 14/9E(R²) minus the square of the mean.
E(R) = (5 + 8 + 9 + 8 + 5)/15 = 7/3Weight each value of r by its probability.E(R²) = (5 + 16 + 27 + 32 + 25)/15 = 7Square r before weighting.Var(R) = 7 − (7/3)² = 14/9E(R²) minus the square of the mean.

3A trial made of two draws: find its chance first

Work out the chance that one whole trial succeeds; then repeat whole trials.
Worked example

One trial is two draws with replacement from the 20 cards; it succeeds if exactly one card scores 4 (0.3 per draw). K counts trials up to the first success.

  1. Two orders: 4 then not 4, or not 4 then 4
    0.3 × 0.7 + 0.7 × 0.3=0.42
  2. K ~ Geo(0.42): three failed trials, then a success
    P(K=4) = 0.58³ × 0.42 = 0.08194704
  1. Mean number of trials
    E(K)=1/0.42 = 50/21
  2. Answer
    P(K = 4) ≈ 0.0819; E(K) ≈ 2.38 trials
✓Check the success chance is 0.42 for a trial, not 0.3 for a draw
X, N, T and K count different things. Say what one trial is, and what counts as success, before using a formula.

4Try it

Your turn

1 Five cards: two red, three black. Draw without replacement until a red appears; R is the number of draws. Find the distribution of R.

2 Find E(R).

3 One trial is rolling two fair dice; it succeeds if exactly one shows a six. Find the probability that the first success is on trial 2.

  1. 1
    P(R = 1, 2, 3, 4) = 2/5, 3/10, 1/5, 1/10
  2. 2
    0.4 + 0.6 + 0.6 + 0.4 = 2
  3. 3
    one trial: 10/36 = 5/18; (13/18) × (5/18) = 65/324
Tick what you can do now
Practise with m26/52 Q4(c), Q4(d); s26/52 Q2(b), Q2(c)
7 / 7