Find the expectation and variance of a sum of N random variables where N is itself a random variable

I want to find the expectation and variance of a sum of N random variables. I know that by the central limit theorem, given that N is known, the expectation should be $N\mu$ and the variance should be $N\sigma^2$ where $\mu$ and $\sigma^2$are the mean and variance of the original distribution. But how should I extend this to the case where N is a random variable from another distribution, say with $\mu_2$ and $\sigma_2^2$?

• Not only does $N$ have to be a non-negative integer, but you are probably assuming everything is independent – Henry Sep 25 '17 at 17:20
• @Henry formally speaking, you have to assume all individual variables $X_i$ are independent and $N$ is a stopping time in the $\Sigma$-algebra generated by the $\{X_i\}$ – gt6989b Sep 25 '17 at 17:30

I think you first may want to assume $N$ comes from a discrete non-negative distribution (otherwise, it's not clear how to add up -1.5 random variables). Then use Wald's Identity for expected value and there are related results in similar style for the variances.
• What is the notation here mentioned in the Wald Identity article?: "$E[X_n1_{N ≥ n}] = E[X_n] P(N ≥ n)$ for every natural number n" Specifically what is the "1" ? Is it the step function? – AAC Sep 25 '17 at 17:40
• @AAC not sure what your notation means. I think given $X_1, \ldots$ iid and $N$ which is a stopping time in the $\Sigma$-algebra generated by the $X_i$'s (assuming $N$ is independent of them will do just fine), you have $$\mathbb{E} \left[ \sum_{k=1}^N X_k \right] = \mathbb{E}\left[X_1\right] \cdot \mathbb{E}[N]$$ – gt6989b Sep 25 '17 at 17:43
• @AAC I see -- $\mathbb{1}_A$ is the indicator function that an event $A$ happens, i.e. it is 1 if $A$ happens and 0 otherwise. – gt6989b Sep 25 '17 at 17:44
Assuming $N$ is also independent of the ${X_i}$ (Actually, the weaker assumption that $N$ is a stopping time is sufficient), then the variance is given by
$$\sigma^2 = \sigma_N^2\mu_X^2 + \mu_N\sigma_X^2$$