Discrete random variables

A discrete random variable takes separate values, each with a probability. Its probability distribution lists the values and their probabilities. From it you can find the expected value (the long-run mean) and the variance.

Key facts

  • The probabilities in a distribution add up to 1.
  • E(X) = Σ x P(X = x).
  • E(X²) = Σ x² P(X = x). Then Var(X) = E(X²) − [E(X)]².
  • E(aX + b) = aE(X) + b and Var(aX + b) = a² Var(X).
  • For independent X and Y: E(X + Y) = E(X) + E(Y) and Var(X ± Y) = Var(X) + Var(Y).
  • The cumulative distribution function is F(x) = P(X ≤ x).

Worked examples

Example 1

X has the distribution shown. Find k and E(X).

  1. The probabilities add up to 1. 0.1 + 0.3 + k + 0.2 = 1, k = 0.4
  2. Multiply each value by its probability, then add. E(X) = 1×0.1 + 2×0.3 + 3×0.4 + 4×0.2 = 2.7

Answer: k = 0.4, E(X) = 2.7

Example 2

For the same X, find Var(X), E(3X − 2) and Var(3X − 2).

  1. Find E(X²). E(X²) = 1×0.1 + 4×0.3 + 9×0.4 + 16×0.2 = 8.1
  2. Take away the square of the mean. Var(X) = 8.1 − 2.7² = 0.81
  3. The mean is scaled and shifted. E(3X − 2) = 3 × 2.7 − 2 = 6.1
  4. The variance is only scaled, by 3². Var(3X − 2) = 3² × 0.81 = 7.29

Answer: Var(X) = 0.81, E(3X − 2) = 6.1, Var(3X − 2) = 7.29

Example 3

A box of fruit costs a stall-holder £2. It sells for £10 with probability 0.1 and for £5 with probability 0.2. Otherwise it does not sell. What is the expected profit per box?

  1. Expected takings in £: 10 × 0.1 + 5 × 0.2 = 2
  2. Take off the £2 cost. On average the stall-holder neither gains nor loses. 2 − 2 = 0

Answer: £0: on average the stall-holder breaks even.

Example 4

X takes the values 1, 2 and 3 with probabilities 0.2, 0.5 and 0.3. Find E(X).

  1. Multiply each value by its probability and add. 1 × 0.2 + 2 × 0.5 + 3 × 0.3 = 2.1

Answer: 2.1