The question:
$X_1$, $X_2$, etc. are independent and identically distributed non-negative integer valued random variables. $N$ is a non-negative integer valued random variable which is independent of $X_1$, $X_2$ etc.., and $Y$ = $X_1 + X_2 + X_3 + … + X_N$ . (We take $Y = 0$ if $N = 0$).
Prove that $\mathbb{E}[Y] = \mathbb{E}[X_1]\mathbb{E}[N]$.
My attempt:
I know that the probability generating $G_Y(s)$ of $Y$ is equal to $G_N(G_X(s))$... but I'm not sure how that's helpful here.
My intuition leads me in this direction:
$\mathbb{E}[Y] = \sum\limits_{n=0}^{\infty} \mathbb{E}[Y|N=n]\mathbb{P}(N=n)$
$= \sum\limits_{n=0}^{\infty} \mathbb{E}[nX_1|N = n]\mathbb{P}(N=n)$
$= \sum\limits_{n=0}^{\infty} n \mathbb{E}[X_1|N = n]\mathbb{P}(N=n)$ (is this step valid??)
But I don't know where to go from here.