Maths4U
Menu

Maths4U Original · Learn, check, explain

Expectation and variance of a discrete random variable — 9709 S1

Normalise probabilities and calculate expectation, variance and transformations. Transform means and variances and combine summaries.

Notes and key methods

A probability mass function satisfies \(\displaystyle p(x)\ge 0\) and \(\sum p(x)=1\). Then \(E(X)=\sum xp(x)\), \(E(X^2)=\sum x^2p(x)\), and \(\operatorname{Var}(X)=E(X^2)-E(X)^2\).

For any specified function g, \(E(g(X))=\sum g(x)p(x)\). In general this differs from g(E(X)). Always check that a proposed variance is nonnegative.

If \(Y=aX+b\), then \(E(Y)=aE(X)+b\) and \(\operatorname{Var}(Y)=a^2\operatorname{Var}(X)\). Hence standard deviation scales by |a|; translation changes the mean but not the variance.

To combine groups, recover \(\sum x=n\bar x\) and \(\sum x^2=n(v+\bar x^2)\), add the two totals and divide by the combined number of observations. Averaging two means is valid only when the sample sizes are equal.

Check the conditions

Three worked examples

Example 1 · Discrete probability distributions

X takes the values \(0,2,4\) with respective probabilities \(2k,3k,5k\).

  1. Find the normalising constant k.
  2. Find E(X).
  3. Find Var(X).
  4. Find \(\displaystyle E((X+1)^2)\).
Show the reasoning

(a)

\(\displaystyle 10k=1\implies k=\frac{1}{10}\)

Answer: \(\displaystyle \frac{1}{10}\).

(b)

\(\displaystyle \sum xp(x)=\frac{13}{5}\)

Answer: \(\displaystyle \frac{13}{5}\).

(c)

\(\displaystyle E(X^2)-E(X)^2=\frac{46}{5}-(\frac{13}{5})^2=\frac{61}{25}\)

Answer: \(\displaystyle \frac{61}{25}\).

(d)

\(\displaystyle E(X^2)+2E(X)+1=\frac{77}{5}\)

Answer: \(\displaystyle \frac{77}{5}\).

Example 2 · Coding and combined data

The \(\displaystyle n=7\) observations X have mean 4 and population variance 5. Define \(Y=4X+9\). A second disjoint group has 9 Y-values with mean 29.

  1. Find the mean of Y.
  2. Find the variance of Y.
  3. Find the sum of Y in the first group.
  4. Find the mean of all Y-values in both groups.
Show the reasoning

(a)

\(E(Y)=4(4)+9=25\)

Answer: \(25\).

(b)

\(\operatorname{Var}(Y)=4^2(5)=80\)

Answer: \(80\).

(c)

\(\sum Y=7(25)=175\)

Answer: \(175\).

(d)

\(\displaystyle \bar y_{\rm combined}=\frac{n_1\bar y_1+n_2\bar y_2}{n_1+n_2}\)

Answer: \(\displaystyle \frac{109}{4}\).

Example 3 · Discrete probability distributions

X takes the values \(0,4,8\) with respective probabilities \(4k,5k,7k\).

  1. Find the normalising constant k.
  2. Find E(X).
  3. Find Var(X).
  4. Find \(\displaystyle E((X+1)^2)\).
Show the reasoning

(a)

\(\displaystyle 16k=1\implies k=\frac{1}{16}\)

Answer: \(\displaystyle \frac{1}{16}\).

(b)

\(\displaystyle \sum xp(x)=\frac{19}{4}\)

Answer: \(\displaystyle \frac{19}{4}\).

(c)

\(\displaystyle E(X^2)-E(X)^2=33-(\frac{19}{4})^2=\frac{167}{16}\)

Answer: \(\displaystyle \frac{167}{16}\).

(d)

\(\displaystyle E(X^2)+2E(X)+1=\frac{87}{2}\)

Answer: \(\displaystyle \frac{87}{2}\).

Common mistakes

Practise with answer checking

Original exam-style problems

Write complete solutions before opening the worked solution. The marking guidance rewards reasoning as well as answers.

Examination practice · 2020–2026

Apply the method to recent source-labelled questions from this chapter.

Browse recent examination questions · All topic resources and the full bank

Next skill: The binomial distribution →