We consider i.i.d. random variables $(X_i)_{i\geq 1}$, with $X_i\sim \text{Exp}(\lambda),$ and further independent variable $N \sim \text{Poisson}(\mu)$. Let $Y = \sum_{i=1}^N X_i$. Determine the moment generating function $\phi_Y(t) = E(e^{tY})$.
My question I know that I can calculate the moment generating function by calculating $\int_{-\infty}^{\infty}e^{tx}f_Y(x)dx.$ However, the $N\sim \text{Poisson}(\mu),$ so I can't just say that $f_Y \sim \text{Gamma}(n, \lambda)$ (I thought this was the distribution of the sum of $N=n$ i.i.d. exponential variables)? Any thoughts on how I need to proceed?
$Ee^{tY}=\sum_{n=0}^{\infty }Ee^{t\sum_{i=1}^{n} X_i} P\{N=n\}=\sum_{n=0}^{\infty }(Ee^{tX_1})^{n} P\{N=n\}$. Can you take it from here?