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

A whole distribution in one function.

Write each probability \(P(X = x)\) as the coefficient of \(t^{x}\) and add the terms: the result, \(G(t) = E(t^{X})\), stores the entire distribution of a discrete random variable. Read probabilities back as coefficients, check \(G(1) = 1\), derive the PGFs of the uniform, binomial, geometric and Poisson distributions, and recognise a distribution from its PGF.

The key idea

For a discrete random variable \(X\) taking values \(0, 1, 2, \ldots\), the probability generating function is \(G_X(t) = E(t^{X}) = \displaystyle\sum_{x} P(X = x)\,t^{x}\). The coefficient of \(t^{r}\) is \(P(X = r)\), so \(P(X = r) = \dfrac{G^{(r)}(0)}{r!}\), and \(G(1) = \sum P(X = x) = 1\). The standard PGFs are: discrete uniform on \(1, \ldots, n\): \(\dfrac{t(1 - t^{n})}{n(1 - t)}\); \(\mathrm{B}(n, p)\): \((q + pt)^{n}\); \(\mathrm{Geo}(p)\): \(\dfrac{pt}{1 - qt}\); \(\mathrm{Po}(\lambda)\): \(e^{\lambda(t - 1)}\), where \(q = 1 - p\). For \(Y = aX + b\), \(G_Y(t) = t^{b}\,G_X(t^{a})\).

P(X = x) 0.1 0.2 0.3 0.4 x = 0 0.1t⁰ x = 1 0.3t¹ x = 2 0.4t² x = 3 0.2t³ G(t) = 0.1 + 0.3t + 0.4t² + 0.2t³ each bar becomes one term: probability × t to the power x G(1) = 0.1 + 0.3 + 0.4 + 0.2 = 1 G(0) = 0.1 = P(X = 0)
Fig. 1: a probability table drawn as bars. Each bar turns into one term P(X = x) t^x of the PGF; setting t = 1 adds the probabilities to 1, and setting t = 0 leaves only P(X = 0)
Section 01

Probabilities as coefficients.

A probability generating function (PGF) is a power series in a dummy variable \(t\) whose coefficients are the probabilities of \(X\). The variable \(t\) has no meaning of its own: it is a set of labelled boxes, with \(P(X = x)\) stored in the box \(t^{x}\). Because \(t^{X}\) is a function of \(X\), the PGF is also an expectation, \(G(t) = E(t^{X})\).

Worked example From a table to a PGF
The random variable \(X\) has \(P(X = 0) = 0.1\), \(P(X = 1) = 0.3\), \(P(X = 2) = 0.4\) and \(P(X = 3) = 0.2\). Write down the PGF of \(X\) and check it.
  1. Multiply each probability by \(t^{x}\) and add: \(G(t) = 0.1t^{0} + 0.3t^{1} + 0.4t^{2} + 0.2t^{3}\).
  2. \(t^{0} = 1\), so \(G(t) = 0.1 + 0.3t + 0.4t^{2} + 0.2t^{3}\) (Fig. 1).
  3. Check: \(G(1) = 0.1 + 0.3 + 0.4 + 0.2 = 1\).
Answer: \(G(t) = 0.1 + 0.3t + 0.4t^{2} + 0.2t^{3}\)
Worked example An unknown constant
The PGF of \(X\) is \(G(t) = k(1 + 2t)^{3}\). Find \(k\) and \(P(X = 2)\).
  1. \(G(1) = 1\): \(k \times 3^{3} = 1\), so \(k = \dfrac{1}{27}\).
  2. Expand: \((1 + 2t)^{3} = 1 + 6t + 12t^{2} + 8t^{3}\).
  3. \(P(X = 2)\) is the coefficient of \(t^{2}\) in \(G(t)\): \(\dfrac{12}{27}\).
Answer: \(k = \frac{1}{27}\), \(P(X = 2) = \frac{4}{9}\)
Your turn
The PGF of \(X\) is \(G(t) = \frac{1}{4}(t + t^{2} + 2t^{4})\). Find \(P(X\ \text{is even})\).
Examiner trap

It is \(G(1) = 1\), not \(G(0) = 1\). \(G(0)\) is just \(P(X = 0)\), which is often zero. Using \(G(0) = 1\) to find \(k\) in \(k(1 + 2t)^{3}\) would give \(k = 1\), and then the probabilities would add up to 27.

Section 02

The four standard PGFs, derived.

Each standard PGF comes from the probability formula in one or two lines: write down \(\sum P(X = x)\,t^{x}\) and recognise the series. You must be able to derive these, not only quote them. Throughout, \(q = 1 - p\).

Distribution\(P(X = x)\)PGF \(G(t)\)
Uniform on \(1, \ldots, n\)\(\frac{1}{n}\), \(x = 1, \ldots, n\)\(\dfrac{t(1 - t^{n})}{n(1 - t)}\)
\(\mathrm{B}(n, p)\)\(\binom{n}{x}p^{x}q^{n - x}\), \(x = 0, \ldots, n\)\((q + pt)^{n}\)
\(\mathrm{Geo}(p)\)\(pq^{x - 1}\), \(x = 1, 2, \ldots\)\(\dfrac{pt}{1 - qt}\)
\(\mathrm{Po}(\lambda)\)\(\dfrac{e^{-\lambda}\lambda^{x}}{x!}\), \(x = 0, 1, \ldots\)\(e^{\lambda(t - 1)}\)

Uniform: \(\frac{1}{n}(t + t^{2} + \cdots + t^{n})\) is a geometric series with first term \(t\), ratio \(t\) and \(n\) terms, so it sums to \(\dfrac{t(1 - t^{n})}{n(1 - t)}\) for \(t \ne 1\). Binomial: \(\sum \binom{n}{x}(pt)^{x}q^{n - x} = (q + pt)^{n}\) by the binomial theorem.

Worked example Derive the geometric PGF and use it
\(X \sim \mathrm{Geo}(p)\). Show that \(G(t) = \dfrac{pt}{1 - qt}\). For \(p = 0.2\), use the PGF to find \(P(X = 3)\).
  1. \[\begin{aligned} G(t) &= \sum_{x = 1}^{\infty} pq^{x - 1}t^{x} = pt\sum_{x = 1}^{\infty}(qt)^{x - 1} \\ &= pt\left(1 + qt + (qt)^{2} + \cdots\right) = \frac{pt}{1 - qt}, \quad |qt| < 1. \end{aligned}\]
  2. With \(p = 0.2\): \(G(t) = 0.2t(1 + 0.8t + 0.64t^{2} + \cdots)\).
  3. The \(t^{3}\) term is \(0.2t \times 0.64t^{2}\), so \(P(X = 3) = 0.128\), which agrees with \(pq^{2} = 0.2 \times 0.8^{2}\).
Answer: \(G(t) = \dfrac{pt}{1 - qt}\); \(P(X = 3) = 0.128\)
Worked example Derive the Poisson PGF and differentiate
\(X \sim \mathrm{Po}(\lambda)\). Show that \(G(t) = e^{\lambda(t - 1)}\). For \(\lambda = 2\), find \(P(X = 2)\) from \(\dfrac{G''(0)}{2!}\).
  1. \[G(t) = \sum_{x = 0}^{\infty}\frac{e^{-\lambda}\lambda^{x}}{x!}t^{x} = e^{-\lambda}\sum_{x = 0}^{\infty}\frac{(\lambda t)^{x}}{x!} = e^{-\lambda}e^{\lambda t} = e^{\lambda(t - 1)}.\]
  2. For \(\lambda = 2\): \(G(t) = e^{2(t - 1)}\), \(G'(t) = 2e^{2(t - 1)}\), \(G''(t) = 4e^{2(t - 1)}\).
  3. \(P(X = 2) = \dfrac{G''(0)}{2!} = \dfrac{4e^{-2}}{2} = 2e^{-2}\), the same as \(\dfrac{e^{-2}2^{2}}{2!}\).
Answer: \(P(X = 2) = 2e^{-2} = 0.271\) (3 s.f.)
Examiner trap

Cambridge's geometric distribution counts the trials up to and including the first success, so \(X\) starts at 1 and the PGF has a factor \(t\) on top: \(\dfrac{pt}{1 - qt}\), not \(\dfrac{p}{1 - qt}\). In the binomial PGF the \(t\) goes with \(p\), the probability of success: \((q + pt)^{n}\), not \((p + qt)^{n}\).

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

\(P(X = 0) = 0.5\), \(P(X = 1) = 0.2\) and \(P(X = 3) = 0.3\). What is the PGF of \(X\)?

Quick check+10 XP

\(G(t) = (0.6 + 0.4t)^{5}\) is the PGF of

Quick check+10 XP

Which is the PGF of \(X \sim \mathrm{Po}(3)\)?

Quick check+10 XP

The PGF of \(X\) is \(k(3 + t)^{2}\). Find \(k\).

Section 03

Recognise it, transform it.

Because a PGF determines the distribution, matching a PGF to one of the four standard forms identifies the distribution and its parameters. Tidy it first: divide top and bottom so the denominator of a geometric PGF starts with 1, or collect the exponent of a Poisson PGF into the form \(\lambda(t - 1)\). A linear change of variable also has a neat PGF: if \(Y = aX + b\), then \[G_Y(t) = E(t^{aX + b}) = t^{b}\,E\big((t^{a})^{X}\big) = t^{b}\,G_X(t^{a}).\]

Worked example Identify a geometric PGF
The PGF of \(X\) is \(G(t) = \dfrac{2t}{5 - 3t}\). Identify the distribution of \(X\) and find \(P(X = 2)\).
  1. Divide top and bottom by 5: \(G(t) = \dfrac{0.4t}{1 - 0.6t}\).
  2. This is \(\dfrac{pt}{1 - qt}\) with \(p = 0.4\), \(q = 0.6\), and \(p + q = 1\) as it must.
  3. \(P(X = 2) = pq = 0.4 \times 0.6\).
Answer: \(X \sim \mathrm{Geo}(0.4)\), \(P(X = 2) = 0.24\)
Worked example The PGF of 2X + 1
\(X \sim \mathrm{B}(4, 0.5)\) and \(Y = 2X + 1\). Find the PGF of \(Y\) and use it to find \(P(Y = 5)\).
  1. \(G_X(t) = (0.5 + 0.5t)^{4} = \dfrac{(1 + t)^{4}}{16}\).
  2. \(G_Y(t) = t^{1}\,G_X(t^{2}) = \dfrac{t(1 + t^{2})^{4}}{16}\).
  3. The \(t^{5}\) term needs \(t^{4}\) from \((1 + t^{2})^{4}\), which has coefficient \(\binom{4}{2} = 6\), so \(P(Y = 5) = \dfrac{6}{16}\).
  4. Check: \(Y = 5\) means \(X = 2\), and \(P(X = 2) = \binom{4}{2}(0.5)^{4} = \dfrac{6}{16}\).
Answer: \(G_Y(t) = \dfrac{t(1 + t^{2})^{4}}{16}\), \(P(Y = 5) = \dfrac{3}{8}\)
Your turn
The PGF of \(X\) is \(e^{1.5t - 1.5}\). Identify the distribution of \(X\), write down the PGF of \(Y = X + 3\) and find \(P(Y = 3)\).
Examiner trap

For \(Y = aX + b\) the PGF is \(t^{b}G_X(t^{a})\): the \(b\) becomes a power of \(t\) outside, and the \(a\) becomes a power of \(t\) inside. It is NOT \(G_X(at + b)\), and NOT \(aG_X(t) + b\), which would not even satisfy \(G(1) = 1\).

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

\(X \sim \mathrm{Geo}\left(\frac{1}{3}\right)\). Which of these is the PGF of \(X\)?

Exam style+20 XP

The PGF of \(X\) is \(G(t) = \dfrac{t(1 - t^{8})}{8(1 - t)}\). Find \(P(2 \le X \le 5)\).

Exam style+20 XP

\(X \sim \mathrm{Po}(2)\) and \(Y = 3X + 1\). Find the PGF of \(Y\).

Exam style+20 XP

The PGF of \(X\) is \(k(2 + t)^{3}\). Find \(P(X \ge 2)\).

Skill unlocked

A whole distribution stored in one function.

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

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Building PGFs from tables, finding constants from \(G(1) = 1\), deriving the uniform PGF, a Poisson PGF in disguise, recognising a geometric PGF and a binomial PGF with two unknowns.