given a two-stage random experiment with $X_{1}$ is Poisson(10) and if ${\{X_{1}=n}\}$, $X_{2}$ is $Bin(n;0.2)$ distributed. I have to calculate the mean of $X_{2}$.
How do i calculate the probabilities without knowing the $n$?
(The solution path is the following: $\mathbb{E}[X_{2}]=\mathbb{E}[\mathbb{E}[X_{2}|X_{1}]] = \mathbb{E}[0.2\cdot X_{1}]= 0.2\cdot \mathbb{E}[X_{1}]= 0.2\cdot 10 = 2$)
We condition on the outcome of $X_1$.
Since $X_2|X_1=n \sim Bin(n,0.2), $ we have $E[X_2|X_1=n]=n(0.2)$.
hence
\begin{align} E[X_2] &= \sum_{n=0}^\infty E[X_2|X_1=n]Pr(X_1=n)\\ &= \sum_{n=0}^\infty n(0.2)Pr(X_1=n)\\ &=0.2 \sum_{n=0}^\infty nPr(X_1=n), \\ &= 0.2 E[X_1] \end{align}