From a Probability Mass Function to a PGF
For a nonnegative integer-valued random variable, a probability generating function packages all its point probabilities into a single function. Standard distributions often have compact PGFs, but those formulas depend on the support and parameterization being used. In particular, geometric variables are defined with two common support conventions, and the resulting formulas differ by a factor of \(s\).
Let \(X\) be a nonnegative integer-valued random variable on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), with probability mass function \(p_k=\mathbb{P}(X=k)\), \(k=0,1,2,\ldots\). For \(0\le s\le1\), its probability generating function (PGF) is
At \(s=0\), use the convention \(0^0=1\) in this series, so \(G_X(0)=p_0\). The series converges for every \(s\) in \([0,1]\), since \(0\le p_k s^k\le p_k\) and \(\sum_{k=0}^{\infty}p_k=1\). A basic check is therefore
Why the check works. At \(s=1\), every term \(s^k\) equals one, including the \(k=0\) term. Thus evaluating a proposed PGF at one must recover the total probability. This check detects many errors, although passing it alone does not prove that a formula is correct.
Four Standard PGFs
- Bernoulli with success probability \(p\in[0,1]\): \(G_X(s)=1-p+ps\).
- Binomial with parameters \(n\in\{0,1,2,\ldots\}\) and \(p\in[0,1]\): \(G_X(s)=(1-p+ps)^n\).
- Geometric counting failures before the first success, with success probability \(p\in(0,1]\): \(G_X(s)=\dfrac{p}{1-(1-p)s}\).
- Poisson with parameter \(\lambda\ge0\): \(G_X(s)=\exp(\lambda(s-1))\).
Proof. For Bernoulli \(X\), the only possible values are zero and one, with probabilities \(1-p\) and \(p\). Substitution into the defining sum gives \(G_X(s)=(1-p)s^0+ps^1=1-p+ps\). This also covers \(p=0\) and \(p=1\), which give the degenerate variables zero and one, respectively.
For a binomial variable, the mass function is \(\mathbb{P}(X=k)=\binom{n}{k}p^k(1-p)^{n-k}\) for \(k=0,\ldots,n\). Hence \(G_X(s)=\sum_{k=0}^{n}\binom{n}{k}(ps)^k(1-p)^{n-k}=(1-p+ps)^n\), by the finite binomial expansion. If \(n=0\), the sum has just its \(k=0\) term and the formula is \(1\); if \(p=0\) or \(p=1\), the same expansion gives the corresponding degenerate distribution.
For the stated geometric convention, \(\mathbb{P}(X=k)=p(1-p)^k\) for \(k=0,1,\ldots\). Put \(q=1-p\). Since \(p>0\), \(0\le q<1\); for \(0\le s\le1\), \(0\le qs<1\). The finite geometric sum is \(\sum_{k=0}^{m}(qs)^k=(1-(qs)^{m+1})/(1-qs)\). As \(m\) tends to infinity, \((qs)^{m+1}\) tends to zero, so \(G_X(s)=\sum_{k=0}^{\infty}p(qs)^k=p/(1-qs)=p/(1-(1-p)s)\). This includes \(p=1\), when \(q=0\) and \(X=0\) with probability one.
For a Poisson variable, \(\mathbb{P}(X=k)=e^{-\lambda}\lambda^k/k!\) for \(k=0,1,\ldots\). Substitution gives \(G_X(s)=e^{-\lambda}\sum_{k=0}^{\infty}(\lambda s)^k/k!\). By the exponential power series, the sum is \(e^{\lambda s}\), so \(G_X(s)=e^{-\lambda}e^{\lambda s}=e^{\lambda(s-1)}\). When \(\lambda=0\), the distribution is concentrated at zero and this formula gives \(1\), as required. \(\square\)
Each formula can now be interpreted as a compact version of its mass function. The finite-support cases produce polynomials. The geometric and Poisson cases produce infinite series, summed using the geometric-series and exponential-series identities. These derivations use the actual probability masses, not an assumption that PGFs of different distributions combine in a particular way.
Worked Example: Bernoulli PGF and Endpoint Checks
Let \(X\) be Bernoulli with \(p=\tfrac25\). Its mass function has \(\mathbb{P}(X=0)=1-p=\tfrac35\) and \(\mathbb{P}(X=1)=p=\tfrac25\). Directly from the definition,
At \(s=1\), the formula gives \(\tfrac35+\tfrac25=1\). At \(s=\tfrac12\), it gives \(\tfrac35+\tfrac25\cdot\tfrac12=\tfrac35+\tfrac15=\tfrac45\). Directly from the two possible outcomes, \(\mathbb{E}[(\tfrac12)^X]=\tfrac35\cdot1+\tfrac25\cdot\tfrac12=\tfrac45\), confirming the evaluation.
Worked Example: A Binomial PGF from Every Mass
Let \(X\) have a binomial distribution with \(n=4\) and \(p=\tfrac13\). The failure probability is \(1-p=\tfrac23\). The five masses, in order, are \(\mathbb{P}(X=0)=\binom40(\tfrac13)^0(\tfrac23)^4=\tfrac{16}{81}\), \(\mathbb{P}(X=1)=\binom41(\tfrac13)(\tfrac23)^3=\tfrac{32}{81}\), \(\mathbb{P}(X=2)=\binom42(\tfrac13)^2(\tfrac23)^2=\tfrac{24}{81}\), \(\mathbb{P}(X=3)=\binom43(\tfrac13)^3(\tfrac23)=\tfrac{8}{81}\), and \(\mathbb{P}(X=4)=\binom44(\tfrac13)^4=\tfrac{1}{81}\).
The masses sum to \((16+32+24+8+1)/81=81/81=1\). Therefore the PGF from the mass function is
The compact formula gives \((\tfrac23+\tfrac13s)^4\). Expanding it gives exactly the polynomial above. As a check at one, the mass-function expression gives \(81/81=1\), while the compact expression gives \((\tfrac23+\tfrac13)^4=1^4=1\).
Worked Example: Geometric Failures Before Success
Suppose each trial succeeds with probability \(p=\tfrac13\), independently, and let \(X\) count the failures before the first success. Thus \(X\) has support \(0,1,2,\ldots\), and its mass at \(k\) is \(\tfrac13(\tfrac23)^k\). The first masses are \(\tfrac13,\tfrac29,\tfrac4{27},\tfrac8{81},\ldots\), so the PGF series begins
The equality follows by summing a geometric series with ratio \(\tfrac23s\), whose magnitude is at most \(\tfrac23<1\) on \(0\le s\le1\). At \(s=\tfrac12\), the closed form is \((\tfrac13)/(1-\tfrac13)=\tfrac12\). The series gives \(\tfrac13+\tfrac19+\tfrac1{27}+\tfrac1{81}+\cdots\), which is a geometric series with first term \(\tfrac13\) and ratio \(\tfrac13\), hence has sum \((\tfrac13)/(1-\tfrac13)=\tfrac12\). At \(s=1\), the PGF is \((\tfrac13)/(1-\tfrac23)=1\).
Worked Example: Poisson PGF and Its First Coefficients
Let \(X\) have a Poisson distribution with \(\lambda=2\). Its mass at \(k\) is \(e^{-2}2^k/k!\), so the first four terms of the defining series are
The coefficients inside the parentheses are \(1\), \(2\), \(4/2=2\), and \(8/6=4/3\), matching the Poisson masses after multiplication by \(e^{-2}\). At \(s=0\), the formula gives \(e^{-2}\), which equals \(\mathbb{P}(X=0)=e^{-2}2^0/0!=e^{-2}\). At \(s=1\), it gives \(e^0=1\), as required by total probability.
Reading the Formulas Without Changing the Convention
The four derivations share the same procedure: write the support and mass function, substitute into \(\sum_k\mathbb{P}(X=k)s^k\), and then simplify the resulting sum. The support matters because it determines the powers of \(s\). For a Bernoulli or binomial variable, only finitely many terms occur. For a geometric or Poisson variable, infinitely many terms occur, so a convergent series identity is needed.
The geometric parameterization deserves particular care. This tutorial defines \(X\) as the number of failures before the first success, so the first possible value is zero and \(\mathbb{P}(X=0)=p\). If instead \(Y\) counts the trial on which the first success occurs, then \(Y\) takes values \(1,2,\ldots\) and \(\mathbb{P}(Y=k)=p(1-p)^{k-1}\). Substitution gives \(G_Y(s)=\sum_{k=1}^{\infty}p(1-p)^{k-1}s^k=ps/[1-(1-p)s]\). The extra factor \(s\) records the shift in support.
Common mistake. For failures before the first success, writing \(ps/[1-(1-p)s]\) is incorrect: it assigns zero probability to \(X=0\), even though \(\mathbb{P}(X=0)=p\). For example, with \(p=\tfrac13\), that incorrect expression evaluates at zero to \(0\), while the mass function gives \(G_X(0)=\mathbb{P}(X=0)=\tfrac13\). The correct expression is \((\tfrac13)/(1-\tfrac23s)\), which evaluates at zero to \(\tfrac13\) and at one to \(1\). Always check both the support’s first value and \(G_X(1)=1\).
PGFs are useful because they preserve the probability-mass information in a form that can be manipulated algebraically. At this stage, the essential skill is deriving the correct expression and checking its normalization and support convention. A formula that has the right appearance but comes from a shifted or misread mass function will encode a different random variable.
Check Your Understanding
For each question, state the support convention before writing a PGF, and check the result at \(s=1\).
- Derive the PGF of a Bernoulli variable with success probability \(p\), and evaluate it at \(s=0\).
- For \(X\sim\operatorname{Binomial}(3,\tfrac12)\), write its four masses and form the PGF directly from them.
- A geometric variable counts failures before the first success, with success probability \(p\). Why must its PGF at zero equal \(p\)?
- Write the PGF for the geometric variable that counts the trial of the first success. Explain why it differs from the failures-counting formula.
- Starting from the Poisson mass function with parameter \(\lambda\), show how the exponential power series gives its PGF.