Home / A-Level Further Maths 9231 / Topic 4.5 / Revision notes
Download PDFQuestion bank →Topic 4.5 lessons

Probability generating functions

A-Level Further Maths 9231 · Topic 4.5 revision notes

Everything from the 2 lessons of this topic on a few pages: the key idea of each lesson, the diagram to remember, the points to learn and the traps examiners set. Read it, cover it, test yourself.

  1. Probability generating functions
  2. PGFs: mean, variance and sums

1Probability generating functions

Syllabus 4.5

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)

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}\)

Store, check, read back.

  • Construct: \(G(t) = \sum P(X = x)\,t^{x}\), with the power equal to the value of \(x\).
  • Check or find constants with \(G(1) = 1\); remember \(G(0) = P(X = 0)\).
  • Read probabilities as coefficients of \(t^{r}\), by expanding or from \(\dfrac{G^{(r)}(0)}{r!}\).
  • Recognise: \((q + pt)^{n}\), \(\dfrac{pt}{1 - qt}\), \(e^{\lambda(t - 1)}\), \(\dfrac{t(1 - t^{n})}{n(1 - t)}\); tidy the PGF into one of these first.
  • Transform: \(Y = aX + b\) has \(G_Y(t) = t^{b}G_X(t^{a})\).

Watch out!

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.

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}\).

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\).

2PGFs: mean, variance and sums

Syllabus 4.5

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

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}\)

Differentiate, then put \(t = 1\).

  • Check \(G(1) = 1\).
  • Mean: \(E(X) = G'(1)\). Differentiate first, substitute second.
  • Variance: \(\operatorname{Var}(X) = G''(1) + G'(1) - [G'(1)]^{2}\); never negative.
  • Probabilities: \(P(X = k)\) is the coefficient of \(t^{k}\); \(P(X = 0) = G(0)\).
  • Sums: for INDEPENDENT variables multiply the PGFs, then recognise, differentiate or expand the product.

Watch out!

\(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.

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}\).

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})\).

Back to A-Level Further Maths 9231 contents · (c) 2026 TheLucidSTEM · thelucidstem.com