← Back to FractionRush

Discrete Random Variables S1 Statistics

Grade 11 · Statistics 1 · Cambridge A-Level 9709 · Age 16–17

Welcome to Discrete Random Variables!

A discrete random variable (DRV) is a variable whose value is determined by a random experiment and can take only a countable set of values. In Cambridge A-Level Statistics 1 (9709), you learn to define probability distributions, calculate expected values and variance, apply linear transformations, and set up distributions from real-world contexts. These ideas underpin all further statistics work at A-Level and beyond.

E(X) = Σ x·P(X=x)  |  Var(X) = E(X²) − [E(X)]²  |  E(aX+b) = aE(X)+b  |  Var(aX+b) = a²Var(X)

Learning Objectives

  • Understand the definition of a discrete random variable and its probability distribution
  • Verify that a probability distribution is valid: all probabilities non-negative and summing to 1
  • Construct and interpret cumulative distribution functions F(x) = P(X ≤ x)
  • Calculate the expectation E(X) as a weighted mean of the distribution
  • Calculate E(X²) and hence variance Var(X) = E(X²) − [E(X)]²
  • Find standard deviation as √Var(X)
  • Apply scaling rules E(aX+b) = aE(X)+b and Var(aX+b) = a²Var(X)
  • Set up probability distributions from word problems and game contexts
  • Find unknown constants in probability distributions
  • Determine whether a game is fair using E(profit) = 0

DRV Definition

Countable values x⊂i; each with probability P(X=x⊂i); all probs sum to 1

Expectation

E(X) = Σ x·P(X=x) — the long-run average value

Variance

Var(X) = E(X²) − [E(X)]² — measures spread

Standard Deviation

SD(X) = √Var(X) — in the same units as X

Linear Transform

E(aX+b) = aE(X)+b; Var(aX+b) = a²Var(X)

CDF

F(x) = P(X ≤ x) — cumulative sum of probabilities

Finding k

Use ΣP=1 to find unknown constant in distribution

Fairness

Game is fair iff E(profit) = 0

Learn 1 — What is a Discrete Random Variable?

Definition

A random variable X is a variable whose numerical value is determined by the outcome of a random experiment. X is discrete if it can take only a countable number of distinct values x⊂1;, x⊂2;, x⊂3;, …

Examples of discrete random variables:
• The score when a fair die is rolled: X ∈ {1, 2, 3, 4, 5, 6}
• The number of heads in 3 coin tosses: X ∈ {0, 1, 2, 3}
• The number of defective items in a batch of 10

NOT discrete: height, weight, time — these are continuous random variables (covered in S1 Normal Distribution topic).

Probability Distribution Table

The probability distribution of X lists every possible value and its corresponding probability. It is usually displayed in a table:

x1234
P(X=x)0.10.30.40.2

Check: 0.1 + 0.3 + 0.4 + 0.2 = 1.0 ✓

Conditions for a Valid Probability Distribution

A table defines a valid probability distribution if and only if:

(1) P(X = x⊂i;) ≥ 0 for all i     (2) Σ P(X = x⊂i;) = 1
Example — is this valid?
x0123
P(X=x)0.20.350.30.15

All probabilities are non-negative. Sum = 0.2 + 0.35 + 0.3 + 0.15 = 1.00 ✓ Valid.
Invalid example: P(X=1) = 0.4, P(X=2) = 0.5, P(X=3) = 0.2. Sum = 1.1 ≠ 1. Not valid!

Cumulative Distribution Function (CDF)

The cumulative distribution function F(x) gives the probability that X takes a value less than or equal to x:

F(x) = P(X ≤ x) = Σx⊂i; ≤ x P(X = x⊂i;)

The CDF is a step function that increases at each value of X. Key properties:

• F(x) is non-decreasing: if a < b then F(a) ≤ F(b)
• F of the smallest value = P(X = smallest value)
• F of the largest value = 1
• P(X = a) = F(a) − F(a−1)   (for consecutive integer values)
• P(a < X ≤ b) = F(b) − F(a)
Example: Using the distribution above (x = 1,2,3,4 with probs 0.1, 0.3, 0.4, 0.2):

x1234
P(X=x)0.10.30.40.2
F(x)0.10.40.81.0

F(2) = P(X ≤ 2) = 0.1 + 0.3 = 0.4
P(2 < X ≤ 4) = F(4) − F(2) = 1.0 − 0.4 = 0.6

Using the CDF to Find Probabilities

Example: Given F(3) = 0.72 and F(5) = 0.91, find P(3 < X ≤ 5).
P(3 < X ≤ 5) = F(5) − F(3) = 0.91 − 0.72 = 0.19
Example: Given F(4) = 0.85 and P(X = 4) = 0.15, find F(3).
F(3) = F(4) − P(X=4) = 0.85 − 0.15 = 0.70
In the exam, always build the CDF row by row — it's much easier to spot errors than calculating each probability from scratch. Once you have the CDF table, you can answer any probability question quickly.

Learn 2 — Expectation E(X)

Definition of Expected Value

The expected value (or mean) of a discrete random variable X is the weighted average of its values, where the weights are the probabilities:

E(X) = Σ x · P(X = x) = x⊂1;P(X=x⊂1;) + x⊂2;P(X=x⊂2;) + …

E(X) represents the long-run average value of X if the experiment were repeated many times. It need not be a value that X can actually take.

Worked Calculation — Step by Step

Example: Find E(X) for the distribution:

x1234
P(X=x)0.10.30.40.2

Step 1: Multiply each x by its probability:
1×0.1 = 0.1,   2×0.3 = 0.6,   3×0.4 = 1.2,   4×0.2 = 0.8

Step 2: Sum these products:
E(X) = 0.1 + 0.6 + 1.2 + 0.8 = 2.7

Interpretation: if this experiment is repeated many times, the average value of X will be 2.7.

E(X²) — Expected Value of X Squared

We frequently need E(X²) to calculate variance. Apply the same idea but square each x first:

E(X²) = Σ x² · P(X = x)
Example (continued): Find E(X²) for the distribution above.

1²×0.1 = 0.1,   2²×0.3 = 1.2,   3²×0.4 = 3.6,   4²×0.2 = 3.2

E(X²) = 0.1 + 1.2 + 3.6 + 3.2 = 8.1

E(g(X)) — Expectation of a Function

For any function g, apply g to each value of X then weight by probabilities:

E(g(X)) = Σ g(x) · P(X = x)
Example: Find E(3X − 1) for the distribution above.
g(x) = 3x−1. Values: g(1)=2, g(2)=5, g(3)=8, g(4)=11

E(3X−1) = 2(0.1) + 5(0.3) + 8(0.4) + 11(0.2)
= 0.2 + 1.5 + 3.2 + 2.2 = 7.1

Alternatively: E(3X−1) = 3E(X)−1 = 3(2.7)−1 = 8.1−1 = 7.1 ✓

Interpretation

E(X) is the balance point of the distribution. If you drew the probability distribution as a histogram and put it on a see-saw, E(X) is where it balances. E(X) does not have to be an integer or even a possible value of X — for example, when rolling a fair die, E(X) = 3.5, which is not a face value.

E(X) for a Symmetric Distribution

If the probability distribution is symmetric about a value m (i.e. P(X = m+k) = P(X = m−k) for all k), then E(X) = m by symmetry. This provides a useful check on your calculations.

Learn 3 — Variance Var(X)

Why Variance?

Two distributions can have the same mean but very different spreads. The variance measures how spread out the values of X are around the mean E(X). A large variance means values are widely scattered; a small variance means they cluster close to the mean.

The Variance Formula

Var(X) = E(X²) − [E(X)]²

This is the computational formula. It equals the definitional formula E[(X − μ)²] but is much easier to calculate (see Proof Bank for the derivation).

Step-by-Step Calculation

Example: For the distribution with x = 1,2,3,4 and probs 0.1, 0.3, 0.4, 0.2:

Step 1: Find E(X). From Learn 2: E(X) = 2.7

Step 2: Find E(X²). From Learn 2: E(X²) = 8.1

Step 3: Apply the formula:
Var(X) = E(X²) − [E(X)]² = 8.1 − (2.7)² = 8.1 − 7.29 = 0.81

Standard Deviation

SD(X) = √Var(X)

The standard deviation is in the same units as X (variance is in squared units). From the example above:

SD(X) = √0.81 = 0.9

Interpretation of Variance and SD

• Var(X) = 0 means X always takes the same value (no randomness).
• Large Var(X) means outcomes spread far from the mean — high uncertainty.
• SD(X) gives the typical distance of X from its mean in the original units.
• SD is often more interpretable than variance because it shares the units of X.

Another Full Example

Example: X has the distribution below. Find Var(X) and SD(X).

x−2013
P(X=x)0.250.400.200.15

E(X) = (−2)(0.25) + 0(0.40) + 1(0.20) + 3(0.15)
= −0.5 + 0 + 0.2 + 0.45 = 0.15

E(X²) = (−2)²(0.25) + 0²(0.40) + 1²(0.20) + 3²(0.15)
= 4(0.25) + 0 + 1(0.20) + 9(0.15) = 1 + 0 + 0.2 + 1.35 = 2.55

Var(X) = 2.55 − (0.15)² = 2.55 − 0.0225 = 2.5275
SD(X) = √2.5275 ≈ 1.590
Critical warning: Var(X) ≥ 0 always. If you get a negative variance, you have made an arithmetic error — most likely in squaring E(X). Double-check [E(X)]² carefully.

Learn 4 — E(aX+b) and Var(aX+b)

Linear Transformation Rules

When we scale a random variable by a constant a and shift it by b, the mean and variance change according to simple rules:

E(aX + b) = a·E(X) + b
Var(aX + b) = a²·Var(X)

Note: adding a constant b shifts the distribution but does NOT change the spread, so b drops out of the variance formula. Multiplying by a stretches the distribution, scaling the variance by a².

Special Cases

E(X + b) = E(X) + b  (shift by b; variance unchanged: Var(X+b) = Var(X))
E(aX) = aE(X)  (scale by a; Var(aX) = a²Var(X))
E(b) = b  (constant random variable has variance 0)
Var(b) = 0  (a constant has no spread)

Worked Example

Example: X has E(X) = 3 and Var(X) = 4. Find E(2X+5) and Var(2X+5).

E(2X+5) = 2·E(X) + 5 = 2(3) + 5 = 6 + 5 = 11

Var(2X+5) = 2²·Var(X) = 4 × 4 = 16
Example: X has E(X) = 5 and Var(X) = 9. Find E(3 − X) and Var(3 − X).

Write 3 − X = −1·X + 3, so a = −1, b = 3.
E(3−X) = (−1)E(X) + 3 = −5 + 3 = −2

Var(3−X) = (−1)²·Var(X) = 1 × 9 = 9
(Reflecting the distribution does not change its spread.)

Why b Does Not Appear in Var(aX+b)

Intuitively: adding a constant b shifts every value of X up by b. This shifts the mean by b too, so the deviations (X − mean) are unchanged. Since variance depends only on deviations, Var(X+b) = Var(X).

Sum of Independent Random Variables

If X and Y are independent random variables:

E(X + Y) = E(X) + E(Y)     Var(X + Y) = Var(X) + Var(Y)
Example: X has E(X)=4, Var(X)=3. Y has E(Y)=6, Var(Y)=5. X, Y independent.
E(X+Y) = 4 + 6 = 10
Var(X+Y) = 3 + 5 = 8

E(X−Y) = E(X) − E(Y) = 4 − 6 = −2
Var(X−Y) = Var(X) + Var(Y) = 3 + 5 = 8 (variances always add for independent variables)
The most common error is writing Var(aX+b) = aVar(X). Remember: it is a²Var(X). The square on a is essential because variance is in squared units. When a = −1, a² = 1, so negating X leaves the variance unchanged.

Learn 5 — Probability Distributions from Context

Setting Up a Distribution from a Word Problem

Many exam questions ask you to construct the probability distribution of X. Follow this systematic process:

Step 1: Identify all possible values of X.
Step 2: For each value, calculate P(X = x) using basic probability rules.
Step 3: Arrange in a table and verify the probabilities sum to 1.
Step 4: Use the table to find E(X), Var(X) or answer specific questions.

Example — Balls in a Bag

Example: A bag contains 3 red and 2 blue balls. Two balls are drawn without replacement. X = number of red balls drawn. Set up the distribution of X.

Possible values: X = 0, 1, 2.

P(X=0) = P(both blue) = (2/5)(1/4) = 2/20 = 1/10
P(X=2) = P(both red) = (3/5)(2/4) = 6/20 = 3/10
P(X=1) = 1 − 1/10 − 3/10 = 6/10 = 3/5

x012
P(X=x)1/103/53/10

Check: 1/10 + 6/10 + 3/10 = 10/10 = 1 ✓

Games and Gambling Contexts

Example: A game costs £2 to play. A fair die is rolled. If you score 6, you win £8. If you score 4 or 5, you win £3. Otherwise you win nothing. Let X = profit (winnings minus cost).

Possible profit values:
Score 6: profit = 8 − 2 = £6, P = 1/6
Score 4 or 5: profit = 3 − 2 = £1, P = 2/6 = 1/3
Score 1,2,3: profit = 0 − 2 = −£2, P = 3/6 = 1/2

x (profit)−216
P(X=x)1/21/31/6

E(X) = −2(1/2) + 1(1/3) + 6(1/6) = −1 + 1/3 + 1 = 1/3 ≈ £0.33
E(profit) > 0 so on average the player makes a profit — the game favours the player.

Fairness of a Game

A game is fair if E(profit) = 0
Example: In the game above, what entry cost c makes the game fair?
Recalculate with cost c: E(profit) = (8−c)(1/6) + (3−c)(1/3) + (0−c)(1/2)
= 8/6 + 3/3 − c(1/6 + 1/3 + 1/2) = 4/3 + 1 − c(1) = 7/3 − c
Set E(profit) = 0: c = 7/3 ≈ £2.33

Finding Unknown Constant k

Example: P(X=x) = kx for x = 1, 2, 3, 4. Find k.

Using ΣP = 1: k(1) + k(2) + k(3) + k(4) = 1
10k = 1 ⇒ k = 1/10

Verify: P(X=1)=0.1, P(X=2)=0.2, P(X=3)=0.3, P(X=4)=0.4. Sum = 1 ✓
Always define X precisely before constructing the table. State clearly whether X represents profit, net gain, number of successes, etc. Marks are awarded for correct definitions in exam questions.

Worked Examples

Example 1 — Verify a Probability Distribution

Determine whether the following is a valid probability distribution for X, where x = 1, 2, 3, 4, 5 and P(X=x) = 0.15, 0.30, 0.25, 0.20, 0.10.

Step 1: Check all probabilities are non-negative: 0.15, 0.30, 0.25, 0.20, 0.10 are all ≥ 0. ✓ M1
Step 2: Sum the probabilities: 0.15 + 0.30 + 0.25 + 0.20 + 0.10 = 1.00 ✓ M1
Conclusion: Both conditions are satisfied. This is a valid probability distribution. A1

Example 2 — Calculate E(X)

X has probability distribution: x = 0, 1, 2, 3; P(X=x) = 1/8, 3/8, 3/8, 1/8. Find E(X).

Step 1: Multiply each x by P(X=x):
0×(1/8) = 0,   1×(3/8) = 3/8,   2×(3/8) = 6/8,   3×(1/8) = 3/8 M1
Step 2: E(X) = 0 + 3/8 + 6/8 + 3/8 = 12/8 = 3/2 = 1.5 A1
Check by symmetry: The distribution is symmetric about x = 1.5, confirming E(X) = 1.5. ✓

Example 3 — Calculate Var(X)

Using the distribution from Example 2 (x = 0,1,2,3; P = 1/8, 3/8, 3/8, 1/8), find Var(X) and SD(X).

Step 1: E(X) = 1.5 (from above) B1
Step 2: Find E(X²): 0²(1/8) + 1²(3/8) + 2²(3/8) + 3²(1/8) = 0 + 3/8 + 12/8 + 9/8 = 24/8 = 3 M1
Step 3: Var(X) = E(X²) − [E(X)]² = 3 − (1.5)² = 3 − 2.25 = 0.75 A1
Step 4: SD(X) = √0.75 = √(3/4) = (√3)/2 ≈ 0.866 A1

Example 4 — Find E(2X+3) and Var(2X+3)

X has E(X) = 4.2 and Var(X) = 2.56. Find E(2X+3) and Var(2X+3).

E(2X+3): = 2E(X) + 3 = 2(4.2) + 3 = 8.4 + 3 = 11.4 B1
Var(2X+3): = 2²·Var(X) = 4 × 2.56 = 10.24 B1
Note: The +3 shifts the mean but has no effect on variance. The coefficient 2 multiplies E(X) but its square (4) multiplies Var(X).

Example 5 — Distribution from Rolling Two Dice

Two fair dice are rolled. X = |difference of the two scores|. Set up the probability distribution of X.

Step 1: List possible differences: |1−1|=0, ..., |6−1|=5. So X ∈ {0,1,2,3,4,5}. M1
Step 2: Count favourable outcomes from 36 equally likely pairs:
X=0: (1,1),(2,2),(3,3),(4,4),(5,5),(6,6) → 6 pairs → P = 6/36
X=1: (1,2),(2,1),(2,3),(3,2),(3,4),(4,3),(4,5),(5,4),(5,6),(6,5) → 10 pairs → P = 10/36
X=2: 8 pairs → P = 8/36   X=3: 6 pairs → P = 6/36   X=4: 4 pairs → P = 4/36   X=5: 2 pairs → P = 2/36 M1
Step 3: Check: 6+10+8+6+4+2 = 36/36 = 1 ✓ A1
E(X) = 0(6/36)+1(10/36)+2(8/36)+3(6/36)+4(4/36)+5(2/36) = (0+10+16+18+16+10)/36 = 70/36 ≈ 1.944 A1

Example 6 — Profit/Loss Distribution

A spinner has 4 equal sectors labelled 1, 2, 3, 4. You pay £1.50 to spin. If it lands on 4 you win £4; on 3 you win £2; otherwise nothing. Find the expected profit.

Define X: profit = winnings − cost. Values:
Lands 4: profit = 4 − 1.5 = £2.50, P = 1/4
Lands 3: profit = 2 − 1.5 = £0.50, P = 1/4
Lands 1 or 2: profit = 0 − 1.5 = −£1.50, P = 2/4 = 1/2 M1
E(X) = 2.5(1/4) + 0.5(1/4) + (−1.5)(1/2) = 0.625 + 0.125 − 0.75 = 0 A1
Conclusion: E(profit) = 0, so the game is fair.

Example 7 — Find Unknown Constant k

The random variable X has P(X=x) = k(x²+1) for x = 0, 1, 2, 3. Find the value of k, then find E(X).

Step 1: List P(X=x): k(0+1)=k, k(1+1)=2k, k(4+1)=5k, k(9+1)=10k M1
Step 2: Use ΣP=1: k + 2k + 5k + 10k = 18k = 1 ⇒ k = 1/18 A1
Step 3: Distribution: P(X=0)=1/18, P(X=1)=2/18, P(X=2)=5/18, P(X=3)=10/18 B1
Step 4: E(X) = 0(1/18)+1(2/18)+2(5/18)+3(10/18) = (0+2+10+30)/18 = 42/18 = 7/3 ≈ 2.33 A1

Example 8 — Cumulative Distribution Function

X has distribution: x = 1,2,3,4,5; P = 0.05, 0.20, 0.45, 0.25, 0.05. Build the CDF and find P(2 ≤ X < 4).

Build CDF row:
F(1)=0.05, F(2)=0.25, F(3)=0.70, F(4)=0.95, F(5)=1.00 M1
Find P(2 ≤ X < 4):
P(2 ≤ X < 4) = P(X=2)+P(X=3) = F(3) − F(1) = 0.70 − 0.05 = 0.65 A1
Alternative: P(2 ≤ X < 4) = 0.20 + 0.45 = 0.65 ✓

Common Mistakes

Mistake 1 — Using Var(aX+b) = aVar(X) instead of a²Var(X)

✗ WRONG: Var(3X+2) = 3 × Var(X) = 3 × 4 = 12
✓ RIGHT: Var(3X+2) = 3² × Var(X) = 9 × 4 = 36. The coefficient must be squared!

Mistake 2 — Forgetting to Square a in Variance Scaling

✗ WRONG: Var(5X) = 5 × Var(X)
✓ RIGHT: Var(5X) = 5² × Var(X) = 25Var(X). Always square the multiplier of X.

Mistake 3 — Confusing E(X²) with [E(X)]²

✗ WRONG: Thinking E(X²) = [E(X)]². These are different quantities!
✓ RIGHT: Var(X) = E(X²) − [E(X)]². The difference E(X²) − [E(X)]² is always ≥ 0, equalling 0 only when X is constant. E(X²) is computed by Σ x²P(X=x); [E(X)]² is the square of the mean.

Mistake 4 — Probabilities Not Summing to 1

✗ WRONG: Declaring k = 1/5 when P(X=x) = kx for x=1,2,3,4 without checking: (1/5)(1+2+3+4) = 10/5 = 2 ≠ 1.
✓ RIGHT: Σ P = k·Σx = k(10) = 1 ⟹ k = 1/10. Always set the full sum equal to 1 and solve.

Mistake 5 — Including b in the Variance Calculation

✗ WRONG: Var(2X+3) = 2²Var(X) + 3 = 4Var(X) + 3
✓ RIGHT: Var(2X+3) = 2²Var(X) = 4Var(X). The constant +3 has zero effect on variance — it only shifts the mean.

Mistake 6 — Negative Variance

✗ WRONG: Var(X) = E(X²) − [E(X)]² = 5.1 − 6.25 = −1.15 (accepted without checking)
✓ RIGHT: Variance is always ≥ 0. A negative result always means an arithmetic error — re-check E(X) and E(X²) calculations carefully.

Mistake 7 — Mis-reading "At Least" or "More Than" with CDF

✗ WRONG: P(X ≥ 3) = F(3) (using CDF directly for "at least")
✓ RIGHT: P(X ≥ 3) = 1 − F(2) = 1 − P(X ≤ 2). For "more than": P(X > 3) = 1 − F(3).

Mistake 8 — Confusing Independent and Mutually Exclusive Events in Sums

✗ WRONG: For independent X,Y: Var(X−Y) = Var(X) − Var(Y)
✓ RIGHT: Var(X−Y) = Var(X) + (−1)²Var(Y) = Var(X) + Var(Y). Variances always ADD for independent variables, even when subtracting.

Key Formulas

FormulaExpressionNotes
Valid DistributionΣ P(X=x) = 1, P(X=x) ≥ 0Both conditions required
CDFF(x) = P(X ≤ x) = Σt ≤ x P(X=t)Non-decreasing step function
P from CDFP(X=x) = F(x) − F(x−1)For integer-valued X
Range probabilityP(a < X ≤ b) = F(b) − F(a)Note strict vs non-strict inequality
E(X)Σ x · P(X=x)Weighted mean; long-run average
E(X²)Σ x² · P(X=x)NOT equal to [E(X)]²
E(g(X))Σ g(x) · P(X=x)Apply g before weighting
Var(X)E(X²) − [E(X)]²Always ≥ 0
SD(X)√Var(X)Same units as X
E(aX+b)a·E(X) + bLinear scaling of mean
Var(aX+b)a²·Var(X)b has no effect; a is squared
E(X+Y)E(X) + E(Y)Always true (linearity)
Var(X+Y)Var(X) + Var(Y)Only if X, Y independent
Var(X−Y)Var(X) + Var(Y)Only if X, Y independent (always add)
Fairness conditionE(profit) = 0Expected net gain = 0

Proof Bank

Proof 1 — Var(X) = E(X²) − [E(X)]²

The definitional formula for variance is Var(X) = E[(X − μ)²] where μ = E(X).

Expand the square inside the expectation:

E[(X − μ)²] = E[X² − 2μX + μ²]

Apply the linearity of expectation (E of a sum = sum of E's, constants factor out):

= E(X²) − 2μE(X) + μ²

Since μ = E(X), we substitute E(X) for μ:

= E(X²) − 2E(X)·E(X) + [E(X)]²

= E(X²) − 2[E(X)]² + [E(X)]²

= E(X²) − [E(X)]²   Q.E.D.

Proof 2 — E(aX+b) = aE(X)+b

By definition, E(aX+b) = Σ (ax+b) · P(X=x)

Split the sum using linearity of summation:

= Σ ax · P(X=x) + Σ b · P(X=x)

= a Σ x · P(X=x) + b Σ P(X=x)

Since Σ P(X=x) = 1 (valid distribution) and Σ x·P(X=x) = E(X):

= aE(X) + b·1 = aE(X) + b   Q.E.D.

Proof 3 — Var(aX+b) = a²Var(X)

Let Y = aX + b. Then E(Y) = aE(X) + b (from Proof 2).

Var(Y) = E[(Y − E(Y))²]

Substitute Y = aX+b and E(Y) = aE(X)+b:

Y − E(Y) = (aX+b) − (aE(X)+b) = aX − aE(X) = a(X − E(X))

Therefore:

Var(Y) = E[{a(X − E(X))}²] = E[a²(X − E(X))²]

= a² E[(X − E(X))²]

= a² Var(X)   Q.E.D.

Note: b disappears because it cancels when we subtract the mean. This is why the constant b has no effect on variance.

Distribution Visualiser

Enter a probability distribution (up to 5 values). Type the x-values in the top row and probabilities in the bottom row, then click Compute to see E(X), Var(X) and a bar chart.

x
P(X=x)
Enter values above and click Compute.

Exercise 1 — Reading Probability Distributions and CDF (10 Questions)

Exercise 2 — Calculating E(X) (10 Questions)

Exercise 3 — Calculating Var(X) and Standard Deviation (10 Questions)

Exercise 4 — E(aX+b) and Var(aX+b) (10 Questions)

Exercise 5 — Setting Up Distributions and Finding Unknown k (10 Questions)

Practice — 30 Mixed Questions

Challenge — 15 Harder Questions

Exam Style Questions (8 Questions)

These questions mirror Cambridge A-Level 9709 style. Show all working. Click "Show Mark Scheme" to reveal the answer.

Question 1 [5 marks]

The discrete random variable X has the probability distribution shown in the table.

x12345
P(X=x)0.05p0.350.250.15

(a) Find the value of p.   [1]
(b) Find E(X).   [2]
(c) Find Var(X).   [2]

(a) p = 1 − 0.05 − 0.35 − 0.25 − 0.15 = 0.20 [B1]
(b) E(X) = 1(0.05)+2(0.20)+3(0.35)+4(0.25)+5(0.15) = 0.05+0.40+1.05+1.00+0.75 = 3.25 [M1 A1]
(c) E(X²) = 1(0.05)+4(0.20)+9(0.35)+16(0.25)+25(0.15) = 0.05+0.80+3.15+4.00+3.75 = 11.75 [M1]
Var(X) = 11.75 − (3.25)² = 11.75 − 10.5625 = 1.1875 [A1]

Question 2 [4 marks]

The random variable X has P(X=r) = kr for r = 1, 2, 3, 4, 5.
(a) Find k.   [2]
(b) Find E(X) and E(3X − 1).   [2]

(a) ΣP = k(1+2+3+4+5) = 15k = 1 ⇒ k = 1/15 [M1 A1]
(b) E(X) = Σr · (r/15) = (1/15)(1+4+9+16+25) = 55/15 = 11/3 ≈ 3.667 [M1]
E(3X−1) = 3E(X) − 1 = 3(11/3) − 1 = 11 − 1 = 10 [A1]

Question 3 [6 marks]

A bag contains 4 red balls and 2 blue balls. Three balls are drawn at random without replacement. The random variable X denotes the number of red balls drawn.
(a) Show that P(X=2) = 12/20 = 3/5.   [2]
(b) Find the complete probability distribution of X.   [2]
(c) Find E(X) and Var(X).   [2]

(a) P(X=2) = C(4,2)×C(2,1)/C(6,3) = 6×2/20 = 12/20 = 3/5 [M1 A1]
(b) P(X=0) = C(2,3)/C(6,3): impossible (only 2 blue), so P(X=0) = 0
P(X=1) = C(4,1)×C(2,2)/C(6,3) = 4×1/20 = 4/20 = 1/5
P(X=3) = C(4,3)/C(6,3) = 4/20 = 1/5
Check: 0 + 1/5 + 3/5 + 1/5 = 1 ✓ [M1 A1]
(c) E(X) = 1(1/5)+2(3/5)+3(1/5) = 1/5+6/5+3/5 = 10/5 = 2 [M1]
E(X²) = 1(1/5)+4(3/5)+9(1/5) = (1+12+9)/5 = 22/5
Var(X) = 22/5 − 4 = 2/5 = 0.4 [A1]

Question 4 [5 marks]

X and Y are independent random variables. E(X) = 3, Var(X) = 2, E(Y) = 5, Var(Y) = 3.
Find: (a) E(2X + 3Y)   [2]    (b) Var(2X − Y + 1)   [3]

(a) E(2X+3Y) = 2E(X)+3E(Y) = 2(3)+3(5) = 6+15 = 21 [M1 A1]
(b) Var(2X−Y+1) = Var(2X) + Var(Y) (independence; constant +1 adds nothing)
= 2²Var(X) + (−1)²Var(Y) = 4(2) + 1(3) = 8+3 = 11 [M1 M1 A1]

Question 5 [5 marks]

The CDF of X is given by F(x) = 0 for x<1; F(1)=0.15; F(2)=0.40; F(3)=0.72; F(4)=0.91; F(5)=1.
(a) Write down P(X=3).   [1]
(b) Find P(2 ≤ X < 5).   [2]
(c) Find P(X > 3).   [2]

(a) P(X=3) = F(3) − F(2) = 0.72 − 0.40 = 0.32 [B1]
(b) P(2 ≤ X < 5) = P(X=2)+P(X=3)+P(X=4) = F(4) − F(1) = 0.91 − 0.15 = 0.76 [M1 A1]
(c) P(X > 3) = 1 − F(3) = 1 − 0.72 = 0.28 [M1 A1]

Question 6 [6 marks]

A game costs £c to play. A fair die is rolled. Score 5 or 6: win £6. Score 3 or 4: win £2. Score 1 or 2: win nothing.
(a) Let X = profit. For c = 2.5, find the distribution of X and show E(X) = −0.5.   [4]
(b) Find the value of c that makes the game fair.   [2]

(a) Values of profit (c=2.5): 6−2.5=3.5 (P=1/3); 2−2.5=−0.5 (P=1/3); 0−2.5=−2.5 (P=1/3) [M1 A1]
E(X) = 3.5(1/3) + (−0.5)(1/3) + (−2.5)(1/3) = (3.5−0.5−2.5)/3 = 0.5/3 ≠ −0.5
Correction: E(X) = (3.5−0.5−2.5)/3 = 0.5/3 ≈ 0.167. Use c=2.5+0.167 ≈ 2.667 for fair game.
Fair game: E(profit) = 0 ⟹ E(winnings) = c [M1]
E(winnings) = 6(1/3)+2(1/3)+0(1/3) = 8/3 ≈ 2.667
c = 8/3 ≈ £2.67 [A1]

Question 7 [4 marks]

X has E(X) = μ and Var(X) = σ². Given that E(3X−2) = 7 and Var(3X−2) = 36, find μ and σ.

E(3X−2) = 3μ−2 = 7 ⇒ 3μ = 9 ⇒ μ = 3 [M1 A1]
Var(3X−2) = 9σ² = 36 ⇒ σ² = 4 ⇒ σ = 2 [M1 A1]

Question 8 [7 marks]

The discrete random variable X has P(X=x) = a + bx for x = 1, 2, 3, 4, where a and b are constants.
Given that E(X) = 2.6, find the values of a and b, and hence find Var(X).

ΣP = (a+b)+(a+2b)+(a+3b)+(a+4b) = 4a+10b = 1 ... (i) [M1]
E(X) = 1(a+b)+2(a+2b)+3(a+3b)+4(a+4b) = 10a+30b = 2.6 ... (ii) [M1]
From (i): 4a+10b=1. From (ii): 10a+30b=2.6 ⟹ a+3b=0.26 [M1]
From (i): 2a+5b=0.5; from a=0.26−3b: 2(0.26−3b)+5b=0.5 ⟹ 0.52−6b+5b=0.5 ⟹ b=0.02
a = 0.26−3(0.02) = 0.26−0.06 = 0.20
a = 0.20, b = 0.02 [A1 A1]
E(X²) = 1(0.22)+4(0.24)+9(0.26)+16(0.28) = 0.22+0.96+2.34+4.48 = 8.00 [M1]
Var(X) = 8.00 − (2.6)² = 8.00 − 6.76 = 1.24 [A1]

Past Paper Questions

These questions are representative of Cambridge 9709 S1 past papers on Discrete Random Variables. Attempt fully before revealing the solution.

Past Paper Q1 — (Nov 2019 style) [6 marks]

The random variable X has the following probability distribution.
P(X=0) = 2k, P(X=1) = 3k, P(X=2) = 4k, P(X=3) = k.
(a) Find k.   [1]
(b) Find E(X) and show that Var(X) = 0.86 (to 2 d.p.).   [4]
(c) Find P(X > E(X)).   [1]

(a) 2k+3k+4k+k = 10k = 1 ⇒ k = 0.1
Distribution: P(0)=0.2, P(1)=0.3, P(2)=0.4, P(3)=0.1
(b) E(X) = 0(0.2)+1(0.3)+2(0.4)+3(0.1) = 0+0.3+0.8+0.3 = 1.4
E(X²) = 0(0.2)+1(0.3)+4(0.4)+9(0.1) = 0+0.3+1.6+0.9 = 2.8
Var(X) = 2.8 − (1.4)² = 2.8 − 1.96 = 0.84
(c) E(X) = 1.4, so P(X > 1.4) = P(X=2)+P(X=3) = 0.4+0.1 = 0.5

Past Paper Q2 — (Jun 2018 style) [5 marks]

Two fair dice are rolled and X is the smaller of the two scores (or the common score if they are equal).
(a) Show that P(X=1) = 11/36.   [2]
(b) Given that P(X=2)=9/36, P(X=3)=7/36, P(X=4)=5/36, P(X=5)=3/36, P(X=6)=1/36, find E(X).   [3]

(a) P(X=1) = P(at least one die shows 1) = 1 − P(neither shows 1) = 1 − (5/6)² = 1 − 25/36 = 11/36 ✓
Or: count pairs: (1,1),(1,2),(2,1),(1,3),(3,1),(1,4),(4,1),(1,5),(5,1),(1,6),(6,1) = 11 pairs → 11/36 ✓
(b) E(X) = 1(11/36)+2(9/36)+3(7/36)+4(5/36)+5(3/36)+6(1/36)
= (11+18+21+20+15+6)/36 = 91/36 ≈ 2.528

Past Paper Q3 — (Nov 2020 style) [6 marks]

X has E(X) = 5 and Var(X) = 4. Y = 3X − 2.
(a) Find E(Y) and Var(Y).   [2]
(b) Given also that E(X²) = c, write down the value of c.   [1]
(c) Z = X + Y. Find E(Z) and, assuming X and Y are independent, Var(Z).   [3]

(a) E(Y) = 3(5)−2 = 13; Var(Y) = 9(4) = 36
(b) Var(X) = E(X²)−[E(X)]² ⟹ 4 = c − 25 ⟹ c = 29
(c) E(Z) = E(X)+E(Y) = 5+13 = 18
Var(Z) = Var(X)+Var(Y) = 4+36 = 40

Past Paper Q4 — (Jun 2021 style) [7 marks]

A bag contains 3 white and 5 black counters. Counters are drawn one at a time, without replacement, until a white counter is obtained or 3 counters have been drawn. X = total number of counters drawn.
(a) Find P(X=1), P(X=2), P(X=3).   [4]
(b) Show that E(X) = 79/40.   [2]
(c) Given that X=2, find the probability that exactly 1 counter was black.   [1]

(a) P(X=1): 1st is white = 3/8
P(X=2): 1st black, 2nd white = (5/8)(3/7) = 15/56
P(X=3): 1st black, 2nd black, 3rd anything = (5/8)(4/7) = 20/56 = 5/14
Check: 3/8+15/56+20/56 = 21/56+15/56+20/56 = 56/56 = 1 ✓
(b) E(X) = 1(3/8)+2(15/56)+3(20/56) = 21/56+30/56+60/56 = 111/56
Hmm, let's verify: 3/8 = 21/56. E(X) = 21/56+30/56+60/56 = 111/56 ≈ 1.982
(c) If X=2: either 1st white (not possible since X=2 means drew 2) — X=2 means 1st was black, 2nd white. So P(exactly 1 black | X=2) = 1.

Past Paper Q5 — (Nov 2022 style) [8 marks]

The probability distribution of X is given by P(X=x) = k(5−x) for x = 0, 1, 2, 3, 4.
(a) Find k.   [1]
(b) Find E(X) and Var(X).   [4]
(c) Find E(2−3X) and Var(2−3X).   [2]
(d) Find P(X < E(X)).   [1]

(a) Σk(5−x) = k(5+4+3+2+1) = 15k = 1 ⇒ k = 1/15
(b) Probs: x=0: 5/15=1/3; x=1: 4/15; x=2: 3/15=1/5; x=3: 2/15; x=4: 1/15
E(X) = 0(5/15)+1(4/15)+2(3/15)+3(2/15)+4(1/15) = (0+4+6+6+4)/15 = 20/15 = 4/3
E(X²) = 0(5/15)+1(4/15)+4(3/15)+9(2/15)+16(1/15) = (0+4+12+18+16)/15 = 50/15 = 10/3
Var(X) = 10/3 − (4/3)² = 10/3 − 16/9 = 30/9 − 16/9 = 14/9 ≈ 1.556
(c) E(2−3X) = 2−3(4/3) = 2−4 = −2
Var(2−3X) = (−3)²Var(X) = 9(14/9) = 14
(d) E(X) = 4/3 ≈ 1.333. P(X < 4/3) = P(X=0)+P(X=1) = 5/15+4/15 = 9/15 = 3/5