Discrete random variables: 7 exam questions solved step by step
What this lesson covers
- The mean of a discrete random variable is each value times its probability, added up.
- The probabilities in a table must sum to 1, which finds any missing value.
Discrete random variables
- The probabilities add up to 1.
- Mean: E(X) = Σ x × P(X = x).
- Variance: Var(X) = E(X²) − [E(X)]².
- Say what it means in context.
Question 1 · Achieved
- X = tries a club winger scores
- In one game of rugby.
- Find k, then E(X).
| Tries, x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.45 | 0.3 | k | 0.05 |
Q1: k, then the mean
- Sum to 1 finds k.
- Then value × probability.
- 0.45 + 0.3 + k + 0.05 = 1sum to 1
- 0.8 + k = 1
- k = 0.2
- E(X) = Σ x × P(X = x)
- = 0 × 0.45 + 1 × 0.3
- + 2 × 0.2 + 3 × 0.05
- = 0 + 0.3 + 0.4 + 0.15
- = 0.85 tries
- average over many gamesnot one game
Try it: k, the mean, the SD
Question 2 · Achieved
- The same winger: E(X) = 0.85.
- Find the standard deviation of X.
- Careful: E(X²) is not E(X) squared.
| Tries, x | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| P(X = x) | 0.45 | 0.3 | 0.2 | 0.05 |
Q2: the standard deviation
- Square the value first.
- Then minus the mean squared.
- E(X²) = Σ x² × P(X = x)
- = 0² × 0.45 + 1² × 0.3
- + 2² × 0.2 + 3² × 0.05
- = 0 + 0.3 + 0.8 + 0.45 = 1.55
- E(X²) ≠ [E(X)]²1.55, not 0.7225
- Var(X) = E(X²) − [E(X)]²
- = 1.55 − 0.85² = 1.55 − 0.7225
- = 0.8275
- σ = √0.8275 = 0.9097 tries
Question 3 · Merit
- X = attempts to pass a driving test.
- P(X = x) = k(5 − x), x = 1, 2, 3, 4.
- Find k, E(X) and the SD of X.
Q3: find k
- Put each x into the rule.
- Then sum to 1.
- P(X = x) = k(5 − x)
- 4k + 3k + 2k + k = 1sum to 1
- 10k = 1, k = 0.1
- P(X = 1) = 0.1 × 4 = 0.4
- P(X = 2) = 0.1 × 3 = 0.3
- P(X = 3) = 0.1 × 2 = 0.2
- P(X = 4) = 0.1 × 1 = 0.1
- 0.4 + 0.3 + 0.2 + 0.1 = 1
Q3: mean and SD
- Write every product.
- Clean numbers: check them.
- P: 0.4, 0.3, 0.2, 0.1
- E(X) = 1 × 0.4 + 2 × 0.3
- + 3 × 0.2 + 4 × 0.1
- = 0.4 + 0.6 + 0.6 + 0.4 = 2
- E(X²) = 1² × 0.4 + 2² × 0.3
- + 3² × 0.2 + 4² × 0.1
- = 0.4 + 1.2 + 1.8 + 1.6 = 5
- Var(X) = 5 − 2² = 1
- σ = √1 = 1 attempt
Question 4 · Merit, in context
- Kayaks hired an hour at Raglan, X:
- E(X) = 2.4, SD(X) = 1.1.
- Takings T = 25X − 15 dollars.
- Find the mean and SD of T.
Q4: T = 25X − 15
- The booklet rules.
- − 15 moves it, not spreads.
- T = 25X − 15
- E(T) = 25 × E(X) − 15E(aX + b)
- = 25 × 2.4 − 15 = 60 − 15
- = $45 an hour
- Var(T) = 25² × Var(X)− 15 drops out
- = 625 × 1.1² = 625 × 1.21
- = 756.25
- SD(T) = √756.25 = $27.50
- 25 × 1.1 − 15 = 12.50no − 15 on spread
Try it: T = 25X − 15
Try it: balance, spread, aX + b
Question 5 · Merit, in context
- A school fair spinner costs $2 a go.
- Prizes and their probabilities below.
- How much will the school expect
- To make from 300 plays?
| Prize | $10 | $5 | $1 | $0 |
|---|---|---|---|---|
| P | 0.05 | 0.1 | 0.25 | ? |
Q5: the school fair
- Expected prize per play.
- Then cost minus prize.
- P($0) = 1 − 0.05 − 0.1 − 0.25
- = 0.6
- E(prize) = 10 × 0.05 + 5 × 0.1
- + 1 × 0.25 + 0 × 0.6
- = 0.5 + 0.5 + 0.25 = $1.25
- per play: 2 − 1.25 = $0.75cost minus prize
- 300 × 0.75 = $225
- about $225 from 300 playsan expected value
Question 6 · Excellence
- X = people in a car on a motorway
- At peak time. E(X) = 2.5.
- Find a and b, then the SD of X.
| People, x | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| P(X = x) | 0.1 | a | b | 0.2 |
Q6: two unknowns, two facts
- Sum to 1 is one equation.
- The mean is the other.
- 0.1 + a + b + 0.2 = 1sum to 1
- a + b = 0.7
- 0.1 + 2a + 3b + 0.8 = 2.5E(X) = 2.5
- 2a + 3b = 1.6
- a = 0.7 − bfrom the first
- 2(0.7 − b) + 3b = 1.6
- 1.4 + b = 1.6, b = 0.2
- a = 0.7 − 0.2 = 0.5
Q6: check, then the SD
- Check the mean first.
- Then E(X²) − 2.5².
- P: 0.1, 0.5, 0.2, 0.2
- E(X) = 0.1 + 1 + 0.6 + 0.8 = 2.5
- E(X²) = 1² × 0.1 + 2² × 0.5
- + 3² × 0.2 + 4² × 0.2
- = 0.1 + 2 + 1.8 + 3.2 = 7.1
- Var(X) = 7.1 − 2.5²
- = 7.1 − 6.25 = 0.85
- σ = √0.85 = 0.92204 d.p.
- about 0.92 people per car
Question 7 · Excellence
- The school fair spinner again: $2 a go.
- Keep the $5 and $1 prizes the same.
- What top prize gives the school
- An expected $0.60 a play?
| Prize | $T | $5 | $1 | $0 |
|---|---|---|---|---|
| P | 0.05 | 0.1 | 0.25 | 0.6 |
Q7: set the top prize
- Form the equation from words.
- Then check it.
- top prize = $T
- E(prize) = 0.05T + 0.5 + 0.25
- = 0.05T + 0.75
- 2 − (0.05T + 0.75) = 0.60profit per play
- 1.25 − 0.05T = 0.60
- 0.05T = 0.65
- T = 0.65 ÷ 0.05 = $13
- 2 − (0.65 + 0.5 + 0.25) = 0.60
- a long-run averagenot every play
Common mistakes
- E(X²) is E(X) squared.E(X²) = Σx²P(X = x). Square the values, not the mean.
- SD(25X − 15) = 25 SD(X) − 15.Adding or taking away a constant does not change spread: SD = 25 SD(X).
- Forgetting that the player pays $2.Work from the school's point of view: takings minus expected prizes.
The method that solved all seven
- Sum to 1, the mean, E(X²) minus the mean squared, then say it in context.
| Step | How |
|---|---|
| Missing p | probabilities sum to 1 |
| Mean | Σ x × P(X = x) |
| Spread | E(X²) − [E(X)]², then √ |
| aX + b | mean a × E(X) + b, SD |a| × σ |
| Two unknown | sum to 1, and the mean |
| Fair game | expected payout against cost |
Challenge
X is the number of free throws a basketballer scores from a pair of shots, so X is 0, 1 or 2. Over a season, E(X) = 1 and SD(X) = √0.6. Find the probability distribution of X. Then show that her two shots cannot be independent with the same chance of scoring.
Hint
Three unknown probabilities need three facts: they sum to 1, the mean, and E(X²), which comes from Var(X) = E(X²) − [E(X)]². For the second part, what would the variance be if X ~ Bin(2, p) with the same mean?
Answer
P(X = 0) = 0.3, P(X = 1) = 0.4, P(X = 2) = 0.3. If the shots were independent with the same p, X ~ Bin(2, 0.5) with variance 0.5, not 0.6, so they are not.
Step by step
- Call the probabilities a, b and c for 0, 1 and 2 scored. They sum to 1.
- The mean gives 0a + 1b + 2c = 1.
- Var(X) = 0.6, so E(X²) = 0.6 + 1² = 1.6, which gives b + 4c = 1.6.
- Subtract: 2c = 0.6, so c = 0.3, then b = 0.4 and a = 0.3.
- Independent shots with the same p would make X ~ Bin(2, p). The mean 2p = 1 gives p = 0.5, and then Var(X) = 2 × 0.5 × 0.5 = 0.5. The real variance is 0.6, so the model fails: she tends to score both or miss both.
Full working
- a + b + c = 1sum to 1
- b + 2c = 1E(X) = 1
- E(X²) = 0.6 + 1² = 1.6Var(X) + [E(X)]²
- b + 4c = 1.6
- 2c = 0.6, c = 0.3, b = 0.4, a = 0.3
- check: E(X²) − 1² = 0.4 + 1.2 − 1 = 0.6
- Bin(2, p): 2p = 1, p = 0.5, Var = 2 × 0.5 × 0.5 = 0.5not 0.6
- P(X = 0) = 0.3, P(X = 1) = 0.4, P(X = 2) = 0.3; the shots are not independent with the same p
In a board game you roll two fair dice and move forward by the larger of the two numbers (if they match, by that number). Let X be the number of squares moved in one turn. Find the probability distribution of X, then E(X) and the standard deviation of X.
Hint
List the 36 equally likely pairs, or count: how many pairs have a larger number of exactly k? It is the pairs with both dice at most k, minus those with both at most k − 1.
Answer
P(X = k) = 2k − 136 for k = 1 to 6. E(X) = 16136 = 4.4722 squares, SD(X) = 1.4041 squares.
Step by step
- There are 36 equally likely pairs. Both dice are at most k in k² pairs.
- So the larger number is exactly k in k² − (k − 1)² = 2k − 1 pairs, giving 1, 3, 5, 7, 9, 11 out of 36. They add to 36.
- E(X) = Σ x × P(X = x) = (1 + 6 + 15 + 28 + 45 + 66) ÷ 36 = 161 ÷ 36 = 4.4722.
- E(X²) = (1 + 12 + 45 + 112 + 225 + 396) ÷ 36 = 791 ÷ 36 = 21.9722.
- Var(X) = 21.9722 − 4.4722² = 1.9715, so SD(X) = 1.4041 squares.
Full working
- pairs with larger number k: k² − (k − 1)² = 2k − 1
- P(X = 1 to 6) = 136, 336, 536, 736, 936, 1136sum 3636
- E(X) = (1 + 6 + 15 + 28 + 45 + 66) ÷ 36 = 161 ÷ 36 = 4.4722
- E(X²) = (1 + 12 + 45 + 112 + 225 + 396) ÷ 36 = 791 ÷ 36 = 21.9722
- Var(X) = 791 ÷ 36 − (161 ÷ 36)² = 2555 ÷ 1296 = 1.9715
- SD(X) = √1.9715 = 1.4041
- E(X) = 4.4722 squares, SD(X) = 1.4041 squares
At a school fair, a bag holds 3 red and 2 blue balls. A player pays $4, then draws balls one at a time without replacement until a red ball appears. The prize is $2 if red comes on the first draw, $5 on the second draw and $12 on the third draw. Find the mean and standard deviation of the school's profit from one play, and the expected profit from 200 plays.
Hint
A red ball must appear by the third draw, because there are only 2 blue. Find the three probabilities with a tree. Profit = 4 − prize, so think about what subtracting from a constant does to the mean and to the spread.
Answer
Prize probabilities 0.6, 0.3, 0.1; E(prize) = $3.90, SD(prize) = $3.01. Profit = 4 − prize: mean $0.10 a play, SD $3.01 a play, so about $20 from 200 plays.
Step by step
- P(red first) = 35 = 0.6. P(blue then red) = 25 × 34 = 0.3. P(blue, blue, red) = 25 × 14 × 1 = 0.1. They sum to 1.
- E(prize) = 2 × 0.6 + 5 × 0.3 + 12 × 0.1 = $3.90.
- E(prize²) = 4 × 0.6 + 25 × 0.3 + 144 × 0.1 = 24.3, so Var(prize) = 24.3 − 3.9² = 9.09 and SD = $3.015.
- Profit = 4 − prize. The mean becomes 4 − 3.90 = $0.10. Multiplying by −1 does not change the spread, so SD(profit) = |−1| × 3.015 = $3.015.
- Over 200 plays the expected profit is 200 × 0.10 = $20, small compared with how much single plays vary.
Full working
- P($2) = 35 = 0.6red first
- P($5) = 25 × 34 = 0.3blue, red
- P($12) = 25 × 14 × 1 = 0.1blue, blue, red
- E(prize) = 1.2 + 1.5 + 1.2 = $3.90
- E(prize²) = 2.4 + 7.5 + 14.4 = 24.3
- Var(prize) = 24.3 − 15.21 = 9.09, SD = √9.09 = 3.015
- profit = 4 − prize: E = 4 − 3.90 = 0.10, SD = |−1| × 3.015 = 3.015
- 200 × 0.10 = $20
- Profit per play: mean $0.10, SD $3.01; about $20 from 200 plays
Practise this
Report a mistake
More in AS 91586
Choosing a distribution, and naming it every time7 min
Discrete random variables: mean and standard deviation9 min
Binomial and Poisson: at least, at most, and the rate10 min
The normal distribution: forwards, backwards and conditional11 min
Uniform and triangular distributions, and judging a model10 min
Choosing a distribution: 7 exam questions solved step by step10 min
Discrete random variables: 7 exam questions solved step by step11 min
Binomial and Poisson: 7 exam questions solved step by step10 min
Normal distribution: 7 exam questions solved step by step10 min
Uniform and triangular: 7 exam questions solved step by step10 minIs your child on track?
Take the free placement test