Expected value of a chain of many probability distributions

48 Views Asked by At

Let $X$ be a uniform random number in $0..n$. Its expected value is $n/2$. Let $Y$ be another uniform random number in $0..X$. Finally, let $Z$ obey a binomial distribution with $Y$ trials and success probability $p$. So we have a chain of three (or in general even more) distributions, where one distribution takes a parameter that is another random variable.

We are interested in the expected value of the "last" distribution in the chain of distributions. This answer provides a solution for the special case of two distributions. I would generalize it as follows:

$$\Sigma_{k=0}^n\Sigma_{\ell=0}^k E[Z | Y = \ell]P(Y=\ell | X = k)P(X=k)\\ =p\Sigma_{k=0}^n\Sigma_{\ell=0}^k \ell P(Y=\ell | X = k)P(X=k)\\ =p\Sigma_{k=0}^n P(X=k) \Sigma_{\ell=0}^k \ell P(Y=\ell | X = k)\\ =p\Sigma_{k=0}^n P(X=k) k/2\\ =p/2\cdot \Sigma_{k=0}^n k P(X=k)\\ = p/2 \cdot n/2 = pn/4$$

Is this correct? I already asked that in the original question, but was advised to better open a new one, so here it is.

1

There are 1 best solutions below

0
On BEST ANSWER

I think it is correct but an application of general rule: $$\mathbb{E}U=\mathbb{E}\left[\mathbb{E}\left[U\mid V\right]\right]$$ makes things more easy:

  • $\mathbb{E}\left[Z\mid Y\right]=Yp$ so that $\mathbb{E}Z=\mathbb{E}Yp=p\mathbb{E}Y$.

  • $\mathbb{E}\left[Y\mid X\right]=\frac{1}{2}X$ so that $\mathbb{E}Y=\mathbb{E}\frac{1}{2}X=\frac{1}{2}\mathbb{E}X=\frac{1}{4}n$

This together tells us that $\mathbb{E}Z=\frac{1}{4}np$.


If I would not have the rule at my disposal yet then I would go for:

$\begin{aligned}\sum_{k=0}^{n}\sum_{l=0}^{k}\mathbb{E}\left[Z\mid Y=l,X=k\right]P\left(Y=l\mid X=k\right)P\left(X=k\right)\\ =\sum_{k=0}^{n}\sum_{l=0}^{k}lpP\left(Y=l\mid X=k\right)P\left(X=k\right)\\ =p\sum_{k=0}^{n}\sum_{l=0}^{k}lP\left(Y=l\mid X=k\right)P\left(X=k\right)\\ =p\sum_{k=0}^{n}\mathbb{E}\left[Y\mid X=k\right]P\left(X=k\right)\\ =p\frac{1}{2}\sum_{k=0}^{n}kP\left(X=k\right)\\ =p\frac{1}{2}\mathbb{E}X\\ =\frac{1}{4}np \end{aligned} $