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