Skip to content
Cambridge AS & A Level9231

Probability generating functions

Further Mathematics 9231 Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Probability generating functions notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Probability generating functions notes as text: skim, search, and jump between subtopics.

~10 min read

1. What a PGF is

The probability generating function (PGF) of a discrete random variable X is G_X(t) = E(t^(X)). P(X=r) is the coefficient of t^(r). Do not substitute a value of t to find a probability.

The probabilities sum to 1, so G_X(1) = 1. Use this to find an unknown constant and to check a PGF. If X can take negative values, the PGF has negative powers of t.

G_X(t) = E(t^(X)) = sum_r P(X=r) t^(r)

G_X(1) = 1

Examiner insight

“The coefficients of the powers of t must sum to one.” “A few candidates had the correct probabilities but associated them with incorrect powers of t in the probability generating function.”

Worked example 13 marks

P(X=r) = kr for r = 1, 2, 3, 4. Find k and write down G_X(t).

  1. 1

    The probabilities sum to 1: k(1+2+3+4) = 1 [1]

  2. 2

    k = 1/10 [1]

  3. 3

    G_X(t) = 1/10(t + 2t² + 3t³ + 4t⁴) [1]

2. PGFs of standard distributions

Build each PGF from the definition. Write P(X=r), then sum the series. For the binomial use the binomial theorem. For the geometric use the sum of an infinite geometric progression, with X the number of trials up to and including the first success and q = 1-p. For the Poisson use the series for e^(x).

A discrete uniform PGF has equal coefficients. In every case check that G_X(1) = 1.

uniform on 1,…,n: G_X(t) = 1/n(t + t² + … + tⁿ)

X ∼ B(n,p): G_X(t) = (q + pt)ⁿ

X ∼ Geo(p): G_X(t) = pt/(1 - qt)

X ∼ Po(λ): G_X(t) = e^(λ(t-1))

Examiner insight

“The best responses first derived P (X = r) before writing the function in extensive form.”

Worked example 13 marks

X ∼ B(3, 1/4). Write down G_X(t) and use it to find P(X=2). Give your answer as a fraction.

  1. 1

    G_X(t) = (3/4 + 1/4 t)³ [1]

  2. 2

    P(X=2) is the coefficient of t²: 3 × 3/4 × (1/4)² [1]

  3. 3

    = 9/64 [1]

3. Reading and changing a PGF

The power of t records the value of the variable. If Y = aX + b, then X = r gives Y = ar + b. Each term p t^(r) becomes p t^(ar+b).

The probabilities stay the same. Only the powers move.

The most probable value is the power of t with the greatest coefficient. It is not the coefficient.

G_aX+b(t) = t^(b) G_X(t^(a))

Examiner insight

“The only errors were in the powers of t, usually with the polynomial beginning with a constant.” “The most probable value of Z is the power of t in the probability generating function which has the greatest coefficient.”

Worked example 12 marks

The discrete random variable X has probability generating function G_X(t) = 0.1 + 0.3t + 0.4t² + 0.2t³. The random variable Y is defined by Y = 3X + 2. Find the probability generating function of Y.

  1. 1

    X = r gives Y = 3r + 2, so the powers become 2, 5, 8, 11 [1]

  2. 2

    G_Y(t) = 0.1t² + 0.3t⁵ + 0.4t⁸ + 0.2t¹¹ [1]

4. Mean and variance from a PGF

Differentiate G_X(t) and put t = 1. The first derivative at 1 is the mean: G_X'(1) = E(X).

The second derivative at 1 is E(X(X-1)), so the variance needs the mean added back and then subtracted squared.

Substitute t = 1 into each derivative and simplify before combining. Use the product or quotient rule where the PGF is a fraction.

E(X) = G_X'(1)

Var(X) = G_X''(1) + G_X'(1) - [G_X'(1)]²

Examiner insight

“The most successful candidates substituted t = 1 into each derivative and simplified before combining to find Var (X).” “A significant minority of candidates made errors in their differentiation.”

Worked example 15 marks

The discrete random variable X has probability generating function G_X(t) given by G_X(t) = 0.1 + 0.3t + 0.4t² + 0.2t³. Use G_X(t) to find E(X) and Var(X).

  1. 1

    G_X'(t) = 0.3 + 0.8t + 0.6t² [1]

  2. 2

    E(X) = G_X'(1) = 0.3 + 0.8 + 0.6 = 1.7 [1]

  3. 3

    G_X''(t) = 0.8 + 1.2t [1]

  4. 4

    G_X''(1) = 2 [1]

  5. 5

    Var(X) = 2 + 1.7 - 1.7² = 0.81 [1]

5. Sums of independent variables

If X and Y are independent, the PGF of X + Y is the product of their PGFs. This is because E(t^(X+Y)) = E(t^(X)) E(t^(Y)).

For the sum of n independent observations of the same X, raise the PGF to the power n.

Multiply out, then read each probability as a coefficient. To go backwards from G_Y = (G_X)², find an expression that squares to G_Y and compare coefficients.

G_X+Y(t) = G_X(t) G_Y(t)

G_X₁+…+Xn(t) = [G_X(t)]ⁿ

Examiner insight

“There were some algebraic errors and a few candidates added their two probability generating functions instead of multiplying them.” “A minority of candidates assumed that the second probability generating function was the same as the first.”

Worked example 13 marks

The probability generating function of a random variable X is G_X(t) = 1/6 (t+1)(t²+2). The random variable Y is the sum of three independent observations of X. Find P(Y ≤ 2).

  1. 1

    G_Y(t) = [G_X(t)]³ = 1/216(t³ + t² + 2t + 2)³ [1]

  2. 2

    Coefficients of t⁰, t¹, t²: 1/216(8 + 24t + 36t² + …) [1]

  3. 3

    P(Y ≤ 2) = (8 + 24 + 36)/216 = 17/54 = 0.315 [1]

Recap

  • G_X(t) = E(t^(X)) = sum P(X=r)t^(r). The coefficient of t^(r) is P(X=r).
  • G_X(1) = 1. Use it to find constants and to check a PGF.
  • Binomial (q+pt)ⁿ. Geometric pt/(1-qt). Poisson e^(λ(t-1)). Uniform on 1,…,n: 1/n(t+…+tⁿ).
  • G_aX+b(t) = t^(b) G_X(t^(a)). The mode is the power of t with the largest coefficient.
  • E(X) = G_X'(1). Var(X) = G_X''(1) + G_X'(1) - [G_X'(1)]².
  • Independent variables: multiply the PGFs. n copies of X: [G_X(t)]ⁿ.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. The random variable X takes the values 0, 1 and 2 with probabilities 1/2, 1/3 and 1/6. Write down G_X(t).2 marks
    Answer
    1. G_X(t) = 1/2 + 1/3 t + 1/6 t².
    2. Check: 1/2 + 1/3 + 1/6 = 1.

    Trap: The value 0 gives a constant term, 1/2 t⁰, which must not be left out.

  2. The probability generating function of X is G_X(t) = k(1 + t + 2t² + 3t³). Find k and P(X=2).3 marks
    Answer
    1. G_X(1) = 1, so 7k = 1 and k = 1/7.
    2. P(X=2) is the coefficient of t², which is 2k = 2/7.

    Trap: A probability is a coefficient. Putting t = 2 into G_X is not P(X=2).

  3. X is the score when a fair four-sided die, numbered 1 to 4, is rolled. Write down G_X(t) and show that G_X(1) = 1.2 marks
    Answer
    1. P(X=r) = 1/4 for r = 1, 2, 3, 4, so G_X(t) = 1/4(t + t² + t³ + t⁴).
    2. G_X(1) = 1/4 × 4 = 1.

    Trap: The lowest score is 1, so the lowest power is t¹, not t⁰.

  4. X ∼ B(3, 0.4). Write down G_X(t) and use it to find P(X=2).3 marks
    Answer
    1. G_X(t) = (0.6 + 0.4t)³.
    2. P(X=2) is the coefficient of t²: 3 × 0.6 × 0.4² = 0.288.

    Trap: The success probability p goes with t and the failure probability q is the constant: (q + pt)ⁿ, not (p + qt)ⁿ.

  5. X has a Poisson distribution with mean 3. Show that G_X(t) = e^(3(t-1)), and use it to find E(X).4 marks
    Answer
    1. P(X=r) = (e⁻³3^(r))/(r!), so G_X(t) = e⁻³sum ((3t)^(r))/(r!).
    2. sum ((3t)^(r))/(r!) = e^(3t), so G_X(t) = e⁻³e^(3t) = e^(3(t-1)).
    3. G_X'(t) = 3e^(3(t-1)).
    4. E(X) = G_X'(1) = 3.

    Trap: Forgetting the factor e⁻³ gives e^(3t), and then G_X(1) ≠ 1.

  6. The probability generating function of X is G_X(t) = (2t + t²)/3. Find E(X) and Var(X). Give exact answers.4 marks
    Answer
    1. G_X'(t) = (2 + 2t)/3, so E(X) = G_X'(1) = 4/3, and G_X''(t) = 2/3.
    2. Var(X) = 2/3 + 4/3 - 16/9 = 2 - 16/9 = 2/9.

    Trap: G_X''(1) - [G_X'(1)]² is negative here. The mean must be added back.

  7. The probability generating function of X is G_X(t) = t/(4 - 3t). Find E(X) and Var(X).5 marks
    Answer
    1. Quotient rule: G_X'(t) = ((4-3t) + 3t)/((4-3t)²) = 4/((4-3t)²), so E(X) = G_X'(1) = 4.
    2. G_X''(t) = 24/((4-3t)³), so G_X''(1) = 24.
    3. Var(X) = 24 + 4 - 16 = 12.

    Trap: Using the quotient rule again invites errors: write G_X'(t) = 4(4-3t)⁻² and use the chain rule.

  8. X and Y are independent, with G_X(t) = (1 + t)/2 and G_Y(t) = (1 + 2t)/3. Find the probability generating function of S = X + Y, and find P(S=1).3 marks
    Answer
    1. G_S(t) = G_X(t) G_Y(t) = ((1+t)(1+2t))/6 = (1 + 3t + 2t²)/6.
    2. P(S=1) is the coefficient of t: 3/6 = 1/2.

    Trap: Adding the PGFs gives a function that does not sum to 1 at t = 1.

  9. A machine packs boxes of eggs. The number of cracked eggs in a box is X, which takes only the values 0, 1 and 2. Two boxes are independent, and the total number of cracked eggs S in the two boxes has probability generating function G_S(t) = 1/36(4 + 12t + 13t² + 6t³ + t⁴). Find G_X(t), and hence find P(X=1) and Var(X). Give exact answers.7 marks
    Answer
    1. G_S(t) = [G_X(t)]². Write G_X(t) = a + bt + ct² with a, b, c ≥ 0.
    2. Constant term: a² = 4/36, so a = 1/3.
    3. Coefficient of t⁴: c² = 1/36, so c = 1/6.
    4. Coefficient of t: 2ab = 12/36, so b = 1/2.
    5. Check t²: b² + 2ac = 1/4 + 1/9 = 13/36, which matches. So G_X(t) = 1/6(2 + 3t + t²) and P(X=1) = 1/2.
    6. G_X'(t) = (3 + 2t)/6, so G_X'(1) = 5/6. G_X''(t) = 1/3.
    7. Var(X) = 1/3 + 5/6 - 25/36 = 17/36.

    Trap: Taking the square root of each term of G_S gives coefficients that do not sum to 1. Find an expression whose square is G_S and compare coefficients.

  10. In a board game a player throws two fair coins. X is the number of heads, with G_X(t) = 1/4(1+t)². The player moves Y = 2X - 1 squares, where a move of -1 is one square back. The player then draws a card, independently of the coins, which adds 1 square with probability 2/3 and 0 squares otherwise. T is the total move. Find G_T(t), the most probable value of T, and Var(T).8 marks
    Answer
    1. Y takes the values -1, 1, 3, so G_Y(t) = t⁻¹G_X(t²) = 1/4(t⁻¹ + 2t + t³).
    2. Card: G_B(t) = 1/3(1 + 2t).
    3. G_T(t) = G_Y(t) G_B(t) = 1/12(t⁻¹ + 2t + t³)(1 + 2t).
    4. G_T(t) = 1/12(t⁻¹ + 2 + 2t + 4t² + t³ + 2t⁴). The coefficients sum to 12/12 = 1.
    5. The greatest coefficient is 4/12, on t², so the most probable value of T is 2.
    6. G_T'(t) = 1/12(-t⁻² + 2 + 8t + 3t² + 8t³), so G_T'(1) = 20/12 = 5/3.
    7. G_T''(t) = 1/12(2t⁻³ + 8 + 6t + 24t²), so G_T''(1) = 40/12 = 10/3.
    8. Var(T) = 10/3 + 5/3 - 25/9 = 20/9.

    Trap: The most probable value is the power of t, 2, not its coefficient 1/3; and the move of -1 needs the term t⁻¹, not a constant.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
Add the PGFs of X and Y to get the PGF of X + Y.Multiply the PGFs of independent variables.
The most probable value is the greatest coefficient.The most probable value is the power of t with the greatest coefficient.
k = 1/8, with no working.Use G_X(1) = 1, so k = 1/8.
Take the square root of each term of the PGF of Y.Find an expression whose square is the PGF and compare coefficients.

Frequently asked questions

What is a probability generating function?
The probability generating function (PGF) of a discrete random variable X is G_X(t) = E(t^(X)). The probability P(X=r) is the coefficient of t^(r), so do not substitute a value of t to find a probability. The probabilities sum to 1, so G_X(1) = 1.
How do I use G_X(1) = 1 to find an unknown constant in a PGF?
The probabilities sum to 1, so G_X(1) = 1. Substitute t = 1 to find the constant. For example, if P(X=r) = kr for r = 1, 2, 3, 4, then k(1+2+3+4) = 1 gives k = 1/10.
What are the PGFs of the binomial, geometric and Poisson distributions?
For a binomial B(n, p), the PGF is (q + pt)ⁿ, with q = 1 - p. For a geometric distribution, with X the number of trials up to and including the first success, it is pt/(1 - qt). For a Poisson distribution with mean λ, it is e^(λ(t-1)).
How do I find the mean and variance from a probability generating function?
The mean is the first derivative at t = 1, so E(X) = G_X'(1). The variance is G_X''(1) + G_X'(1) - [G_X'(1)]², so the mean is added back before the square is subtracted. Substitute t = 1 into each derivative and simplify before combining.
How do I find the PGF of the sum of independent variables?
Multiply the PGFs of independent variables: if X and Y are independent, the PGF of X + Y is G_X(t) G_Y(t). For the sum of n independent observations of the same X, raise the PGF to the power n, giving [G_X(t)]ⁿ.
What mistake do students make when combining the PGFs of two independent variables?
A few candidates added the two probability generating functions instead of multiplying them. For independent variables the PGF of X + Y is the product of their PGFs, so multiply them, then read each probability as a coefficient.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters