Expectation of sum of independent random variable Let, for $m\neq 1$, $X_1, X_2\ldots$ be independent random variables with $E(X_n) = m^n, n \ge 1$, let $N \sim \text{Poisson}(\lambda)$ be independent of $X_1, X_2\ldots$ and set
$$Z = X_1 + X_2 + \ldots + X_N$$
Determine $E(Z)$.
It is trickier than the i.i.d.condition.
Please show me how can I solve it.
I'm sorry that I don't know the rule here, I'll add my work back then.
There is a theorem that E[Sn] = E[N]E[x], but it does not work here, because Xi are not i.i.d. I try to do some modification based on the theorem, but it seems hard for me to work it out.

You have that:
$$\begin{align*}E[Z]&=E[X_1+\ldots+X_N]=\sum_{n=1}^{\infty}E[X_1+\ldots+X_N |N=n]P(N=n)=\\&=\sum_{n=1}^{\infty}\left(m^1+\ldots+m^n\right)e^{-\lambda}\cdot\frac{\lambda^n}{n!}=m\cdot e^{-\lambda}\sum_{n=1}^{\infty}\frac{\lambda^n}{n!}\sum_{k=0}^{n-1}m^k\end{align*}$$ where from the geometric series $$\sum_{k=0}^{n-1}m^k=\frac{1-m^n}{1-m}$$ So $$\begin{align*}E[Z]&=m\cdot e^{-\lambda}\sum_{n=1}^{\infty}\frac{\lambda^n}{n!}\sum_{k=0}^{n-1}m^k=me^{-\lambda}\sum_{n=1}^{\infty}\frac{\lambda^n}{n!}\frac{1-m^n}{1-m}=\frac{me^{-\lambda}}{1-m}\left(\sum_{n=1}^{\infty}\frac{\lambda^n}{n!}-\sum_{n=1}^{\infty}\frac{(m\lambda)^n}{n!}\right)=\\&=\frac{me^{-\lambda}}{1-m}\cdot (e^{\lambda}-e^{m\lambda})=\frac{m}{1-m}\cdot(1-e^{(m-1)\lambda})=\frac{m}{m-1}\left(e^{\lambda(m-1)}-1\right)\end{align*}$$
