Find $Cov(X,Y) $ for $f(x,y)=e^{-y}$, where $0 \leq x \leq y$ and $E[Y|X]=x+1$:

981 Views Asked by At

Find $Cov(X,Y) $ for $f(x,y)=e^{-y}$, where $0 \leq x \leq y$ (and $E[Y|X]=x+1$ that I found in a later part of the problem):

I know that $Cov(X,Y)=E[XY]-E[X]E[Y]$, where I think $E[XY]=E[xE[Y|X]]=E[x(x+1)]=E[x^2+x]=\int_{x}^\infty \int_{0}^y (x^2+x)(e^{-y})dxdy$

However the integration gets very difficult and I am not sure on the bounds of integration. Is there a simpler way to find the $cov(X,Y)$?

2

There are 2 best solutions below

7
On BEST ANSWER

There is a confusion here. Let's start from the product. I will use indices to explicitly denote with respect to which PDF we are computing the expected value: \begin{eqnarray*} E_{X,Y}[XY]&=&\int\limits_0^{\infty}\int\limits_x^{\infty}xyf_{X,Y}(x,y)dydx\\ &=&\int\limits_0^{\infty}\int\limits_x^{\infty}xyf_{Y|X}(y|x)f_X(x)dydx\\ &=&\int\limits_0^{\infty}xf_X(x)\int\limits_x^{\infty}yf_{Y|X}(y|x)dydx\\ &=&\int\limits_0^{\infty}xf_X(x)E_{Y|X}[Y|X]dx\\ &=&\int\limits_0^{\infty}(x^2+x)e^{-x}dx\\ \end{eqnarray*} The last step is because $E_{Y|X}[Y|X]$ is only a function of $X$, not $Y$. Now, my calculations show that: $$E[XY]=3$$ and after finding the marginal PDFs of $X$ and $Y$ that $E[X]=1$ and $E[Y]=2$.

3
On

The marginal distribution of $X$ is $f_X(x)=\int_{x}^\infty e^{-y}dy=e^{-x}$ (exponential with mean and variance equal $1$). Then $\mathsf{E}X^2+\mathsf{E}X=\operatorname{Var}(X)+(\mathsf{E}X)^2+\mathsf{E}X=3$. Also $\mathsf{E}Y=\mathsf{E}[\mathsf{E}[Y\mid X]]=2$.