# Find probability generating function(p.g.f) of a compound distribution

I have a discrete compound distribution for a random variable:

$$S_N = X_1 + X_2 +\dots + X_N,$$

where $$X_1, X_2, \dots, X_N$$ are IID count random variables, and $$N$$ is a count random variable too. According to these lecture notes (p. 43), the probability generating function (PGF) for $$S_N$$ can be obtained from the following expression:

$$G_{S_N} = G_N(G_X(s)).$$

Also, following these other lecture notes, if we have $$G_X(s)$$ then:

$$\begin{gather} P(X=n) = \dfrac{1}{n!}G^{(n)}_X(0) \end{gather}$$

So I tried to apply this to the following problem:

Problem: Suppose that $$N$$ and $$X_1,...,X_N$$ follow the distributions presented below:

\begin{align} P(N=n) &= \begin{cases} 0.4 & \text{for } n = 0, \\[6pt] 0.3 & \text{for } n = 1, \\[6pt] 0.2 & \text{for } n = 2, \\[6pt] 0.05 & \text{for } n = 3, \\[6pt] 0.05 & \text{for } n = 4, \\[6pt] 0 & \text{otherwise}, \\[6pt] \end{cases} \\[12pt] P(X_i = x) &= \begin{cases} 0.2 & \text{for } x = 4000, \\[6pt] 0.8 & \text{for } x = 6000, \\[6pt] 0 & \text{otherwise}. \\[6pt] \end{cases} \end{align} Find the distribution of $$S_N$$.

My attempt: Defining $$S_n = \sum_{i=1}^{N}X_i$$ I get: \begin{align*} &G_{S_n} = G_N(G_X(s))\\ &G_N = 0.4s^0 + 0.3s^1 + 0.2s^2 + 0.05s^3 +0.05s^4\\ &G_X = 0.2s^{4000} + 0.8s^{6000}\\ &G_{S_n} = 0.4 + 0.3( 0.2s^{4000} + 0.8s^{6000}) + 0.2(0.2s^{4000} + 0.8s^{6000})^2 + 0.05(0.2s^{4000} + 0.8s^{6000})^3 + 0.05(0.2s^{4000} + 0.8s^{6000})^4 \end{align*}

I managed to find: $$P(S_N = 0) = G_{S_N}(0) = 0.4$$

But, I don't know how to find other probabilities, for example, if I want to find $$P(S_N = 4000)$$, using the definition:

$$P(S_N = 4000) = \dfrac{1}{4000!}G^{(4000)}_{S_N}(0) = 0$$

But, doing convolution I found that $$P(S_N = 4000) = 0.06$$.

• It generally does not make sense to allow $N$ to have a non-zero probability for the event $N=0$. Is it a convolution you want to model or a mixture of a convolution and a random variable that is degenerate at $0$? Jan 2 at 0:09
• I extracted this problem from a book involving actuarial mathematics, so N=0 is the event when there's no claim of a policy. Jan 2 at 2:46
• Yes, but this would not preclude the ability to let $X_i$ take a zero value with nonzero probability Jan 2 at 5:23

If you look at your expression for $$G_{S_n}$$, you should be able to confirm that $$G_{S_n}^{(4000)}(0) = 0.06 \cdot 4000!$$. This is because only the $$s^{4000}$$ term matters when taking the 4000th derivative and plugging in $$s=0$$. The rest of the terms are either constant, so they will disappear when you take the derivative, or higher order (>4000), so they will disappear once you take the derivative and plug in $$s=0$$. If you plug this in your expression for $$P(S_N =4000)$$, your answers will match.