Discrete Random Variables, Expectation and Variance (DSE M1)

A discrete random variable X takes separate values, each with a probability, and the probabilities add up to 1. Its expectation is E(X) = Σ x P(X = x) and its variance is Var(X) = E(X²) − [E(X)]².

Solve Discrete Random Variables: Expectation and Variance questions with AI
The distribution of Example 1 as a bar chart, with the expectation E(X) = 1.7 marked by the dashed line. Try it yourself →

Expectation and Variance Formulas

Probabilities0 ≤ P(X = x) ≤ 1, Σ P(X = x) = 1
ExpectationE(X) = Σ x P(X = x)
Function of XE[g(X)] = Σ g(x) P(X = x)
VarianceVar(X) = E[(X − μ)²] = E(X²) − [E(X)]²
Linear changeE(aX + b) = aE(X) + b, Var(aX + b) = a²Var(X)

Worked Examples — Discrete Random Variables: Expectation and Variance

Example 1: Expectation and variance from a table

X takes the values 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2. Find E(X), Var(X), E(3X + 2) and Var(3X + 2).

  1. E(X) = 0(0.1) + 1(0.3) + 2(0.4) + 3(0.2) = 1.7
  2. E(X²) = 0(0.1) + 1(0.3) + 4(0.4) + 9(0.2) = 3.7
  3. Var(X) = 3.7 − 1.7² = 0.81
  4. E(3X + 2) = 3(1.7) + 2 = 7.1
  5. Var(3X + 2) = 3² × 0.81 = 7.29

Answer: E(X) = 1.7, Var(X) = 0.81, E(3X + 2) = 7.1, Var(3X + 2) = 7.29

Example 2: Finding an unknown constant in a distribution

The probability function of X is P(X = x) = kx for x = 1, 2, 3, 4. Find k and E(X).

  1. The probabilities add up to 1: k(1 + 2 + 3 + 4) = 1
  2. k = 0.1
  3. E(X) = 0.1(1² + 2² + 3² + 4²) = 0.1 × 30 = 3

Answer: k = 0.1, E(X) = 3

💡 Exam Traps & Secrets

⚠️ Var(aX + b) uses a², and b disappearsAdding a constant shifts every value by the same amount, so the spread is unchanged. Multiplying by a multiplies the variance by a², never by a.
⚠️ E(X²) is not [E(X)]²Square the values first, then weight by the probabilities. In Example 1, E(X²) = 3.7 while [E(X)]² = 2.89; the difference is the variance.

✏️ Self-Test: Quick Interactive Practice

How to study: Click any question below to instantly load it on the coordinate grid and check your steps.

(E(X) and Var(X))X takes values 1, 2, 3 with probabilities 0.2, 0.5, 0.3. Find E(X) and Var(X) and show the distribution as a bar chart.
(Linear change)If E(X) = 4 and Var(X) = 2.5, find E(2X − 3) and Var(2X − 3).
(Uniform distribution)A fair die is thrown. Let X be the score. Find E(X) and Var(X).

Frequently Asked Questions

Related Topics

The Binomial DistributionThe Poisson DistributionConditional Probability and Bayes’ TheoremDSE M1: all topicsDSE M1 formula sheetM1 vs M2DSE M2 notesHKDSE Math: all topics
Try a Discrete Random Variables: Expectation and Variance DSE Practice Question