Find expected value of join probability density function

244 Views Asked by At

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.

2

There are 2 best solutions below

4
On

but how to compute the upper part?

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.

0
On

Since $$E[Y|X=x]=\int y f_{Y|X=x}(Y|X=x) dy$$ and $$f_{Y|X=x}(Y|X=x)=\frac{f_{x,y}(x,y)}{f_{x}(x)},$$ we'll first compute $f_{x}(x)$, namely $$f_{x}(x)=\int_{1}^{\infty}2x^{2}e^{-xy}dy=2x,$$

then $$f_{Y|X=x}(x)=\frac{2x^{2}e^{-xy}}{2x}=xe^{-xy}.$$

Now we have to basis to find $E[Y|X=x]$, so now it follows that $$E[Y|X=x]=\int_{-\infty}^{\infty} xye^{-xy} dy=\int_{0}^{\infty}xe^{-xy}dy$$ and after integrating by parts with $u=y$ and $dV=xe^{-xy}$, we find $$E[Y|X=x]=\frac{1}{x},$$ with $0<x<1$.

Now for $E[Y]$, the following $$E[Y]=\int \int f_{X,Y}(x,y) dxdy = \int f_{x}(x) \int y f_{y}(y) dy dx ,$$ both parts of the integral are already computed above. $f_{x}(x)=2x$ and $\int yf_{y}(y) dy=\frac{1}{x}$, thus $$E[Y]=\int_{0}^{1}2x\frac{1}{x}dx=2.$$