The continuous random variables $X$ and $Y$ have joint density function $f_{xy} = 1$ for $0 < x < 1$ and $2x < y < 2$, and zero otherwise.
I am stuck on the above question, with parts a and b below:
a) Find the $cov(x,y)$.
Work:
$cov(x,y) = E(XY) - E(X)E(Y)$
$= \int_0^1\int_{2x}^2 xydydx - \int_0^1\int_{2x}^2 xdydx\int_0^1\int_{2x}^2 ydydx$ = $\frac{-1}{18}$
However I am given the answer $\frac{1}{18}$. Did I make a mistake in my computation or is the answer incorrect?
b) Find $E(X|Y = y)$.
Work:
$E(X|Y=y) = \int_{-\infty}^{\infty}xf_{x|y}(x|y)dx$
This is where I am puzzled. I know that $f_{x|y}(x|y) = \frac{f_{xy}(xy)}{f_yy}$, and $f_yy= \int_{-\infty}^{\infty}f_{x,y}(x,y)dx$. That means $f_yy = 1$ and therefore $f_{x|y}(x|y) = 1$. However I am given the answer $E(X|Y=y) = \frac{y}4$. Again, did I make a computational mistake or am I not getting something?
Thanks.