Probability generating functions
Diperkenalkan| English | Makna |
|---|---|
| discrete distribution/dɪˈskriːt ˌdɪstrɪˈbjuːʃn/ | Distribusi diskrit |
| probability generating function/ˌprɒbəˈbɪlɪti ˈdʒenəreɪtɪŋ ˈfʌŋkʃn/ | Fungsi pembangkit peluang |
| coefficient/ˌkəʊɪˈfɪʃənt/ | koefisien |
| variance/ˈveərɪəns/ | varians |
| derivative/dɪˈrɪvətɪv/ | turunan |
| independent/ˌɪndɪˈpendənt/ | Bebas (independen) |
A whole distribution in one function
- Roll two dice. What is the probability that the total is 3? You could list all 36 outcomes, or multiply two short polynomials and read off one coefficient.
- A probability generating function 概率母函数 (PGF) stores every probability of a discrete variable as a coefficient. Derivatives give the mean and variance, and multiplying PGFs handles sums of independent variables.
Defining the PGF
- For $X$ taking values $0,1,2,\dots$:
- The coefficient 系数 of $t^x$ is $P(X=x)$. For a fair die, $G(t)=\tfrac16(t+t^2+t^3+t^4+t^5+t^6)$.
- Two quick facts: $G(1)=1$ (the probabilities add to 1), and $G(0)=P(X=0)$.

Probability generating function lab
G(x) = p0 + p1 x + p2 x^2 + ...
Change x and see how a PGF stores probabilities in powers of x.
The probability generating function of X is defined as:
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
G(t) = E(tˣ) = Σ P(X=x) tˣ.
PGFs of standard distributions
| Distribution | PGF $G(t)$ |
|---|---|
| $B(n,p)$, with $q=1-p$ | $(q+pt)^n$ |
| $\text{Po}(\lambda)$ | $e^{\lambda(t-1)}$ |
| $\text{Geo}(p)$, values $1,2,\dots$ | $\dfrac{pt}{1-qt}$ |
- Recognise them: $(0.7+0.3t)^{10}$ is the PGF of $B(10,\,0.3)$, and $e^{2t-2}$ is the PGF of $\text{Po}(2)$.
Which distribution has PGF e^(3t − 3)?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
e^(3t − 3) = e^(3(t − 1)), the PGF of Po(λ) with λ = 3.
Mean and variance 方差 from derivatives 导数
$G(t)=0.5+0.3t+0.2t^2$. Then $G'(t)=0.3+0.4t$ and $G''(t)=0.4$.
- $E(X)=G'(1)=0.7$.
- Variance: $0.4+0.7-0.49=0.61$.
- Check directly: $E(X^2)=0.3+0.8=1.1$, and $1.1-0.49=0.61$.
- Why it works: $G'(t)=\sum x\,P(X=x)\,t^{x-1}$, so $G'(1)=\sum x\,P(X=x)=E(X)$.
X has G(t) = 0.5 + 0.3t + 0.2t². Since E(X) = G′(1) and G′(t) = 0.3 + 0.4t, what is E(X)?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
G'(1) = 0.3 + 0.4(1) = 0.7.
The mean is found from the PGF by E(X) = G′(______).
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
E(X) = G'(1).
For G(t) = 0.2 plus 0.5 t plus 0.3 t squared, what is E(X), and what must G(1) equal?
The expectation is the derivative of the generating function at 1. The probabilities themselves must add to 1.
G(t) = 0.2 + 0.5t + 0.3t². Find Var(X).
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
G′(1) = 0.5 + 0.6 = 1.1 and G″(1) = 0.6, so Var(X) = 0.6 + 1.1 − 1.21 = 0.49.
Sums of independent 独立 variables
- If $X$ and $Y$ are independent, then $G_{X+Y}(t)=G_X(t)\,G_Y(t)$.
- Two dice: the total has PGF $\tfrac1{36}(t+t^2+\dots+t^6)^2$. The only way to make $t^3$ is $t\cdot t^2+t^2\cdot t$, so $P(\text{total}=3)=\tfrac2{36}$.
- Poisson sums: $e^{\lambda(t-1)}\,e^{\mu(t-1)}=e^{(\lambda+\mu)(t-1)}$, which proves that $X+Y\sim\text{Po}(\lambda+\mu)$.
The PGF of a sum of two independent variables is the sum of their PGFs.
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
False. For independent X and Y, G_{X+Y}(t) = G_X(t) G_Y(t): the PGFs multiply.
Two fair dice are rolled. Using the coefficient of t⁷ in (t + t² + … + t⁶)²/36, find P(total = 7) to 4 decimal places.
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
t⁷ arises from 6 pairs: (1,6), (2,5), …, (6,1). So the probability is 6/36 = 0.1667.
Check it's a valid PGF
$G(1)$ must equal 1, and every coefficient must be between 0 and 1. Use $G(1)=1$ to find an unknown constant before you differentiate.
For any valid PGF, what is the value of G(1)?
Kesulitan 2/5 · 140 koin + bonus kecil pada penyelesaian pertama hari ini
G(1) = Σ P(X=x) = 1, since probabilities sum to 1.
Worked exam question: a PGF with a constant
Question (8 marks). The PGF of $X$ is $G_X(t)=k(2+t)^2$. (a) Find $k$. (b) Find $E(X)$ and $\text{Var}(X)$. (c) $Y$ is independent of $X$ and takes the values 1 and 2 with equal probability. Find $P(X+Y=2)$.
- (a) $G_X(1)=9k=1$, so $k=\tfrac19$ (B1).
- (b) $G_X'(t)=\tfrac29(2+t)$, so $E(X)=\tfrac69=\tfrac23$ (M1 A1). $G_X''(t)=\tfrac29$, so (M1 A1):
- Check: $\tfrac19(2+t)^2=\left(\tfrac23+\tfrac13t\right)^2$, which is $B(2,\tfrac13)$: $np=\tfrac23$, $npq=\tfrac49$.
- (c) $G_Y(t)=\tfrac12(t+t^2)$. Multiply (M1):
- The coefficient of $t^2$: $P(X+Y=2)=\tfrac8{18}=\tfrac49$ (A1). The coefficients add to 18, so $G(1)=1$.
Why answers lose marks: using the variance formula without the $+G'(1)$ term, or adding the PGFs instead of multiplying them.
The PGF of X is k(1 + 3t)³. Find k, E(X) and Var(X).
Same method as the worked question.
You've got it
- $G(t)=E(t^X)=\sum P(X=x)\,t^x$; the coefficient of $t^x$ is $P(X=x)$; $G(1)=1$
- standard PGFs: $(q+pt)^n$, $e^{\lambda(t-1)}$, $\dfrac{pt}{1-qt}$
- $E(X)=G'(1)$; $\text{Var}(X)=G''(1)+G'(1)-(G'(1))^2$
- independent sum → multiply the PGFs
What is E(X)?
Kesulitan 1/5 · 100 koin + bonus kecil pada penyelesaian pertama hari ini
0.5 plus 0.6 is 1.1. Other options — 0.7 (the lesson expectation); 1 (the value of G(1)).