= Probability generating function of an independent random sum
{title2=$G_S(s)=G_N(G_Y(s))$}
Let $N$ be a nonnegative integer-valued <random variable>, and let $Y_1,Y_2,\ldots$ be nonnegative integer-valued <independent and identically distributed random variables>, with common <probability generating function> $G_Y$. Require the whole sequence to be <independent> of $N$, so $N,Y_1,Y_2,\ldots$ are jointly <independent>. Set the <random sum>
$$
S=\sum_{j=1}^NY_j,
$$
with the empty sum equal to zero. Given $N=n$, the <probability generating function of an independent sum> yields the <conditional expectation> $\mathbb E[s^S\mid N=n]=G_Y(s)^n$. By the <law of total expectation>,
$$
G_S(s)=\mathbb E[G_Y(s)^N]=G_N(G_Y(s)),\qquad |s|\leq1.
$$
The composition is valid because $|G_Y(s)|\leq1$. Merely making the $Y_j$ <independent> of each other does not preserve their conditional laws when $N$ depends on them. This is the <probability generating function> version of <transform composition for an independent random sum>.
For a <Poisson distribution> count with <mean> $\lambda$, substitution into $G_N(u)=\exp(\lambda(u-1))$ gives a <compound Poisson distribution> with
$$
G_S(s)=\exp\bigl(\lambda(G_Y(s)-1)\bigr).
$$
If the jumps have finite second <moment>, conditioning also gives <mean> $\mathbb E[S]=\lambda\mathbb E[Y]$ and <variance> $\operatorname{Var}(S)=\lambda\mathbb E[Y^2]$. The extra spread comes from randomness in the count as well as randomness in the jumps.<Random: Probability, Mathematical Statistics, Stochastic Processes by Kyle Siegrist>[The Poisson Process, Compound Poisson Processes, Definition; Properties: mean, variance, and generating-function conditioning proof; Compound Poisson Distributions: count independent of the sequence]{ref}
For an original example, choose $N\sim\operatorname{Poisson}(2)$ and jumps taking values one and two with equal <probability>. Keep the <independence> assumptions above. Then
$$
G_Y(s)=\frac{s+s^2}{2},\qquad G_S(s)=\exp\left(2\left[\frac{s+s^2}{2}-1\right]\right)=\exp(s+s^2-2).
$$
Here $\mathbb E[Y]=3/2$, $\operatorname{Var}(Y)=1/4$, and $\mathbb E[Y^2]=5/2$. The <law of total expectation> and <law of total variance> give
$$
\mathbb E[S]=2\cdot\frac32=3,\qquad \operatorname{Var}(S)=2\cdot\frac14+2\left(\frac32\right)^2=5.
$$
Thus the aggregate is not itself a <Poisson distribution>, whose <mean> and <variance> would coincide.
To recover the <probability mass function> $p_n=\mathbb P(S=n)$ without repeated <differentiation>, use $G_S'(s)=(1+2s)G_S(s)$ and compare <coefficients>:
$$
p_0=e^{-2},\qquad np_n=p_{n-1}+2p_{n-2}\quad(n\geq1),\qquad p_n=0\quad(n<0).
$$
For example, $(p_0,p_1,p_2,p_3)=e^{-2}(1,1,3/2,7/6)$. As an independent check, expanding $e^{s+s^2-2}=e^{-2}e^se^{s^2}$ gives
$$
p_n=e^{-2}\sum_{b=0}^{\lfloor n/2\rfloor}\frac{1}{(n-2b)!\,b!}.
$$
\Image[/probability-generating-function-compound-random-count.png]
{title=A random number of one-or-two jumps gives a compound Poisson count}
{description=The upper diagram separates the <Poisson distribution> count, the <independent and identically distributed> jumps, and their <random sum>. Below are calculated <coefficients> of $\exp(s+s^2-2)$ for $0\leq n\leq20$, with the omitted <tail probability> reported explicitly. They are exact model probabilities evaluated numerically, not observed data; the displayed masses have not been renormalized.}
The plotted <probability masses> stop at 20, although the <support of a probability distribution> is unbounded. The omitted <tail probability> is
$$
\mathbb P(S>20)=1-e^{-2}\sum_{n=0}^{20}\sum_{b=0}^{\lfloor n/2\rfloor}\frac{1}{(n-2b)!\,b!}\approx1.95613\times10^{-7}.
$$
This model has bounded jumps and an unbounded count. Its entire <probability generating function> does give a finite <moment-generating function> at every real argument, but the general <random sum> composition only guarantees the stated $|s|\leq1$ domain.
Back to article page