I'm wondering what the expected value of $E[\sum_{i=1}^{N} X_i]$ is, where N ~ Ge(p).
My first thought was that,
$E[\sum_{i=1}^{N} X_i]$ = $E[\sum_{i=1}^{n} (X_i|N=n)\mathbb{P}(N=n)]$ = $E[\sum_{i=1}^{n} (X_i|N=n) (1-p)^{^{i-1}}p]$
however I am not sure if this is correct, and if it is, what $(X_i|N=n)$ is equal to.
The sum is $$S=\sum_{i=1}^NX_i=\sum_{i=1}^\infty X_i\mathbf 1_{N\geqslant i},$$ hence, if $N$ is independent of $(X_i)$, then $$E(S)=\sum_{i=1}^\infty E(X_i\mathbf 1_{N\geqslant i})=\sum_{i=1}^\infty E(X_i)P(N\geqslant i).$$ If furthermore $E(X_i)$ does not depend on $i$, then $$E(S)=E(X)\sum_{i=1}^\infty P(N\geqslant i)=E(X)E(N).$$