impera Open Impera

A levels Further Mathematics · Further statistics

Discrete random variables

1Probability distributions

A discrete random variable $X$ takes separate values $x_1, x_2, \ldots$ with probabilities $P(X = x_i)$. The probabilities must sum to 1.

The expectation (mean) of $X$ is

$$E(X) = \sum x\,P(X = x)$$

It is the long-run average value if the experiment is repeated many times.

Worked example

Expectation

  1. $X$ takes values 1, 2, 3, 4 with probabilities 0.1, 0.3, 0.4, 0.2.
  2. $E(X) = 0.1 + 0.6 + 1.2 + 0.8 = 2.7$.

The expectation need not be a value that $X$ can actually take.

Check yourself

What is the expectation of a fair six-sided die?

  • 6

  • 21

  • 3.5

  • 3

Show the answer

3.5

(1 + 2 + … + 6)/6.

2Variance

The variance measures spread:

$$\text{Var}(X) = E(X^2) - [E(X)]^2, \qquad E(X^2) = \sum x^2\,P(X = x)$$

The standard deviation is $\sqrt{\text{Var}(X)}$.

Worked example

Variance

  1. Using the distribution above: $E(X^2) = 0.1(1) + 0.3(4) + 0.4(9) + 0.2(16) = 8.1$.
  2. $\text{Var}(X) = 8.1 - 2.7^2 = 8.1 - 7.29 = 0.81$.
  3. Standard deviation $= 0.9$.

A common mistake is to square $E(X)$ before subtracting, but forget to calculate $E(X^2)$ separately: $E(X^2)$ is not $[E(X)]^2$.

Check yourself

Which formula gives the variance?

  • [E(X)]² − E(X²)

  • E(X²)

  • E(X²) − [E(X)]²

  • E(X)²/n

Show the answer

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

"Mean of the squares minus the square of the mean".

3Functions of a random variable

For constants $a$ and $b$:

$$E(aX + b) = aE(X) + b \qquad \text{Var}(aX + b) = a^2\text{Var}(X)$$

Adding a constant shifts the distribution but does not change its spread.

Worked example

Linear functions

  1. $E(X) = 2.7$, $\text{Var}(X) = 0.81$.
  2. $E(2X + 3) = 5.4 + 3 = 8.4$.
  3. $\text{Var}(2X + 3) = 4 \times 0.81 = 3.24$.

For a general function $g$, $E(g(X)) = \sum g(x)P(X = x)$. For example, $E\left(\frac{1}{X}\right) = \sum \frac{1}{x}P(X = x)$.

Check yourself

What is Var(5 − 3X) if Var(X) = 2?

  • 18

  • −6

  • 13

  • 6

Show the answer

18

(−3)² × 2.

4Sums of random variables

For any random variables $X$ and $Y$:

$$E(X \pm Y) = E(X) \pm E(Y)$$

If $X$ and $Y$ are independent:

$$\text{Var}(X \pm Y) = \text{Var}(X) + \text{Var}(Y)$$

Variances add even when you subtract the variables.

Worked example

Two independent variables

  1. $E(X) = 4$, $\text{Var}(X) = 1.5$; $E(Y) = 6$, $\text{Var}(Y) = 2$.
  2. $E(X - Y) = -2$; $\text{Var}(X - Y) = 3.5$.

Important difference: $X_1 + X_2$ (two independent copies) has variance $2\text{Var}(X)$, but $2X$ has variance $4\text{Var}(X)$.

Check yourself

X and Y are independent with variances 3 and 5. What is Var(X − Y)?

  • −2

  • 2

  • 8

  • 15

Show the answer

8

Variances add for independent variables.

5The discrete uniform and geometric distributions

A discrete uniform distribution on $1, 2, \ldots, n$ gives each value probability $\frac{1}{n}$:

$$E(X) = \frac{n + 1}{2} \qquad \text{Var}(X) = \frac{n^2 - 1}{12}$$

The geometric distribution counts the number of trials up to and including the first success, with success probability $p$:

$$P(X = x) = (1 - p)^{x - 1}p \qquad E(X) = \frac{1}{p} \qquad \text{Var}(X) = \frac{1 - p}{p^2}$$

Worked example

Geometric

  1. Each attempt at a game succeeds with probability 0.2.
  2. $P(\text{first success on the 3rd attempt}) = 0.8^2 \times 0.2 = 0.128$.
  3. $P(\text{more than 5 attempts needed}) = 0.8^5 = 0.328$ (the first 5 all fail).
  4. Expected number of attempts: $\frac{1}{0.2} = 5$.
Check yourself

What is the mean number of trials to the first success when p = 0.25?

  • 0.75

  • 0.25

  • 3

  • 4

Show the answer

4

E(X) = 1/p.

6Modelling with discrete distributions

Choose a model by matching the situation:

  • Binomial: fixed number of independent trials, counting successes.
  • Geometric: independent trials until the first success.
  • Discrete uniform: all outcomes equally likely.
  • Poisson: events occurring randomly in time or space.
Worked example

A game's fairness

  1. A game costs £2. You win £10 with probability 0.1, £3 with probability 0.2, and nothing otherwise.
  2. Expected winnings: $10(0.1) + 3(0.2) = £1.60$.
  3. Expected profit: $1.60 - 2 = -£0.40$ per game, so the game favours the organiser.

A game is fair if the expected profit is zero.

Check yourself

When is a game said to be fair?

  • When the player always wins

  • When every outcome is equally likely

  • When the expected profit is zero

  • When the stake is small

Show the answer

When the expected profit is zero

On average, neither side gains.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera