Let be a nonnegative integer-valued random variable, and let be nonnegative integer-valued independent and identically distributed random variables, with common probability generating function . Require the whole sequence to be independent of , so are jointly independent. Set the random sum
with the empty sum equal to zero. Given , the probability generating function of an independent sum yields the conditional expectation . By the law of total expectation,
The composition is valid because . Merely making the independent of each other does not preserve their conditional laws when 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 , substitution into gives a compound Poisson distribution with
If the jumps have finite second moment, conditioning also gives mean and variance . The extra spread comes from randomness in the count as well as randomness in the jumps.[ref]
For an original example, choose and jumps taking values one and two with equal probability. Keep the independence assumptions above. Then
Here , , and . The law of total expectation and law of total variance give
Thus the aggregate is not itself a Poisson distribution, whose mean and variance would coincide.
To recover the probability mass function without repeated differentiation, use and compare coefficients:
For example, . As an independent check, expanding gives
Figure 1.
A random number of one-or-two jumps gives a compound Poisson count
. The upper diagram separates the Poisson distribution count, the independent and identically distributed jumps, and their random sum. Below are calculated coefficients of for , with the omitted tail probability reported explicitly. They are exact model probabilities evaluated numerically, not observed data; the displayed masses have not been renormalized. Details.
The plotted probability masses stop at 20, although the support of a probability distribution is unbounded. The omitted tail probability is
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 domain.