If I have X~Uniform(1, 8.7) and Y|X = x~Exp(x)
And we need to find E[XY], is this valid? And are there simpler ways to get the answer?
What I did was use both the probability density functions and plug x for the lambda $$ \int_1^{8.7}\int_{0}^{\infty} xy \frac{1}{8.7-1}xe^{-xy} dydx = 1 $$
.. is that right?
\begin{align} E(XY)&=E(E(XY|X))\\ &=E(XE(Y|X))\\ &=E(X \times \frac1X)\\&=1 \end{align}