# Expected Value of a Random Variable (maybe a mixture)

I want to calculate the expected value of S that is the total damage. S is the sum of single damages. $N$ is the total number of damages and it is also a RV that is distributed as a Poisson. This seems like a Compound Poisson process to me except for the fact that I can't handle the case when $N=0$. I don't know ho to formally incorporate the case when $N=0$ in my calculation. Do you see that from the third line on I only use the part where $S=\sum_{i=1}^{N}X_i$? The part where the double summation starts results in the first case that has the internal summation that goes from 1 to 0. This doesn't seem right to me Could you please help me to formally fix it? thanks You need to calculate $E_S(S|N)$ for the case where $S=0$. If you have a probability distribution for each damage $X_i$, you can work out the probability that $X_i = 0$ for each $i$. Call that probability $p_i$. Then $E_S(S=0|N) = \Pi_{i=1}^N p_i$. Finally, take the expectation value over the value of $N$ to get the second line: \begin{equation} E(S=0) = E_N[\Pi_{i=1}^N p_i] \end{equation}