Maths › Further Statistics 1 › Probability generating functions

Probability generating functions

A probability generating function encodes a discrete distribution as a single function of t. Differentiating at t = 1 gives the mean and variance, and multiplying two generating functions gives the distribution of a sum.

Builds on Geometric and negative binomial distributions and Maclaurin series.

IN THIS TOPIC

  • Define G(t) = E(tX) and derive it for standard distributions.
  • Find the mean from G'(1) and the variance from G''(1) + G'(1) − [G'(1)]².
  • Match a generating function to its distribution using the table of standard discrete distributions.
  • Use the product rule for generating functions of independent sums.

COMMON MISCONCEPTION

A generating function is just a compact way to write a distribution; it cannot tell you anything new.

Two operations get results out of G(t) that the table of probabilities does not offer. Differentiating at t = 1 reads off the moments, with mean G'(1) and variance G''(1) + G'(1) − [G'(1)]², and multiplying the generating functions of independent variables gives the function of their sum, which is how Po(λ) and Po(μ) are shown to add to Po(λ + μ).

A distribution in one function

The probability generating function of a discrete random variable taking non-negative integer values is the expectation of tX:

G(t)=E(tX)=ΣtxP(X=x)\text{G}(t) = \text{E}(t^{X}) = Σ \, t^{x} \, \text{P}(X = x)IN THE FORMULAE BOOKLET

Pearson Edexcel 9FM0 formulae booklet: included, under Discrete distributions, together with E(X) = G'(1). The coefficient of tx is P(X = x), so the distribution can be recovered from G, and G(1) = 1, because the probabilities total one. Two operations make the function useful: differentiating at t = 1 gives the moments, and multiplying two generating functions gives the generating function of the sum of the corresponding independent variables.

Four boxed terms in a row, each holding one probability multiplied by its own power of t, together forming the generating function. Setting t to one adds the probabilities back to one, and differentiating at that point extracts the mean and, with one extra term, the variance.
FIG. 1The generating function as a shelf of coefficients: each probability sits on its own power of t, and derivatives at t = 1 read the moments off.

Mean and variance from G(t)

Differentiating brings down a factor of x, so G'(1) = E(X). Differentiating twice brings down x(x − 1), so G''(1) gives E(X(X − 1)) rather than E(X²). Adding G'(1) supplies the missing E(X):

Var(X)=G′′(1)+G′(1)-[G′(1)]2\text{Var}(X) = \text{G}''(1) + \text{G}'(1) - [\text{G}'(1)]^{2}IN THE FORMULAE BOOKLET

Pearson Edexcel 9FM0 formulae booklet: included, beside the definition. Every term in it is evaluated at t = 1 after differentiating. Substituting t = 1 first makes G(t) the constant 1, whose derivatives are zero, so differentiate first and substitute last.

WORKED EXAMPLE

Deriving the Poisson generating function

Find G(t) for X ~ Po(λ), and use it to confirm the mean and variance.

G(t) = Σ txe−λλx/x! = e−λΣ(λt)x/x! = e−λeλt = eλ(t − 1).

G'(t) = λeλ(t − 1), so the mean is G'(1) = λ.

G''(1) = λ², so the variance is λ² + λ − λ² = λ. Both standard results, recovered from one function.

Generating functions of the standard distributions

The binomial follows from the binomial theorem in one line, since Σ ⁿCx(pt)xqn − x collapses to (q + pt)ⁿ. The geometric sums a geometric series. The negative binomial is the geometric raised to the power r, which is the additive property seen from the other side.

B(n,p):(q+pt)n,Po(λ):eλ(t-1)\text{B}(n, p): (q + pt)^{n}, \qquad \text{Po}(λ): e^{λ(t - 1)}IN THE FORMULAE BOOKLET
Geo(p):pt1-qt,Neg B(r,p):(pt1-qt)r\text{Geo}(p): \frac{pt}{1 - qt}, \qquad \text{Neg B}(r, p): (\frac{pt}{1 - qt})^{r}IN THE FORMULAE BOOKLET

Pearson Edexcel 9FM0 formulae booklet: included, in the P.G.F. column of the table of standard discrete distributions. Practise the recognition in both directions. Given (0.3 + 0.7t)⁸ and asked for the variance, identify B(8, 0.7) and use npq rather than differentiating twice.

Sums of independent variables

For independent X and Y, GX+Y(t) = GX(t) × GY(t). Multiplying the functions performs the whole convolution of the two distributions, which by hand would mean summing over every way the total could split.

Two boxed generating functions, one cyan and one amber, joined by a multiplication sign, with a coral arrow leading to a single box below. The product is the generating function of a Poisson with the two rates added, which is the additive property in one line of algebra.
FIG. 2Two generating functions multiplied: the product is the generating function of the sum, and for two Poissons it collapses straight back into Poisson form.

WORKED EXAMPLE

Why Poissons add

X ~ Po(λ) and Y ~ Po(μ) are independent. Find the distribution of X + Y.

GX+Y(t) = eλ(t − 1) × eμ(t − 1) = e(λ + μ)(t − 1).

That is the generating function of Po(λ + μ), and generating functions determine distributions uniquely.

So X + Y ~ Po(λ + μ), which proves the additive property rather than assuming it.

GUIDED PRACTICE

The geometric case

For a geometric distribution, G(t) = pt/(1 − qt) with q = 1 − p. Use it to find the mean and variance.

Show the working

G'(t) = p/(1 − qt)², so G'(1) = p/p² = 1/p, the mean.

G''(t) = 2pq/(1 − qt)³, so G''(1) = 2q/p².

Var = 2q/p² + 1/p − 1/p² = (2q + p − 1)/p² = q/p², since p − 1 = −q. Both standard results confirmed.

ASSESSMENT FOCUS

  • Check G(1) = 1 before using a generating function; any other value means the algebra is wrong.
  • G''(1) gives E(X(X − 1)), so the variance needs the extra G'(1) term. Write the formula out in full.
  • Differentiate before substituting t = 1; putting the 1 in early collapses the function to a constant.
  • For a sum of independent variables, multiply the functions and then name the standard form you land on.
  • Derivations of the standard generating functions are examinable, so practise the Poisson and geometric sums by hand.

CHECK YOURSELF

A random variable has G(t) = (0.4 + 0.6t)⁵. Name the distribution and write down its mean.

Show a hint

Compare with the binomial generating function (q + pt)n.

Show the answer

It is B(5, 0.6). The mean is np = 3, which G'(1) = 5(0.6)(1) = 3 confirms.

G(t) = E(tX) stores every probability as a coefficient, G(1) = 1 always, and the mean is G'(1).

Variance is G''(1) + G'(1) − [G'(1)]², and independent sums multiply their generating functions.

WORKBOOK

Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.

15 questions on this topicAnswer them one at a time and mark yourself against the worked answer.Practise this topic

Or read them with their worked answers on the probability generating functions questions page.

CHECK YOUR PROGRESS

Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.

  • Define G(t) = E(tX) and derive it for standard distributions.
  • Find the mean from G'(1) and the variance from G''(1) + G'(1) − [G'(1)]².
  • Match a generating function to its distribution using the table of standard discrete distributions.
  • Use the product rule for generating functions of independent sums.

Open the full revision checklist to see every objective in the course in one place.