Calculate covariant of X and Y whose density function is given

872 Views Asked by At

Show that $\operatorname{cov}(X,Y)=1$ in the case when $X$ and $Y$ have joint density function $$ f(x,y)= \begin{cases} \frac{1}{y}e^{-y-x/y}&\text{if }x,y>0,\\ 0&\text{otherwise.} \end{cases} $$

So I have to show that $\mathbb E([X-\mathbb E(X)][Y-\mathbb E(Y)])=1$.

I tried to calculate the expectations of $X$ and $Y$:

$\begin{aligned}\mathbb E(Y)=\int_{-\infty}^\infty yf_Y(y)\,\mathrm dy\end{aligned}$.

First we need the marginal density function of $f_Y$:

$\begin{aligned}f_Y(y)=\int_0^\infty\frac{1}{y}e^{-y-x/y}\,\mathrm dx=\left[-\frac{1}{y}e^{-y-x/y}\right]_0^\infty=\frac{1}{y}e^{-y}\end{aligned}$, for $y>0$.

So we get $\mathbb E(Y)=\int_0^\infty e^{-y}\,\mathrm dy=1$

However, I don't know how how to this for $X$, because I'd get:

$\begin{aligned}f_X(x)=\int_0^\infty\frac{1}{y}e^{-y-x/y}\,\mathrm dy\end{aligned}$.

How can I evaluate this integral? Also, assume I had gotten something for $\mathbb E(X)$, say $\alpha$, how should I have proceeded from there on?

$\operatorname{cov}(X,Y)=\mathbb E([X-\alpha][Y-1])=\mathbb E(XY-X-\alpha Y+\alpha)$.

How could this yield to 1?

1

There are 1 best solutions below

1
On BEST ANSWER

As far as $E[X]$:

$$E[X]=\int_0^{\infty}xf_X(x)\ dx=\int_0^{\infty}x\int_0^{\infty}\frac1y e^{-y-\frac yx}\ dy \ dx=$$ $$=\int_0^{\infty}\frac1ye^{-y}\int_0^{\infty}xe^{-\frac xy}\ dx\ dy.$$

Integrating by part in the case of the internal integral we get

$$\int_0^{\infty}xe^{-\frac xy} \ dx=y^2.$$

So, integrating by part again

$$E[X]=\int_0^{\infty}ye^{-y}\ dy=1.$$