Find $E(X\vert Y=y)$ given $f_{X,Y}(x,y)=1$ for $0<x<1$ and $2x<y<2$

13 Views Asked by At

$X$ and $Y$ are continuous random variables. Find $E(X\vert Y=y)$ given $f_{X,Y}(x,y)=1$ for $0<x<1$ and $2x<y<2$ and $0$ otherwise.

I have computed $f_X(x)=\int_{2x}^{2} 1dy=2-2x$

and $f_Y(y)=\int_0^{y/2} 1dx=\frac{y}{2}$

then $E(X\vert Y=y)=\int_0^1 xf_{X\vert Y}(x\vert y)dx$

$$\int_0^1 x\frac{f_{X,Y}(x,y)}{f_Y(y)}dx$$

$$=\int_0^1 x \frac{1}{\frac{y}{2}} dx$$ $$=\int_0^1 \frac{2x}{y}dx$$ $$=\frac{1}{y}\int_0^1 2x dx$$ $$=\frac{1}{y}(x^2)\vert^1_0$$ $$=\frac{1}{y}$$

Answer is supposed to be $\frac{y}{4}$