FS1 7.1 - Generating functions of standard distributions

FS1 7.1 - Generating functions of standard distributions

A probability generating function stores an entire discrete distribution in one expression. You will construct and check these functions, derive the four standard forms, recover exact probabilities and transform the values of a random variable (FS1 7.1).

Store the value in the power and its probability in the coefficient

The expression (1+2t+t3)/4(1+2t+t^3)/4 contains a complete probability distribution. Could evaluating it at just t=−1t=-1 tell you how likely an even outcome is?

Start by reading its pieces: the constant stores probability 1/41/4 at value 00, the coefficient of tt stores probability 1/21/2 at value 11, and the coefficient of t3t^3 stores probability 1/41/4 at value 33. The missing t2t^2 means probability zero at value 22.

You already know

For a discrete variable, E(g(X))=∑xg(x)P(X=x)\mathrm E(g(X))=\sum_x g(x)\mathrm P(X=x). Core Pure Maclaurin work gives the coefficient of trt^r as f(r)(0)/r!f^{(r)}(0)/r!, where the expansion applies. Use the standard exponential and binomial series with their conditions.

Here the function applied to the random value is tXt^X. The letter tt is an input, not another random variable.

Probability generating function

For a non-negative integer-valued random variable XX, its probability generating function, or PGF, is

GX(t)=E(tX)=∑x=0∞P(X=x)txG_X(t)=\mathrm E(t^X)=\sum_{x=0}^{\infty}\mathrm P(X=x)t^x

For finite support the sum is a polynomial. For infinite support it is a power series, used where it converges. In particular it converges for ∣t∣≤1|t|\le1. The definition GX(t)=E(tX)G_X(t)=\mathrm E(t^X) is in the formula booklet.

A PGF is a weighted list in algebraic form, rather than a density or a cumulative probability. Its value at an arbitrary input is usually neither a point probability nor a cumulative probability.

Reading and checking a PGF

For a non-negative integer-valued variable,

GX(1)=1,GX(0)=P(X=0)G_X(1)=1,\qquad G_X(0)=\mathrm P(X=0)

The coefficient of trt^r is P(X=r)\mathrm P(X=r). Equivalently, using the Maclaurin coefficient rule,

P(X=r)=GX(r)(0)r!,r=0,1,2,…\mathrm P(X=r)=\frac{G_X^{(r)}(0)}{r!},\qquad r=0,1,2,\ldots

Every coefficient must be non-negative. Normalisation alone is not enough to establish a valid PGF.

Not in the formula booklet: learn it.

Substituting 11 adds all the coefficients, whereas substituting 00 isolates the constant term. Substituting −1-1 adds the even-power probabilities and subtracts the odd-power probabilities. Thus GX(−1)G_X(-1) measures the difference between even and odd probabilities: a surprisingly compact way to ask about parity. We will finish the opening calculation after working with the encoding.

Key idea

The exponent is the possible value; its coefficient is the probability. Check both non-negative coefficients and total probability GX(1)=1G_X(1)=1.

Use both checks rather than accepting any expression that equals one at t=1t=1.

Normalising a PGF and reading exact probabilities

Find an unknown normalising constant using GX(1)=1G_X(1)=1, then read the required coefficients.

For a finite distribution, form one term P(X=x)tx\mathrm P(X=x)t^x for each possible value. Include a missing power with coefficient zero when adding a range of probabilities. For example, P(X≤2)\mathrm P(X\le2) adds the coefficients at powers 0,1,20,1,2; it does not mean substitute t=2t=2.

Worked example 1: an unknown scale factor

Question. A non-negative integer-valued variable has PGF GX(t)=k(1+2t+t3)G_X(t)=k(1+2t+t^3). Find kk and P(X≤1)\mathrm P(X\le1).

Plan. Normalise at 11, then add the constant and linear coefficients.

GX(1)=k(1+2+1)=1total probabilityk=14normaliseGX(t)=14+12t+14t3display the probabilitiesP(X≤1)=14+12=34values zero or one\begin{aligned} G_X(1)&=k(1+2+1)=1 &&\text{total probability}\\ k&=\frac14 &&\text{normalise}\\ G_X(t)&=\frac14+\frac12t+\frac14t^3 &&\text{display the probabilities}\\ \mathrm P(X\le1)&=\frac14+\frac12=\frac34 &&\text{values zero or one} \end{aligned}

Why this step? Setting t=0t=0 would give only P(X=0)=k\mathrm P(X=0)=k, which need not equal 11.

Answer. k=1/4k=1/4 and P(X≤1)=3/4\mathrm P(X\le1)=3/4.

Check. All three probabilities are non-negative and add to 11; the probability at value 22 is zero.

Worked example 2 changes only the unnormalised weight at value 11, from 22 to 33. The whole expression must be normalised again.

Worked example 2: changing one weight

Question. A variable has PGF GX(t)=k(1+3t+t3)G_X(t)=k(1+3t+t^3). Find kk and P(X≤1)\mathrm P(X\le1).

Plan. Recalculate the total coefficient weight before reading probabilities.

GX(1)=k(1+3+1)=1new total weightk=15new normalising constantP(X≤1)=15+35=45constant plus linear term\begin{aligned} G_X(1)&=k(1+3+1)=1 &&\text{new total weight}\\ k&=\frac15 &&\text{new normalising constant}\\ \mathrm P(X\le1)&=\frac15+\frac35=\frac45 &&\text{constant plus linear term} \end{aligned}

Why this step? Retaining k=1/4k=1/4 would make the probabilities add to 5/45/4. Changing one weight changes the scale of every probability.

Answer. k=1/5k=1/5 and P(X≤1)=4/5\mathrm P(X\le1)=4/5.

Check. The remaining probability is P(X=3)=1/5\mathrm P(X=3)=1/5, complementing 4/54/5.

You can reverse the process: a table with values 0,1,30,1,3 and probabilities 1/5,3/5,1/51/5,3/5,1/5 generates precisely this polynomial.

Watch out

Wrong: P(X≤1)=GX(1)\mathrm P(X\le1)=G_X(1). That value is always 11. Right: add the coefficients belonging to outcomes at most 11; keep the argument of a function separate from the outcome threshold.

Increase the same unnormalised weight once more.

Deriving the PGFs of count distributions

Insert the probability formula into the PGF definition, then recognise a binomial or exponential expansion.

For X∼B(n,p)X\sim\mathrm B(n,p), let q=1−pq=1-p. The binomial theorem gives

GX(t)=∑x=0n(nx)pxqn−xtxdefinition and binomial probabilities=∑x=0n(nx)(pt)xqn−xcombine powers=(q+pt)nbinomial theorem\begin{aligned} G_X(t)&=\sum_{x=0}^{n}\binom nx p^xq^{n-x}t^x &&\text{definition and binomial probabilities}\\ &=\sum_{x=0}^{n}\binom nx(pt)^xq^{n-x} &&\text{combine powers}\\ &=(q+pt)^n &&\text{binomial theorem} \end{aligned}

For Y∼Po⁡(λ)Y\sim\operatorname{Po}(\lambda), the exponential series gives

GY(t)=∑y=0∞e−λλyy!tydefinition and Poisson probabilities=e−λ∑y=0∞(λt)yy!extract the constant=e−λeλt=eλ(t−1)exponential series\begin{aligned} G_Y(t)&=\sum_{y=0}^{\infty}\mathrm e^{-\lambda}\frac{\lambda^y}{y!}t^y &&\text{definition and Poisson probabilities}\\ &=\mathrm e^{-\lambda}\sum_{y=0}^{\infty}\frac{(\lambda t)^y}{y!} &&\text{extract the constant}\\ &=\mathrm e^{-\lambda}\mathrm e^{\lambda t} =\mathrm e^{\lambda(t-1)} &&\text{exponential series} \end{aligned}

Both derivations start with the definition; merely copying the final supplied expression would not show a derivation.

Binomial and Poisson PGFs

X∼B(n,p)⟹GX(t)=(1−p+pt)nX\sim\mathrm B(n,p)\quad\Longrightarrow\quad G_X(t)=(1-p+pt)^n

Here nn is a non-negative integer, 0≤p≤10\le p\le1, and the polynomial is valid for all real tt.

Y∼Po⁡(λ)⟹GY(t)=eλ(t−1)Y\sim\operatorname{Po}(\lambda)\quad\Longrightarrow\quad G_Y(t)=\mathrm e^{\lambda(t-1)}

Here λ>0\lambda>0, and the exponential series converges for all real tt.

In the formula booklet.

The factor e−λ\mathrm e^{-\lambda} must remain when extracting Poisson coefficients. For example, Po⁡(2)\operatorname{Po}(2) gives G(t)=e−2(1+2t+2t2+⋯ )G(t)=\mathrm e^{-2}(1+2t+2t^2+\cdots), so the probability at value 22 is 2e−22\mathrm e^{-2}, rather than 22.

Worked example 3: adding the first three coefficients

Question. Let X∼B(4,2/5)X\sim\mathrm B(4,2/5). Find its PGF and use it to find P(X≤2)\mathrm P(X\le2) exactly.

Plan. Substitute into the binomial PGF and retain its constant, linear and quadratic terms.

GX(t)=(35+25t)4standard binomial PGF=(3+2t)4625preserve the outside factor=81+216t+216t2+⋯625first three coefficientsP(X≤2)=81+216+216625add outcomes zero to two=513625exact probability\begin{aligned} G_X(t)&=\left(\frac35+\frac25t\right)^4 &&\text{standard binomial PGF}\\ &=\frac{(3+2t)^4}{625} &&\text{preserve the outside factor}\\ &=\frac{81+216t+216t^2+\cdots}{625} &&\text{first three coefficients}\\ \mathrm P(X\le2)&=\frac{81+216+216}{625} &&\text{add outcomes zero to two}\\ &=\frac{513}{625} &&\text{exact probability} \end{aligned}

Why this step? The quadratic coefficient includes (42)=6\binom42=6. A Maclaurin alternative must divide GX′′(0)G_X''(0) by 2!2!, giving the same coefficient.

Answer. GX(t)=(3+2t)4/625G_X(t)=(3+2t)^4/625, and P(X≤2)=513/625\mathrm P(X\le2)=513/625.

Check. Direct binomial probabilities at 0,1,20,1,2 give the same three coefficients, and GX(1)=54/625=1G_X(1)=5^4/625=1.

Worked example 4 changes only the trial count, from 44 to 55. The success probability and event remain fixed.

Worked example 4: one more trial

Question. Let X∼B(5,2/5)X\sim\mathrm B(5,2/5). Find its PGF and use it to find P(X≤2)\mathrm P(X\le2) exactly.

Plan. Increase the PGF's power and recalculate the first three coefficients.

GX(t)=(3+2t)53125five trials=243+810t+1080t2+⋯3125binomial coefficientsP(X≤2)=243+810+10803125same event=21333125exact sum\begin{aligned} G_X(t)&=\frac{(3+2t)^5}{3125} &&\text{five trials}\\ &=\frac{243+810t+1080t^2+\cdots}{3125} &&\text{binomial coefficients}\\ \mathrm P(X\le2)&=\frac{243+810+1080}{3125} &&\text{same event}\\ &=\frac{2133}{3125} &&\text{exact sum} \end{aligned}

Why this step? The quadratic numerator is (52)3322=1080\binom52 3^3 2^2=1080; changing the trial count changes the coefficient as well as the denominator.

Answer. GX(t)=(3+2t)5/3125G_X(t)=(3+2t)^5/3125, and P(X≤2)=2133/3125\mathrm P(X\le2)=2133/3125.

Check. The probability is smaller than 513/625513/625, as an extra independent trial can add a success but cannot remove an existing one.

Expanding a rational or exponential PGF uses the same coefficient rule. If using derivatives, evaluate at zero for probabilities; the next lesson uses derivatives at one for moments.

Watch out

Wrong: P(X=2)=GX′′(0)\mathrm P(X=2)=G_X''(0), or evaluate that derivative at 11. Right: divide GX′′(0)G_X''(0) by 2!2!. Keep exact fractions when the question requests an exact probability.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account