# If $N$ is an integral random variable, can $S_N$ be expressed in terms of the $S_n$ and $P(N=n)$?

Suppose $X_1,X_2,...$ is an infinite sequence of i.i.d random variables and let $N$ be a positive integer valued r.v independent from $\{ X_i \}$. Let $S_n = \sum_{i=1}^n X_i$ and $S_N = X_1 + ... + X_N$ with convention that $S_N = 0$ if $N = 0$. if $\mathbb{E} \{ N \} < \infty$ and $\mathbb{E} \{ | X_j| \} < \infty$, can we conclude that

$$\mathbb{E} \{ S_N \} = \sum_{n=0}^{\infty} \mathbb{E} \{S_n \} P(N = n )$$

??

• I don't see any difference between $S_n$ and $S_N$. Apr 6 '15 at 18:49
• @GFauxPas $n$ is a simply an integer, $N$ is a random variable. Apr 8 '15 at 13:21

1. Note that $$S_N = \sum_{j \in \mathbb{N}} S_j 1_{\{N=j\}}.$$ Taking expectations on both sides yields $$\mathbb{E}(S_N) = \mathbb{E} \left( \sum_{j \in \mathbb{N}} S_j 1_{\{N=j\}} \right).$$
2. Conclude from the monotone convergence theorem and the assumed independence that $$\mathbb{E} \left(\sum_{j \in \mathbb{N}} |S_j| 1_{\{N=j\}} \right) \leq \sum_{j \in \mathbb{N}} j \mathbb{E}(|X_1|) \mathbb{P})(N=j) = \mathbb{E}(|X_1|) \cdot \mathbb{E}(N)<\infty.$$
3. By step 1,2 and the dominated convergence theorem, $$\mathbb{E}(S_N) =\sum_{j \in \mathbb{N}} \mathbb{E}(S_j 1_{\{N=j\}}) = \sum_{j \in \mathbb{N}} \mathbb{E}(S_j) \mathbb{P}(N=j).$$