# Expectation of a compound random variable

Let $X_{1},X_{2},...,X_{n},...$ be independent random variables following the uniform distribution on $[0,1]$. Let $N$ follow the negative binomial distribution with the probability function $$P(N=k)=\frac{(n+2)(n+1)}{2}p^3(1-p)^k$$ Let $Y_{N}=\text{min}\lbrace X_{1},...,X_{N}\rbrace$, $Z_{N}=\text{max}\lbrace X_{1},...,X_{N}\rbrace$. If $N=0$, $Y_{N}=Z_{N}=0$. Find $\mathbb{E}(Y_{N}Z_{N})$.

Any hint?

-

Using the law of total expectation: $$\mathbb{E}\left(Y_N Z_N\right) = \sum_{k=1}^\infty \mathbb{E}\left(Y_k Z_k\right) \mathrm{P}\left(N=k\right)$$ To evaluate $\mathbb{E}(Y_k Z_k)$ recall the joint probability density function for two order statistics of continuous random variables: $$f_{Y_k,Z_k}\left(y,z\right) = k(k-1) (z-y)^{k-2} [ 1 > z > y > 0 ]$$ where $(Y_k,Z_k)$ are the $(X_{k:1}, X_{k:k})$ - the smallest and the largest statistics in the uniform sample of size $k$. Thus $$\mathbb{E}\left(Y_k Z_k\right) = k(k-1)\int_0^1 \int_0^z y z (z-y)^{k-2} \mathrm{d}y \mathrm{d} z = \frac{1}{k+2}$$ Therefore $$\mathrm{E}\left(Y_N Z_N\right) = \sum_{k=1}^\infty \frac{1}{k+2} \frac{(k+2)(k+1)}{2} p^3 (1-p)^k = \frac{p^3}{2} \sum_{k=1}^\infty (k+1) (1-p)^k = \frac{1}{2} p (1-p^2)$$
Thank you! I have one more question. I forgot to mention that $N$ was independent of all $X_{i}$. My understanding is that we used that to write $\mathbb{E}(Y_{N}Z_{N}|N=k)=\mathbb{E}(Y_{k}Z_{k})$, didn't we? – czachur Feb 28 '13 at 9:14