Maths › Further Statistics 1 › Probability generating functions
Probability generating functions
Pack a whole distribution into one 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(t^X) and derive it for standard distributions.
- Find the mean from G'(1) and the variance from G''(1) + G'(1) − [G'(1)]².
- Use the product rule for generating functions of independent sums.
WHAT YOU PROBABLY THINK
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 coefficient of tx is P(X = x), so nothing is lost, and G(1) = 1 always, since the probabilities total one. Far from being mere shorthand, as the opening claim has it, the function answers questions the table cannot: differentiate it and moments fall out; multiply two and a convolution is done.
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 mean is G'(1) because differentiating brings down a factor of x. The variance needs one more step, since G''(1) delivers E(X(X − 1)) rather than E(X²):
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 rather than assumed.
YOUR TURN
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.
THE EXAM BIT
- Check G(1) = 1 before using a generating function; it catches algebraic slips instantly.
- G''(1) gives E(X(X − 1)), so the variance needs the extra G'(1) term. Quote the formula in full.
- For a sum of independent variables, multiply the functions and then recognise the standard form.
- Derivations of standard results may be required, so practise the Poisson and geometric sums.
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
I
t
i
s
B
(
5
,
0
.
6
)
.
T
h
e
m
e
a
n
i
s
n
p
=
3
,
w
h
i
c
h
G
'
(
1
)
=
5
(
0
.
6
)
(
1
)
=
3
c
o
n
f
i
r
m
s
.
G(t) = E(t^X) stores every probability as a coefficient, and G(1) = 1 always.
Mean G'(1); variance G''(1) + G'(1) − [G'(1)]²; 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.
CHECK YOUR PROGRESS
Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device only.
- Define G(t) = E(t^X) and derive it for standard distributions.
- Find the mean from G'(1) and the variance from G''(1) + G'(1) − [G'(1)]².
- 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.
No animated video for this topic yet; these notes stand alone.