Skip to main content
SingaporeMathsSyllabus dot point

How do we describe a discrete random variable and compute its expectation and variance?

Construct probability distributions for discrete random variables and compute the expectation and variance, including for functions of the variable

A focused answer to the H2 Mathematics outcome on discrete random variables. Building a probability distribution, the expectation and variance formulae, and the effect of linear transformations on mean and variance.

Generated by Claude Opus 4.89 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

SEAB wants you to construct a probability distribution for a discrete random variable, verify it, and compute the expectation (mean) and variance, including for linear functions of the variable.

The answer

A discrete probability distribution

A discrete random variable XX takes a countable set of values, each with a probability P(X=x)\mathrm{P}(X = x). A valid distribution satisfies:

xP(X=x)=1,0P(X=x)1.\sum_x \mathrm{P}(X = x) = 1, \qquad 0 \leq \mathrm{P}(X = x) \leq 1.

The total-probability condition is often used to find an unknown constant.

Expectation

The expectation (mean) is the long-run average value:

E(X)=xxP(X=x).\mathrm{E}(X) = \sum_x x\,\mathrm{P}(X = x).

For a function, E(g(X))=xg(x)P(X=x)\mathrm{E}(\mathrm{g}(X)) = \sum_x \mathrm{g}(x)\,\mathrm{P}(X = x); in particular E(X2)=xx2P(X=x)\mathrm{E}(X^2) = \sum_x x^2 \mathrm{P}(X = x).

Variance

The variance measures spread:

Var(X)=E(X2)[E(X)]2.\operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2.

This computational form is almost always easier than the definition E((Xμ)2)\mathrm{E}\big((X - \mu)^2\big). The standard deviation is Var(X)\sqrt{\operatorname{Var}(X)}.

Linear transformations

For constants aa and bb:

E(aX+b)=aE(X)+b,Var(aX+b)=a2Var(X).\mathrm{E}(aX + b) = a\mathrm{E}(X) + b, \qquad \operatorname{Var}(aX + b) = a^2\operatorname{Var}(X).

Adding a constant shifts the mean but leaves the spread unchanged; scaling by aa multiplies the variance by a2a^2.

Why the computational variance formula works

The form Var(X)=E(X2)[E(X)]2\operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2 is not a separate definition but an algebraic rearrangement of Var(X)=E((Xμ)2)\operatorname{Var}(X) = \mathrm{E}\big((X - \mu)^2\big). Expanding the square gives E(X22μX+μ2)=E(X2)2μE(X)+μ2\mathrm{E}(X^2 - 2\mu X + \mu^2) = \mathrm{E}(X^2) - 2\mu\mathrm{E}(X) + \mu^2, and since E(X)=μ\mathrm{E}(X) = \mu, the last two terms combine to μ2-\mu^2, leaving E(X2)μ2\mathrm{E}(X^2) - \mu^2. Knowing this derivation explains why you must compute E(X2)\mathrm{E}(X^2) separately and why it is almost always less work than summing (xμ)2(x - \mu)^2 term by term, especially when μ\mu is not a whole number.

Setting up a distribution from a scenario

Many H2 questions describe a situation and ask you to build the distribution table before computing anything. The routine is: list every value the variable can take, find the probability of each from the scenario (using counting or basic probability), tabulate them, and check the probabilities sum to 11. For the number of heads in two coin tosses, the values are 0,1,20, 1, 2 with probabilities 14,12,14\tfrac{1}{4}, \tfrac{1}{2}, \tfrac{1}{4}. Constructing the table correctly is the foundation everything else rests on, because a single wrong probability throws off both the expectation and the variance that follow.

Examples in context

Example 1. Expected winnings. A game paying out according to a die roll has an expected value computed as xP(X=x)\sum x\,\mathrm{P}(X = x); comparing it to the stake tells a player whether the game is favourable in the long run.

Example 2. Insurance pricing. An insurer sets premiums above the expected claim E(X)\mathrm{E}(X) and uses the variance to gauge risk, the everyday actuarial use of expectation and variance.

Try this

Q1. A variable has P(X=0)=0.5\mathrm{P}(X = 0) = 0.5, P(X=1)=0.5\mathrm{P}(X = 1) = 0.5. Find E(X)\mathrm{E}(X). [1 mark]

  • Cue. 0(0.5)+1(0.5)=0.50(0.5) + 1(0.5) = 0.5.

Q2. Given E(X)=4\mathrm{E}(X) = 4, find E(2X+3)\mathrm{E}(2X + 3). [2 marks]

  • Cue. 2(4)+3=112(4) + 3 = 11.

Q3. Given Var(X)=5\operatorname{Var}(X) = 5, find Var(2X1)\operatorname{Var}(2X - 1). [2 marks]

  • Cue. 22×5=202^2 \times 5 = 20.

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original5 marksA discrete random variable XX has P(X=x)=kx\mathrm{P}(X = x) = kx for x=1,2,3,4x = 1, 2, 3, 4. Find kk, then E(X)\mathrm{E}(X).
Show worked answer →

Probabilities sum to 11: k(1)+k(2)+k(3)+k(4)=10k=1k(1) + k(2) + k(3) + k(4) = 10k = 1, so k=110k = \dfrac{1}{10}.

E(X)=xP(X=x)=1(0.1)+2(0.2)+3(0.3)+4(0.4)=0.1+0.4+0.9+1.6=3\mathrm{E}(X) = \sum x\,\mathrm{P}(X = x) = 1(0.1) + 2(0.2) + 3(0.3) + 4(0.4) = 0.1 + 0.4 + 0.9 + 1.6 = 3.

Markers reward using the total probability to find kk, the expectation formula, and the value 33.

Original5 marksFor a discrete random variable with E(X)=2\mathrm{E}(X) = 2 and E(X2)=6\mathrm{E}(X^2) = 6, find Var(X)\operatorname{Var}(X), then E(3X1)\mathrm{E}(3X - 1) and Var(3X1)\operatorname{Var}(3X - 1).
Show worked answer →

Var(X)=E(X2)[E(X)]2=622=2\operatorname{Var}(X) = \mathrm{E}(X^2) - [\mathrm{E}(X)]^2 = 6 - 2^2 = 2.

E(3X1)=3E(X)1=3(2)1=5\mathrm{E}(3X - 1) = 3\mathrm{E}(X) - 1 = 3(2) - 1 = 5.

Var(3X1)=32Var(X)=9×2=18\operatorname{Var}(3X - 1) = 3^2\operatorname{Var}(X) = 9 \times 2 = 18 (adding a constant does not change variance).

Markers reward the variance formula, the linear expectation rule, and squaring the multiplier for the variance while ignoring the added constant.

Related dot points