An Item is selected randomly from a collection labeled 1,2,...n Denote its label by X. Now select an integer Y uniformly at random from{1,...,X} Find
A) E(Y)
above is the question and I would like to know how to solve this problem.
First of all what I did was E(Y) = E[E(Y|X)]
how do I figure out the E(Y|X)?
I looked at the solution and it says E[E(Y|X)] = E(1+X /2)= 1/2 +1/2(1+n /2) = n+3 /4
can someone explain the solution of the question please? Thank you
The mean of uniform distribution on $\{1,2,...,n\}$ is $\sum\limits_{k=1}^{n}\frac k n=\frac {n(n+1)} {2n}=\frac {1+n} 2$. Hence, the mean of $Y$ given $X$ is $\frac {1+X} 2$. Now take the mean of this: $EY=E(\frac {1 +X} 2)$. Can you complete this?