Let $Y$ have exponential distribution with mean $\frac{1}{2}$. Let $X$ be such that, conditional on $Y=y, X$ has exponential distirbution with mean $y$.
I can see that this applies: $$E(X)=E[E(X|Y)]=E(Y)=\mu\Rightarrow \frac{1}{2}$$
How does $E[E(X|Y)]=E(Y)$ in this case?