Practise › Questions › Probability generating functions
Probability generating functions questions
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.
6 original questions · 25 marks · the probability generating functions notes · Further Statistics 1
Every question here is written for this library rather than taken from a past paper. Write your answer out before opening the worked one: the answers award marks point by point, and the marks are easier to see when you have something of your own to compare against.
Define the probability generating function of a discrete random variable X, and state the value of G(1).
Worked answer
G(t) = E(tX) = Σ txP(X = x). Setting t = 1 makes every power 1, so G(1) is the total probability, which is always 1. B1 for the definition, B1 for G(1) = 1. It is the quickest check on any generating function you write down.X has G(t) = (0.6 + 0.4t)8. Name the distribution and find E(X).
Worked answer
This is the binomial form (q + pt)n, so X ~ B(8, 0.4). Differentiating, G'(t) = 8(0.4)(0.6 + 0.4t)7, and at t = 1 the bracket is 1, so E(X) = G'(1) = 3.2. B1 for naming the binomial, M1 for differentiating and setting t = 1, A1 for 3.2. That agrees with np = 8 × 0.4. Quote E(X) = G'(1) explicitly, since the mark is for the method rather than the number.X has G(t) = (0.6 + 0.4t)8, with E(X) = 3.2. Find Var(X) using the generating function.
Worked answer
G''(t) = 8(7)(0.4)²(0.6 + 0.4t)6, so G''(1) = 56 × 0.16 = 8.96. Then Var(X) = G''(1) + G'(1) − [G'(1)]² = 8.96 + 3.2 − 10.24 = 1.92, which matches npq = 8(0.4)(0.6). M1 for the second derivative, A1 for G''(1) = 8.96, M1 for the variance formula, A1 for 1.92.Derive the probability generating function of X ~ Po(λ), and use it to confirm E(X) = λ.
Worked answer
G(t) = Σ txe−λλx/x! = e−λΣ(λt)x/x! = e−λeλt = eλ(t − 1). Differentiating: G'(t) = λeλ(t − 1), so G'(1) = λ. M1 for the defining sum, A1 for pulling out e−λ, A1 for eλ(t − 1), M1 for differentiating, A1 for G'(1) = λ. Checking G(1) = e⁰ = 1 confirms the derivation.X and Y are independent with X ~ Po(2) and Y ~ Po(7). Use generating functions to identify the distribution of X + Y.
Worked answer
GX+Y(t) = e2(t − 1) × e7(t − 1) = e9(t − 1), which is the generating function of Po(9). Since generating functions determine distributions uniquely, X + Y ~ Po(9). M1 for multiplying the two generating functions, A1 for e9(t − 1), A1 for Po(9).A geometric distribution has G(t) = pt/(1 − qt) with q = 1 − p. Show that its variance is q/p². The number of trials up to and including the third success is the sum of three independent such variables. Write down its probability generating function and deduce its mean and variance.
Worked answer
By the quotient rule G'(t) = p/(1 − qt)², so G'(1) = p/p² = 1/p. Differentiating again, G''(t) = 2pq/(1 − qt)³, so G''(1) = 2pq/p³ = 2q/p².
Var = G''(1) + G'(1) − [G'(1)]² = 2q/p² + 1/p − 1/p² = (2q + p − 1)/p². Since p − 1 = −q the numerator is 2q − q = q, giving q/p² as required.
For independent variables the generating functions multiply, so the sum of three has G(t) = [pt/(1 − qt)]³. Differentiating a product of three identical factors gives three times the single mean, so the mean is 3/p, and independence lets the variances add, giving 3q/p².
M1 for G'(t) by the quotient rule, A1 for 1/p, M1 for G''(t), A1 for 2q/p², M1 for the variance formula, A1 for q/p², B1 for the cubed generating function, B1 for the mean and variance of the sum. With p = 0.25 the single distribution has mean 4 and variance 12, and the third success is expected on trial 12 with variance 36. The multiplication rule holds only because the trials are independent, and saying so is part of the answer.
The same practice on paper: the printable workbook for this topic, questions and a worked answer book.
Practise probability generating functions one question at a time
The player marks nothing for you. It shows one question, waits, then shows the worked answer so you can mark yourself, and brings a question back sooner when it went badly.