Maths › Further Statistics 1 › Probability generating functions
Probability generating functions
A probability generating function encodes a discrete distribution as a single function of t. Differentiate it at t = 1 for the mean and variance, and multiply two of them to get 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 booklet's table.
- 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.
A distribution in one function
The probability generating function hangs every probability on a power of t:
The booklet gives that definition under Discrete distributions, together with E(X) = G'(1). The coefficient of tx is P(X = x), so nothing is lost, and G(1) = 1 always, because the probabilities total one. The function is far more than shorthand. It answers questions the table cannot. Differentiate it and moments fall out. Multiply two and a convolution is done.
Reading the moments off
Differentiating brings down a factor of x, so G'(1) = E(X). Differentiating twice brings down x(x − 1), so G''(1) delivers E(X(X − 1)) and not E(X²). Adding G'(1) repairs the shortfall:
It is printed beside the definition, so copy it across rather than reassembling it. Every part of that formula is evaluated at t = 1, and a substituted 1 before differentiating is the single most common error on this topic. Differentiate first, 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.
The four you should recognise
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.
All four sit in the P.G.F. column of the booklet's table of standard discrete distributions, so derive them for the practice and look them up in the exam. Recognition is worth practising in both directions. A question that gives you (0.3 + 0.7t)⁸ and asks for the variance expects you to name B(8, 0.7) and quote npq, not to differentiate twice.
Sums without summation
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(λ + μ). The additive property, proved in two lines instead of assumed.
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. It catches an algebraic slip instantly.
- 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 booklet's table.
- 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.