MathsFurther 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.

Year FMEDEXCEL 9FM0 FS1

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:

G(t) = E(tX) = Σ tx P(X = x)

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 generating function: each probability rides its own power of t, and derivatives at t = 1 read off the moments0.1 t⁰0.3 t¹0.4 t²0.2 t³G(t) = 0.1 + 0.3t + 0.4t² + 0.2t³G(1) = 1 alwaysG'(1) = mean, G''(1) + G'(1) − [G'(1)]² = 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.

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

Var(X) = G''(1) + G'(1) - [G'(1)]2

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.

Multiplying generating functions performs the whole convolution: two Poissons collapse straight back to PoissonG_X(t) = e^(λ(t − 1))G_Y(t) = e^(μ(t − 1))×e^((λ + μ)(t − 1)), which is Po(λ + μ)so independent Poissons add, proved rather than assumed
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(λ + μ): 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.