Expected Value of Random Variable Number of Random Variables?
Given: $N$ ~ $Geo(p_N$) and $X_i$ ~ $Geo(p_X)$
Where $N$ isn't dependent on $X_i$, and all $X_i$s are i.i.d
We define: $Z=\sum_{i=1}^NX_i$
- Calculate E[Z]
- Calculate var(Z)
- Find m.g.f for Z
- what kind of distribution does Z have?
For 1, I know that $E[Z]=\sum_{i=1}^NE[X_i]=N/{p_x}$
For 2, I know that $var(Z)=\sum_{i=1}^Nvar(X_i)=N(1-P_x)/{P_x^2}$
But, this is true for constant N not random variable... How can I solve this?
Solution 1:
When $N$ is a random variable, independent of the set of $X_i$ variables, and those $X_i$ are independent and identically distributed, then:
$$\begin{align}\mathsf E(Z) &= \mathsf E(\sum_{i=1}^N X_i) \\[1ex] &=\mathsf E(\sum_{i=1}^N\mathsf E(X_i\mid N)) \\[1ex] &= \mathsf E(N)~\mathsf E(X_1)\end{align}$$
Solution 2:
Hint
According to total probability formula, $$\mathbb E[Z]=\sum_{i=1}^\infty \mathbb E[Z\mid N=n]\mathbb P\{N=n\}.$$
Because $N$ is independent of the $X_i$'s, $$\mathbb E[Z\mid N=n]=\sum_{k=1}^n\mathbb E[X_i]=np_X.$$