I'm preparing for my probability theoro exam and found the following old problem.
Let $X$ and $Y$ be continuous random variables with joint density function $$f_{X,Y}(x,y)=2x^{2}e^{-xy},$$ with $$0<x<1, y>0,$$ otherwise it's zero. Now I'm asked to compute $E(Y|X=x)$, $E(Y)$ and the covariance between $X$ and $Y$.
Now I don't know what to do with the first question, that is $E(Y|X=x)$. I thought of this:
$$f_{Y|X=x}=\frac{f_{Y,X}(y,x)}{f_{x}(x)},$$ then $f_{X}(x)=\int_{0}^{\infty}2x^{2}e^{-xy}dy=2x$, but how to compute the upper part? I suppose it should be $f_{X,Y}(x,y)=\int_{0}^{1} \int_{0}^{\infty}2x^{2}e^{-xy}dydx,$ but this ends up being equal to $1$, which makes sense because it is the integral over all posibilities.
Then for the second part, namely $E(Y)$, I found $$f_{Y}(y)=\int_{0}^{1}2x^{2}e^{-xy}dx,$$ which after a lot of intergrating by parts solves to $-\frac{1}{y}e^{-y}-\frac{2}{y^{2}}e^{-y}-\frac{2}{y^{3}}e^{-y}+\frac{2}{y^{3}}$, I can't imagine this to be right.
Any help is much appreciated.
You are already given the upper part, it is $f_{X,Y}(x,y)$. You simply need to sub that in.
Hence you get $$f_{Y|X=x}(y|X=x) = \frac{2x^2e^{-xy}}{2x} = {x \cdot e^{-xy}} $$
In order to find $E[Y] = \int_{0}^{\infty}y{\int_{0}^{1}{x\cdot f_{Y|X=x}(y|X=x) dx}dy} = \int_0^{\infty}y {\int_{0}^{1}{x^2\cdot e^{-xy}dx}dy}$, which I believe you can find (in the inner most integral try substituting $x = \frac{u}{y}$ - it should simplify things a bit more for you)
Let me know if you have any questions.