The Law of Iterated Expectations ($E(Y) = E[E(Y|X)]$) is much faster than finding the joint density $f(x,y)$ and performing a double integral. Always look for hierarchical structures in probability problems.
We can find the expected value of $Y$ using the Law of Iterated Expectations, which states $E(Y) = E[E(Y|X)]$. Step 1: \color{redFind the Conditional Expectation E(Y|X)
We are given that $Y|X$ follows a Uniform distribution $U(0, X)$
For a uniform distribution $U(a, b)$, the mean is $(a+b)/2$.
Thus, $E(Y|X) = \frac{0 + X}{2} = \frac{X}{2}$. Step 2: \color{redApply the Law of Iterated Expectations
$E(Y) = E[E(Y|X)] = E[\frac{X}{2}] = \frac{1}{2} E(X)$. Step 3: \color{redCalculate E(X)
Using the provided marginal density $f_X(x) = 2x$ for $0 < x < 1$
$E(X) = \int_{0}^{1} x \cdot f_X(x) dx$
$E(X) = \int_{0}^{1} x \cdot (2x) dx = \int_{0}^{1} 2x^2 dx$
$E(X) = [ \frac{2x^3}{3} ]_{0}^{1} = \frac{2}{3}$. Step 4: \color{redFind the Final Result for E(Y)
$E(Y) = \frac{1}{2} E(X) = \frac{1}{2} \cdot \frac{2}{3} = \frac{1}{3}$.
Thus, $E(Y) = 1/3$.