What is a Probability Generating Function?
A probability generating function (PGF) is a power series in a dummy variable t whose coefficients are the probabilities of a discrete random variable X taking non-negative integer values.
The PGF is only defined for discrete random variables taking non-negative integer values (0, 1, 2, …). It is not defined for continuous random variables or for variables taking negative values.
Why is the PGF Useful?
Key Values of G(t)
Setting t=0 gives the probability that X takes the value 0.
Setting t=1 gives the sum of all probabilities — always equals 1. Use this to find unknown constants.
The first derivative evaluated at t=1 gives the mean.
So E(X²) = G''(1) + G'(1), and Var(X) = G''(1) + G'(1) − [G'(1)]².
(i) State the distribution of X. (ii) Find E(X). (iii) Verify G(1) = 1.
E(X) = G'(1) = 0.5 + 0.4 + 0.3 =
Key Properties
Extracting Moments — Differentiation Method
Given G(t) = E[tˣ] = Σ pᵣ tʳ, differentiate term by term:
At t=1: G'(1) = Σ r·pᵣ = E(X)
At t=1: G''(1) = Σ r(r−1)pᵣ = E[X(X−1)] = E(X²) − E(X)
Uniqueness Property
A PGF uniquely determines the probability distribution. If two random variables have the same PGF, they have the same distribution. This is exploited in Cambridge questions: if you can show that G_{X+Y}(t) matches the PGF of a known distribution, you immediately identify the distribution of X+Y.
Linear Transformation
G'(1) = 3(1)⁴ = 3 = E(X)
G''(1) = 7.2(1)³ = 7.2
= 7.2 + 3 − 9
Standard PGFs
These PGFs must be known and derivable. Cambridge may ask you to prove them from the definition or to use them directly.
G(t) = q + pt
where q = 1 − p
[Sum of n independent Bernoulli(p)]
G(t) = pt / (1 − qt)
Valid for |qt| < 1
G(t) = p / (1 − qt)
[Number of failures before first success]
G(t) = e^(λ(t−1))
= exp(λt − λ)
G(t) = t(1−tⁿ) / [n(1−t)]
[For t ≠ 1; G(1) = 1]
Deriving the Poisson PGF — Full Proof
Deriving the Binomial PGF
Sums of Independent Variables
One of the most powerful applications of PGFs is identifying the distribution of the sum of independent random variables.
Key Results from the Sum Property
| Situation | Result | How to Prove |
|---|---|---|
| Sum of n independent B(1,p) variables | B(n, p) | G_{X₁+···+Xₙ}(t) = (q+pt)ⁿ |
| Sum of n independent Poisson(λ) variables | Poisson(nλ) | Product of n copies of e^(λ(t−1)) = e^(nλ(t−1)) |
| Sum of Poisson(λ₁) and Poisson(λ₂) | Poisson(λ₁+λ₂) | e^(λ₁(t−1)) · e^(λ₂(t−1)) = e^((λ₁+λ₂)(t−1)) |
| Sum of B(m,p) and B(n,p) — same p | B(m+n, p) | (q+pt)^m · (q+pt)^n = (q+pt)^(m+n) |
Random Sum — Compound Distribution
A more advanced application: if N is a random variable and X₁, X₂, … are i.i.d., then for S = X₁ + X₂ + ··· + X_N (a random number of terms):
Show that X ~ Poisson(λp).
G_X(t) = e^(λp(t−1))
Worked Examples
(i) Find k. (ii) State P(X=1). (iii) Find E(X) and Var(X).
G'(t) = (1/6)(2 + 6t)
G'(1) = (1/6)(8) = E(X) = 4/3
G''(t) = (1/6)(6) = 1
G''(1) = 1
Var(X) = G''(1) + G'(1) − [G'(1)]²
= 1 + 4/3 − 16/9 = 9/9 + 12/9 − 16/9
= p / (1−qt)²
G'(1) = p/(1−q)² = p/p² = 1/p = E(X)
G''(1) = 2pq/p³ = 2q/p²
Var(X) = 2q/p² + 1/p − 1/p²
= (2q + p − 1)/p² = (2q − q)/p² [since p+q=1 → p−1=−q]
This is the PGF of a Negative Binomial (r=3, p=0.3).
Var(S) = 3·Var(X₁) = 3·(0.7/0.09) =
Practice Questions
(i) Write down G_X(t). (ii) Find E(X) and Var(X) using G'(1) and G''(1).
Verify: G(1) = 1/3+1/2+1/6 = 2/6+3/6+1/6 = 1 ✓
(ii) G'(t) = 1/2 + (1/3)t → G'(1) = 1/2+1/3 = 5/6 = E(X)
G''(t) = 1/3 → G''(1) = 1/3
Var(X) = 1/3 + 5/6 − (5/6)² = 1/3 + 5/6 − 25/36
= 12/36 + 30/36 − 25/36 =
(i) Find k. (ii) Identify the distribution of X. (iii) Find E(X).
(ii) G(t) = (1/27)(2+t)³ = (2/3 + t/3)³ = (2/3 + (1/3)t)³
This matches (q+pt)ⁿ with n=3, p=1/3, q=2/3.
(iii) E(X) = np = 3×(1/3) =
Or: G'(t)=(1/27)·3(2+t)²=1/9·(2+t)², G'(1)=1/9·9=1 ✓
This is the PGF of Poisson(8).
P(S=2) = e^(−8)·8²/2! = 64e^(−8)/2 = 32e^(−8)
(i) Show that X ~ Geo(1/6) and write down G_X(t).
(ii) Differentiate G_X(t) to find E(X) and Var(X).
(iii) Let S = X₁ + X₂ where X₁ and X₂ are independent rolls-to-six sequences. Write down G_S(t) and state E(S) and Var(S).
G_X(t) = (1/6)t / (1 − (5/6)t) = t/(6−5t)
(ii) G'(t) = [(6−5t) − t(−5)] / (6−5t)² = 6/(6−5t)²
G'(1) = 6/(6−5)² = 6/1 = 6 = E(X) [Check: 1/p = 6 ✓]
G''(t) = 6·2(6−5t)·5/(6−5t)⁴ = 60/(6−5t)³
G''(1) = 60/1 = 60
Var(X) = 60 + 6 − 36 = 30 [Check: q/p² = (5/6)/(1/36) = 30 ✓]
(iii) G_S(t) = [G_X(t)]² = t²/(6−5t)²
E(S) = 2·E(X) =
Var(S) = 2·Var(X) =
Interactive PGF Explorer
Select a distribution, adjust parameters, and explore the PGF, its derivatives, and the resulting moments.
Formula Sheet — Probability Generating Functions
- Finding k: Always use G(1) = 1. Substitute t=1, set equal to 1, solve. This is the first step in almost every PGF question.
- Extracting probabilities: Read pᵣ as the coefficient of tʳ. If G(t) is given in factored form, expand the first few terms to read off probabilities.
- Differentiating G(t): For products and quotients, use chain/product/quotient rule. Always evaluate at t=1 after differentiating, not before.
- Var(X) formula: Memorise Var(X) = G''(1) + G'(1) − [G'(1)]². Cambridge awards this explicitly — do not try to compute E(X²) and E(X) separately without mentioning G''(1).
- Identifying distributions: After computing G_S(t), compare with the standard forms. If G_S(t) = e^(λ(t−1)) → Poisson(λ). If G_S(t) = (q+pt)ⁿ → B(n,p). State the identification explicitly.
- Proving sum results: Write G_{X+Y}(t) = G_X(t)·G_Y(t), simplify the product, and identify the resulting PGF. This is the standard form of a Cambridge "hence show" question.