I have this random sum, $Z=\sum_{k=1}^{N}Y_{k}$ where $(Y_1,Y_2,\dots,Y_k,\dots)$ are independent and exponentially distributed random variables (mean is $\mu$). We've defined $N=M+1$ where $M$ is poisson distributed (intensity is $\lambda$).
I need to find the first and second moments of this random sum.
I have found the first moment, which I did by just messing with the bounds a little bit. However, I don't know the formula for finding the second moment. I could use help with that.
This is what I did:
$E[Z]=\sum_m^{\infty}E[Z|M=m]P_M(m)$
$= \sum_{m=0}^{\infty}(m+1)\mu e^{-\lambda}\frac{\lambda^m}{m!}$
I split the sums and obtained:
$E[Z]=\mu(\lambda+1)$.
I just need a boost getting started for $E[Z^2]$. Much appreciated. Thanks!