Cambridge International AS & A Level · Topic 4.5
A-Level Further Maths 9231 / Topic 4.5 / AS & A Level

Differentiate once for the mean, multiply for a sum.

A probability generating function packs a whole distribution into one function of \(t\). Differentiate it and put \(t = 1\) to get the mean and the variance without summing a single series, and multiply PGFs together to find the distribution of a total of independent variables.

The key idea

For \(G(t) = E(t^{X}) = \sum p_{r}t^{r}\): \(G(1) = 1\), \(E(X) = G'(1)\) and \(\operatorname{Var}(X) = G''(1) + G'(1) - [G'(1)]^{2}\) (both in MF19). Differentiate FIRST, then put \(t = 1\). If \(X\) and \(Y\) are independent, \(G_{X+Y}(t) = G_{X}(t)\,G_{Y}(t)\), and the same holds for any number of independent variables. \(P(X + Y = k)\) is the coefficient of \(t^{k}\) in the product.

2/36 4/36 6/36 2 1 3 2 4 3 5 4 6 5 7 6 8 5 9 4 10 3 11 2 12 1 E(S) = 2G′(1) = 7 P(S = 10) = 3/36 s P(S = s) is the coefficient of t^s in [G(t)]²; bar labels are numerators over 36
Fig. 1: the total S of two fair dice. Squaring the PGF of one die, G(t) = (t + t^2 + ... + t^6)/6, gives the PGF of S; the coefficient of t^s is P(S = s), and differentiating gives E(S) = 7
Section 01

The mean and variance from G(t).

Start from \(G(t) = \sum p_{r}t^{r}\). Differentiating term by term brings each power \(r\) down in front, and putting \(t = 1\) turns every power of \(t\) into 1. That is all the derivation needs.

Worked example A polynomial PGF
The random variable \(X\) has PGF \(G(t) = \dfrac{1}{8}\left(t + 2t^{2} + 5t^{3}\right)\). Find \(E(X)\) and \(\operatorname{Var}(X)\).
  1. Check: \(G(1) = \tfrac{1}{8}(1 + 2 + 5) = 1\).
  2. \[G'(t) = \tfrac{1}{8}\left(1 + 4t + 15t^{2}\right) \;\Rightarrow\; G'(1) = \tfrac{20}{8} = \tfrac{5}{2}\]
  3. \[G''(t) = \tfrac{1}{8}\left(4 + 30t\right) \;\Rightarrow\; G''(1) = \tfrac{34}{8} = \tfrac{17}{4}\]
  4. \[\operatorname{Var}(X) = \tfrac{17}{4} + \tfrac{5}{2} - \left(\tfrac{5}{2}\right)^{2} = \tfrac{17}{4} + \tfrac{10}{4} - \tfrac{25}{4} = \tfrac{1}{2}\]
  5. Direct check: \(E(X^{2}) = \tfrac{1}{8}(1 + 8 + 45) = \tfrac{27}{4}\), and \(\tfrac{27}{4} - \tfrac{25}{4} = \tfrac{1}{2}\).
Answer: \(E(X) = \frac{5}{2}\), \(\operatorname{Var}(X) = \frac{1}{2}\)
Worked example A PGF in closed form
The random variable \(X\) has PGF \(G(t) = \dfrac{2}{3 - t}\). Find \(E(X)\) and \(\operatorname{Var}(X)\), and find \(P(X = 0)\).
  1. Check: \(G(1) = \tfrac{2}{2} = 1\). Write \(G(t) = 2(3 - t)^{-1}\).
  2. \[G'(t) = 2(3 - t)^{-2} \;\Rightarrow\; G'(1) = \tfrac{2}{4} = \tfrac{1}{2}\]
  3. \[G''(t) = 4(3 - t)^{-3} \;\Rightarrow\; G''(1) = \tfrac{4}{8} = \tfrac{1}{2}\]
  4. \[\operatorname{Var}(X) = \tfrac{1}{2} + \tfrac{1}{2} - \tfrac{1}{4} = \tfrac{3}{4}\]
  5. \(P(X = 0)\) is the constant term, \(G(0) = \tfrac{2}{3}\).
Answer: \(E(X) = \frac{1}{2}\), \(\operatorname{Var}(X) = \frac{3}{4}\), \(P(X = 0) = \frac{2}{3}\)
Your turn
\(X\) has PGF \(G(t) = \dfrac{1}{2}t^{2}(1 + t)\). Find \(E(X)\) and \(\operatorname{Var}(X)\).
Examiner trap

\(G''(1)\) is \(E\big(X(X-1)\big)\), NOT \(E(X^{2})\). Writing \(\operatorname{Var}(X) = G''(1) - [G'(1)]^{2}\) drops the \(+\,G'(1)\) and gives \(\tfrac{17}{4} - \tfrac{25}{4} = -2\) in the first example: a negative variance is a sure sign of this slip. Also differentiate BEFORE putting \(t = 1\); \(G(1)\) is always 1 and tells you nothing about the mean.

Section 02

Checking the standard results.

The PGFs from the last lesson give the familiar means and variances in a few lines. This is a common exam request ('use the PGF to show that ...'), so set out each derivative clearly.

Distribution\(G(t)\)\(E(X) = G'(1)\)\(\operatorname{Var}(X)\)
\(\mathrm{B}(n, p)\), \(q = 1 - p\)\((q + pt)^{n}\)\(np\)\(npq\)
\(\mathrm{Po}(\lambda)\)\(e^{\lambda(t - 1)}\)\(\lambda\)\(\lambda\)
\(\mathrm{Geo}(p)\), \(r = 1, 2, \dots\)\(\dfrac{pt}{1 - qt}\)\(\dfrac{1}{p}\)\(\dfrac{q}{p^{2}}\)
uniform on \(1, \dots, n\)\(\tfrac{1}{n}(t + t^{2} + \dots + t^{n})\)\(\dfrac{n + 1}{2}\)\(\dfrac{n^{2} - 1}{12}\)
Worked example Binomial and Poisson
Use PGFs to show that \(X \sim \mathrm{B}(n, p)\) has variance \(npq\), and that \(Y \sim \mathrm{Po}(\lambda)\) has mean and variance both equal to \(\lambda\).
  1. \[\begin{aligned} G(t) &= (q + pt)^{n} \\ G'(t) &= np(q + pt)^{n-1} \\ G''(t) &= n(n-1)p^{2}(q + pt)^{n-2} \end{aligned}\]
  2. At \(t = 1\), \(q + p = 1\), so \(G'(1) = np\) and \(G''(1) = n(n-1)p^{2}\).
  3. \[\begin{aligned} \operatorname{Var}(X) &= n^{2}p^{2} - np^{2} + np - n^{2}p^{2} \\ &= np(1 - p) = npq \end{aligned}\]
  4. Poisson: \(G(t) = e^{\lambda(t-1)}\), \(G'(t) = \lambda e^{\lambda(t-1)}\), \(G''(t) = \lambda^{2}e^{\lambda(t-1)}\), so \(G'(1) = \lambda\), \(G''(1) = \lambda^{2}\).
  5. \(\operatorname{Var}(Y) = \lambda^{2} + \lambda - \lambda^{2} = \lambda\).
Answer: \(\operatorname{Var}(X) = npq\); \(E(Y) = \operatorname{Var}(Y) = \lambda\)
Worked example Geometric, by the quotient rule
\(X \sim \mathrm{Geo}(p)\) has PGF \(G(t) = \dfrac{pt}{1 - qt}\). Show that \(E(X) = \dfrac{1}{p}\) and \(\operatorname{Var}(X) = \dfrac{q}{p^{2}}\).
  1. \[G'(t) = \frac{p(1 - qt) + pt\cdot q}{(1 - qt)^{2}} = \frac{p}{(1 - qt)^{2}}\]
  2. At \(t = 1\), \(1 - q = p\): \(G'(1) = \dfrac{p}{p^{2}} = \dfrac{1}{p}\).
  3. \[G''(t) = \frac{2pq}{(1 - qt)^{3}} \;\Rightarrow\; G''(1) = \frac{2pq}{p^{3}} = \frac{2q}{p^{2}}\]
  4. \[\begin{aligned} \operatorname{Var}(X) &= \frac{2q}{p^{2}} + \frac{1}{p} - \frac{1}{p^{2}} = \frac{2q + p - 1}{p^{2}} \\ &= \frac{2q - q}{p^{2}} = \frac{q}{p^{2}} \end{aligned}\]
Answer: \(E(X) = \frac{1}{p}\) and \(\operatorname{Var}(X) = \frac{q}{p^{2}}\)
Your turn
The score \(X\) on a fair six-sided die has PGF \(G(t) = \tfrac{1}{6}(t + t^{2} + \dots + t^{6})\). Use it to find \(E(X)\) and \(\operatorname{Var}(X)\).
Examiner trap

In 9231 the geometric variable counts trials up to and INCLUDING the first success (\(r = 1, 2, \dots\)), so its PGF has \(t\) on top: \(\dfrac{pt}{1 - qt}\). Leaving out that \(t\) gives \(\dfrac{p}{1 - qt}\), the PGF of the number of failures, with mean \(\dfrac{q}{p}\), not \(\dfrac{1}{p}\).

Stage 1 · Learn

Check your understanding

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

\(X\) has PGF \(G(t) = 0.1 + 0.4t + 0.5t^{2}\). Find \(E(X)\).

Quick check+10 XP

For a random variable \(X\), \(G'(1) = 3\) and \(G''(1) = 10\). Find \(\operatorname{Var}(X)\).

Quick check+10 XP

\(X\) and \(Y\) are independent with PGFs \((0.3 + 0.7t)^{4}\) and \((0.3 + 0.7t)^{6}\). Which is the PGF of \(X + Y\)?

Quick check+10 XP

\(X \sim \mathrm{Po}(1.5)\) and \(Y \sim \mathrm{Po}(2.5)\) are independent. Which is the PGF of \(X + Y\)?

Section 03

Sums of independent variables: multiply.

If \(X\) and \(Y\) are independent, then \(t^{X}\) and \(t^{Y}\) are independent too, so the expectation of their product is the product of their expectations: \(G_{X+Y}(t) = E(t^{X}t^{Y}) = E(t^{X})\,E(t^{Y}) = G_{X}(t)\,G_{Y}(t)\). If the product is a PGF you recognise, you have identified the distribution of the sum.

Worked example Two Poisson counts
The numbers of emails \(X\) and texts \(Y\) a student receives in an hour are independent with \(X \sim \mathrm{Po}(2)\) and \(Y \sim \mathrm{Po}(3)\). Use PGFs to find the distribution of the total \(T = X + Y\), and find \(P(T = 2)\).
  1. \[G_{T}(t) = e^{2(t-1)}\,e^{3(t-1)} = e^{5(t-1)}\]
  2. This is the PGF of \(\mathrm{Po}(5)\), so \(T \sim \mathrm{Po}(5)\).
  3. \[P(T = 2) = e^{-5}\,\frac{5^{2}}{2!} = 12.5\,e^{-5} = 0.0842 \text{ (3 s.f.)}\]
Answer: \(T \sim \mathrm{Po}(5)\) and \(P(T = 2) = 0.0842\)
Worked example The total of two dice
Two fair dice are thrown and \(S\) is the total score. Use PGFs to find \(P(S = 10)\) and \(E(S)\).
  1. Each score has PGF \(G(t) = \tfrac{1}{6}(t + t^{2} + \dots + t^{6})\), and the dice are independent, so \(G_{S}(t) = [G(t)]^{2}\).
  2. \[G_{S}(t) = \tfrac{1}{36}\left(t^{2} + 2t^{3} + 3t^{4} + 4t^{5} + 5t^{6} + 6t^{7} + 5t^{8} + 4t^{9} + 3t^{10} + 2t^{11} + t^{12}\right)\]
  3. The coefficient of \(t^{10}\) is \(\tfrac{3}{36}\): the products \(t^{4}t^{6}\), \(t^{5}t^{5}\), \(t^{6}t^{4}\). See Fig. 1.
  4. \(G_{S}'(t) = 2G(t)G'(t)\), so \(G_{S}'(1) = 2\times 1\times\tfrac{7}{2} = 7\).
Answer: \(P(S = 10) = \frac{1}{12}\) and \(E(S) = 7\)
Your turn
\(X \sim \mathrm{B}(3, 0.4)\) and \(Y \sim \mathrm{B}(5, 0.4)\) are independent. Use PGFs to identify the distribution of \(X + Y\) and find \(P(X + Y = 3)\) to 3 significant figures.
Your turn
\(X_{1}\), \(X_{2}\), \(X_{3}\) are independent, each \(\mathrm{Geo}(\tfrac{1}{2})\). Write down the PGF of \(T = X_{1} + X_{2} + X_{3}\) and find \(P(T = 4)\).
Examiner trap

Multiply PGFs, never add them: \(G_{X}(t) + G_{Y}(t)\) equals 2 at \(t = 1\), so it is not a PGF at all. The result needs INDEPENDENCE. And a sum of two copies is not \(2X\): if \(X_{1}\) and \(X_{2}\) are independent with PGF \(G(t)\), then \(X_{1} + X_{2}\) has PGF \([G(t)]^{2}\), but \(2X_{1}\) has PGF \(G(t^{2})\).

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS & A Level Further Mathematics Paper 1 to 4 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

The random variable \(X\) has PGF \(G(t) = \dfrac{t}{4 - 3t}\). Use \(G\) to find \(\operatorname{Var}(X)\).

Exam style+20 XP

The random variable \(X\) has PGF \(G(t) = e^{2(t^{2} - 1)}\). Find \(E(X)\) and \(\operatorname{Var}(X)\).

Exam style+20 XP

A fair four-sided die has faces 1, 2, 3, 4, so its score has PGF \(\tfrac{1}{4}(t + t^{2} + t^{3} + t^{4})\). Two such dice are thrown. Use PGFs to find the probability that the total is 5.

Exam style+20 XP

\(X_{1}\) and \(X_{2}\) are independent, each \(\mathrm{Geo}(0.2)\), and \(T = X_{1} + X_{2}\), with PGF \(G_{T}(t) = \left(\dfrac{0.2t}{1 - 0.8t}\right)^{2}\). Given \(G_{T}'(1) = 10\) and \(G_{T}''(1) = 130\), find \(\operatorname{Var}(T)\).

Skill unlocked

Mean, variance and sums from PGFs: that completes Further Mathematics 9231.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Mean and variance from polynomial and closed-form PGFs, the uniform distribution proved, Poisson and binomial totals, and the total of three geometric waits.