Maths4UBETA

Building and reading generating functions

Encode a discrete distribution in the coefficients and powers of one function.

Try the quick check →
Lesson 1 of 5

Section 1 of 6 · Core · about 6 min

How does one power store one probability?

Use the value as an exponent and its probability as the coefficient.

Three probability masses at 0, 1 and 3, with no mass at 2.

This discrete law has PGF 12+13t+16t3\tfrac12+\tfrac13t+\tfrac16t^3. The graphical gap at 22 gives a missing t2t^2 term.

Worked example

Attach each mass to its exponent

A scoring device returns a non-negative integer count.

xxProbability
0012\frac{1}{2}
1113\frac{1}{3}
3316\frac{1}{6}

Give the whole generating function, in terms of tt.

  1. Attach the probability to the power for its value.

    GX(t)=t36+t3+12G_{X}(t)=\frac{t^{3}}{6} + \frac{t}{3} + \frac{1}{2}
  2. The possible outcomes are 0,1,30,1,3, so the coefficient of t2t^2 is zero. Substitution of t=1t=1 gives GX(1)=1G_X(1)=1, confirming the probabilities add to one.

Worked example

Read a missing and a constant probability

A scoring device returns a non-negative integer count.

GX(t)=t42+t10+25G_{X}(t)=\frac{t^{4}}{2} + \frac{t}{10} + \frac{2}{5}

Find the exact probabilities of X=0X=0 and X=2X=2.

Try it on paper first.

  1. Attach the probability to the power for its value.

    GX(t)=t42+t10+25G_{X}(t)=\frac{t^{4}}{2} + \frac{t}{10} + \frac{2}{5}
  2. The coefficient of t2t^{2} is 00. The constant coefficient is 25\frac{2}{5}.

Your turn

A scoring device returns a non-negative integer count.

xxProbability
0015\frac{1}{5}
1125\frac{2}{5}
22310\frac{3}{10}
55110\frac{1}{10}

Give the whole generating function, in terms of tt.

Enter an expression in t; use ^ for powers and / for fractions.

Section 2 of 6 · Core · about 7 min

Why does the PGF equal 1 at t = 1?

Every power of 1 equals 1, including the constant term.

Worked example

Find the coefficient multiplier

A proposed PGF has the form c(6t4+3t+1)c\left(6 t^{4} + 3 t + 1\right).

Find cc and the exact coefficient of t1t^1.

  1. G(1)=1G(1)=1 so 10c=110c=1 and c=110c=\frac{1}{10}.

  2. The completed function is GX(t)=3t45+3t10+110G_{X}(t)=\frac{3 t^{4}}{5} + \frac{3 t}{10} + \frac{1}{10}.

Your turn

A proposed PGF has the form c(3t3+5t+2)c\left(3 t^{3} + 5 t + 2\right).

Find cc and the exact coefficient of t3t^3.

Enter the value on its own or write c = … . Fractions and exact square roots are accepted.

Enter the value on its own or write p = … . Fractions and exact square roots are accepted.

Section 3 of 6 · Core · about 7 min

How do I build uniform and binomial PGFs?

Write one term per possible uniform value. For a binomial count expand a single Bernoulli factor for each trial.

Worked example

Form a binomial PGF

XX follows a binomial distribution with 3 trials and success probability 13\frac{1}{3}.

Give the generating function in terms of tt.

  1. One trial has PGF t3+23\frac{t}{3} + \frac{2}{3}. The binomial expansion collects the probabilities for all 33 independent trials.

  2. GX(t)=(t3+23)3G_{X}(t)=\left(\frac{t}{3} + \frac{2}{3}\right)^{3}

Your turn

XX follows 5 equally likely integer outcomes from 1 to 5.

Give the generating function in terms of tt.

Enter an expression in t; use ^ for powers and / for fractions.

Section 4 of 6 · Core · about 7 min

Where does the geometric series start?

The geometric variable used here counts the trial of the first success. Its support begins at 1.

Worked example

Start the geometric PGF at the first trial

XX follows a geometric distribution with success probability 25\frac{2}{5}. It counts the trial of the first success.

Give the generating function in terms of tt.

  1. Factor the first term 2t5\frac{2 t}{5} from the series. The remaining series has common ratio 3t5\frac{3 t}{5}.

  2. GX(t)=2t5(1−3t5)G_{X}(t)=\frac{2 t}{5 \left(1 - \frac{3 t}{5}\right)}

Your turn

XX follows a geometric distribution with success probability 37\frac{3}{7}. It counts the trial of the first success.

Give the generating function in terms of tt.

Enter a single fraction such as (2x+1)/(x−3). You can also separate the numerator and denominator with a semicolon.

Section 5 of 6 · Core · about 7 min

Why does a Poisson PGF use an exponential?

The factorial denominators match the power series for the exponential function.

Worked example

Recognise the normalised exponential

XX follows a Poisson distribution with rate 33.

Give the generating function in terms of tt.

  1. Factor e−3e^{-3} from the power series. The remaining series is the exponential series for e3te^{3 t}.

  2. GX(t)=e3t−3G_{X}(t)=e^{3 t - 3}

Your turn

XX follows a Poisson distribution with rate 22.

Find the probability of exactly 3.

Probability

Section 6 of 6 · Extension · about 6 min

How can a generating function be read backwards?

Match a desired outcome to its exponent. Expand only as far as needed.

Worked example

Read the probability at the fourth power

A scoring device returns a non-negative integer count.

GX(t)=3t48+t22+18G_{X}(t)=\frac{3 t^{4}}{8} + \frac{t^{2}}{2} + \frac{1}{8}

Find the exact probability of X=4X=4.

  1. Attach the probability to the power for its value.

    GX(t)=3t48+t22+18G_{X}(t)=\frac{3 t^{4}}{8} + \frac{t^{2}}{2} + \frac{1}{8}
  2. The coefficient of t4t^{4} is 38\frac{3}{8}. The constant coefficient is 18\frac{1}{8}.

Your turn

A scoring device returns a non-negative integer count.

GX(t)=3t58+3t28+14G_{X}(t)=\frac{3 t^{5}}{8} + \frac{3 t^{2}}{8} + \frac{1}{4}

Find the exact probability of X=1X=1.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Worked examples

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

The whole distribution, including a missing count

3 marks

X has supported values 0,1,30,1,3 with probabilities k,3k,2kk,3k,2k, in the same order. Find k, the full PGF as a polynomial in t, and P(X=2).

Enter the value on its own or write k = … . Fractions and exact square roots are accepted.

Enter an expression in t; use ^ for powers and / for fractions.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Extra practice from this lesson

Normalise the complete function

A proposed PGF has the form c(3t5+4t3+2t2+3)c\left(3 t^{5} + 4 t^{3} + 2 t^{2} + 3\right).

Give the complete normalised PGF.

Enter an expression in t; use ^ for powers and / for fractions.

Read the mass at the first possible trial

XX follows a geometric distribution with success probability 49\frac{4}{9}. It counts the trial of the first success.

Find the smallest possible value of XX and its exact probability.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter the value on its own or write p = … . Fractions and exact square roots are accepted.

Recognise a different rate

XX follows a Poisson distribution with rate 44.

Give the generating function in terms of tt.

Generating function

Compute the finite binomial probability

XX follows a binomial distribution with 4 trials and success probability 35\frac{3}{5}.

Find the probability of exactly 2.

Enter the value on its own or write p = … . Fractions and exact square roots are accepted.

Find a later geometric coefficient

XX follows a geometric distribution with success probability 13\frac{1}{3}. It counts the trial of the first success.

Find the probability of exactly 4.

Enter the value on its own or write p = … . Fractions and exact square roots are accepted.

Read the constant and sixth-power coefficients

A scoring device returns a non-negative integer count.

GX(t)=2t65+3t510+t5+110G_{X}(t)=\frac{2 t^{6}}{5} + \frac{3 t^{5}}{10} + \frac{t}{5} + \frac{1}{10}

Find the exact probabilities of X=0X=0 and X=6X=6.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter the value on its own or write p = … . Fractions and exact square roots are accepted.

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.