# Product of Independent Random Variables - Conditional Expectation

Let $X_1,X_2,\ldots$ be independent random variables, not necessarily iid, such as $\forall\; i\geq{1}\; X_i\geq{0}$,$\mathbb{E}(X_i)<\infty$ and $\mathbb{E}(X_i)\!=\!\mathbb{E}(X_j)$. Assume $N\in\{1,\ldots ,k\}$ and $N, X_i$ are independent $\forall\; i\geq{1}$. Calculate $\mathbb{E}(\prod_{i=1}^{N}{X_i})$

So, I asked my teacher and he said that N is a random variable.

I know that

(a) if $X_1,X_2,\ldots$ are independent random variables $=> \mathbb{E}(\prod_{i=1}^{n}{X_i})\!=\!\mathbb{E}(X_1)\ldots\mathbb{E}(X_n)$

(b) $N$ and $X_i$ are independent then $\mathbb{E}(X_i|N)\!=\!\mathbb{E}(X_i)\;\;\forall\;i\geq{1}$

(c) $\mathbb{E}(X_i)\!=\!\mathbb{E}(X_j)\;\;\forall\;i,j$

Is this all right?

$\mathbb{E}(\prod_{i=1}^{N}{X_i})\!=\!\sum_{j=1}^{k}\mathbb{E}(\prod_{i=1}^{j}{X_i}|N=j)P(N=j)$

And, $\mathbb{E}(\prod_{i=1}^{j}{X_i}|N=j)\!=\!\frac{\mathbb{E}(\prod_{i=1}^{j}{X_i},\Large{1}_{\{N=j\}})}{P(N=n)}\!=\! \frac{\mathbb{E}(X_1|N)\ldots\mathbb{E}(X_j|N)}{P(N=n)}\!=\!\frac{\mathbb{E}(X_1)\ldots\mathbb{E}(X_j)}{P(N=n)}\!=\!\frac{[\mathbb{E}(X_1)]^j}{P(N=n)}$

Then,

$\mathbb{E}(\prod_{i=1}^{N}{X_i})\!=\!\sum_{j=1}^{k}\mathbb{E}(\prod_{i=1}^{j}{X_i}|N=j)P(N=j)\!=\!\sum_{j=1}^{k}\frac{[\mathbb{E}(X_1)]^j}{P(N=n)}P(N=n)\!=\!\sum_{j=1}^{k}[\mathbb{E}(X_1)]^j$

• $N$ and the $X_i$ are independent so $\mathbb{E}\left(\prod_{i=1}^{j}X_{i}\mid N=j\right)=\mathbb{E}\prod_{i=1}^{j}X_{i}=\prod_{i=1}^{j}\mathbb{E}X_{i}$. The expectation of the product does not depend on what value is taken by $N$. – drhab Feb 25 '16 at 16:11
• So, the answer is $\mathbb{E}(\prod_{i=1}^{N}{X_i})\!=\!\sum_{j=1}^{k}\mathbb{E}(\prod_{i=1}^{j}{X_i}|N=j)P(N=j)\!=\!\sum_{j=1}^{k}\prod_{i=1}^{j}\mathbb{E}({X_i})\!=\!\sum_{j=1}^{k} \,[\mathbb{E}(X_1)]^j P(N=n)$ – Starmathjd Feb 25 '16 at 16:28

Denote $\mu=\mathbb EX_1$.
Your first steps are okay and proceeding we arrive at:$$\mathbb{E}\prod_{i=1}^{N}X_{i}=\sum_{j=1}^{k}\mathbb{E}\left(\prod_{i=1}^{j}X_{i}\mid N=j\right)P\left(N=j\right)$$$$=\sum_{j=1}^{k}\left(\mathbb{E}\prod_{i=1}^{j}X_{i}\right)P\left(N=j\right)=\sum_{j=1}^{k}\left(\prod_{i=1}^{j}\mathbb{E}X_{i}\right)P\left(N=j\right)=\sum_{j=1}^{k}\mu^{j}P\left(N=j\right)=\mathbb{E}\mu^{N}$$
The equality: $$\mathbb{E}\left(\prod_{i=1}^{j}X_{i}\mid N=j\right)=\mathbb{E}\prod_{i=1}^{j}X_{i}$$ is a consequence of the fact that the $X_{i}$ do not depend on $N$.
Actually we end up with an expression $\mathbb E\mu^N$ that depends on the distribution of $N$, as was to be expected.