Poisson Distribution – Finding MGF, Expectation, and Variance of Random Sum

expected valuemoment-generating-functionspoisson distributionvariance

Question

Consider the random sum
$$Y = I(N>0)\sum_{n=1}^{N}X_n$$

where $\left(X_n \right)_{n\geq 1}$ is a sequence of independently and identically distributed random variables that is independent of the random variable $N$ which has a Poisson distribution with parameter $\lambda$, and $I(N> 0)$ is the indicator function for the event $[N > 0]$. Assume each $X_n$ has MGF $M_X(t)$.

  1. By using a suitable conditioning argument or otherwise, find $M_Y (t)$, the MGF of Y.

  2. By finding appropriate derivatives of $M_Y(t)$, calculate the mean and variance of Y.

HINT: Recall that the chain rule states that if $u(x)=g(w(x))$, then $u'(x) = w'(x)g'(w(x))$.

  1. Check your answers to Question 2 by calculating $\mathbb{E}[Y]$ and $Var[Y]$ using a simpler and more direct method.

My attempt

1.
$$\begin{aligned}
M_Y(t)& = \mathbb{E}(e^{tY})\\
& = \mathbb{E}\left[\mathbb{E} \left( e^{t \sum_{n=1}^N X_n} \vert N = j \right)\right]\\
& = \mathbb{E}\left[\mathbb{E}\left( e^{t \sum_{n=1}^j X_n} \right)\right]\\
& = \mathbb{E} \left[ (M_X(t))^j \right]
\end{aligned}$$

Now I am stuck. Is my attempt for Question 1 is correct? If it is, how should I continue with Questions 2 and 3?

Any intuitive explanations will be highly appreciated!

Best Answer

It's not necessary to write $N = j$ explicitly. The law of total expectation is $$M_Y(t) = \mathbb{E}[e^{tY}] = \mathbb{E}[\mathbb{E}[e^{tY} \mid N]].$$ The innermost expectation is conditioned on $N$, so is a function of the random variable $N$. We note $$\mathbb{E}[e^{tY} \mid N] = \mathbb{E}[e^{t\sum_{i=1}^N X_i} \mid N] = \mathbb{E}\left[\prod_{i=1}^N e^{tX_i} \,\Biggl|\, N \Biggr. \right] \overset{\text{iid}}{=} \prod_{i=1}^N M_X(t) = M_X(t)^N.$$ (It is worth mentioning at this step that if $N = 0$, then $M_X(t)^N = 1$ which is consistent with the definition of $Y$, so there is no further need for the indicator function.) From here, we now must compute $$\mathbb{E}[M_X(t)^N],$$ where the expectation is taken with respect to the random variable $N$. To this end, we note that if $$N \sim \operatorname{Poisson}(\lambda),$$ then $$\operatorname{E}[z^N] = \sum_{n=0}^\infty z^n \Pr[N = n] = \sum_{n=0}^\infty z^n e^{-\lambda} \frac{\lambda^n}{n!}.$$ I leave the remainder of this calculation as an exercise.

Then, all that remains is to let $z = M_X(t)$ after evaluating the above sum. The result furnishes the desired MGF of $Y$.

The rest of the question should be straightforward once you have calculated the MGF of $Y$, since for each positive integer $k$,

$$\mathbb{E}[Y^k] = \frac{d^k}{dt^k}\left[M_Y(t)\right]_{t=0};$$ that is to say, the $k^{\rm th}$ raw moment of $Y$ equals the $k^{\rm th}$ derivative of the MGF of $Y$ evaluated at $0$. The choice $k = 1$ yields $\mathbb{E}[Y]$ and the variance is calculated using the second moment minus the square of the first moment; i.e., $\operatorname{Var}[Y] = \mathbb{E}[Y^2] - \mathbb{E}[Y]^2$.

As for the "simpler and more direct" method described in part 3, how would you do this? My suggestion is to use the linearity of expectation:

$$\mathbb{E}[Y] = \mathbb{E}[\mathbb{E}[X_1 + \cdots + X_N \mid N]] = \ldots,$$

and the law of total variance:

$$\operatorname{Var}[Y] = \operatorname{Var}[\mathbb{E}[Y \mid N]] + \mathbb{E}[\operatorname{Var}[Y \mid N]].$$