1
$\begingroup$

The joint density function of $X$ and $Y$ is given by $$f(x,y)=\frac{1}{y}e^{-(y+\frac{x}{y})},\quad x>0,y>0.$$ Find $E[X]$, $E[Y]$ and $Cov\left(X,Y\right)$.

Calculating $E[Y]$ was easy for me. \begin{align} f_{Y}(y)&=\int_{0}^{\infty} \frac{1}{y}e^{-(y+\frac{x}{y})}dx\\ &=e^{-y}, \quad y>0 \end{align} Therefore $Y$ is an exponential random variable with parameter $1$ so $$E[Y]=1$$

Now, I am stuck in calculating the density function of X. I tried to calculate it from the usual integral but I couldn't. I looked at my calculus book to revise the integrals chapter but I haven't stumble accross something like it. Any help would be much appreciated.

$\endgroup$
  • 3
    $\begingroup$ You need not explicitly calculate the density function of $X$. We can also write $\displaystyle \mathbb{E}[X] = \int_{0}^{\infty} \int_{0}^{\infty} x f(x,y) \ dx \ dy$. Note that if you integrate $y$ first, then it is exactly what you were trying to do. However, in this case, you can first integrate wrt $x$ and then wrt $y$, which would be easier. $\endgroup$ – sudeep5221 May 22 at 21:51
  • $\begingroup$ Can you compute: $$E[X] = \int_{0}^{+\infty} \int_{0}^{+\infty} x \frac{1}{y} e^{- \left( y + \frac{x}{y} \right)} \ dx \ dy$$ $\endgroup$ – Ertxiem May 22 at 21:51
  • $\begingroup$ @sudeep5221 Oh thank you very much. that was the trick then! $\endgroup$ – billyandriam May 22 at 21:54
1
$\begingroup$

Thanks to @sudeep5221 for the suggestion. We do not need to explicitly calculate the density function of $X$.

\begin{align} E[X]&=\int_{0}^{\infty}\int_{0}^{\infty}xf(x,y)\ dx\ dy\\ &=\int_{0}^{\infty}e^{-y}\int_{0}^{\infty}\frac{x}{y}e^{-x/y}\ dx\ dy \end{align} It is noticeable that $\int_{0}^{\infty}\frac{x}{y}e^{-x/y}\ dx$ is the mean of an exponential random variable with parameter $1/y$, and thus equals to $y$. $$ E[X]=\int_{0}^{\infty}\int_{0}^{\infty}ye^{-y}dy=1 $$

To end, calculate $Cov(X,Y)$. $$Cov(X,Y)= E[XY]-E[X]E[Y]$$ Also \begin{align} E[XY]&=\int_{0}^{\infty}\int_{0}^{\infty}xyf(x,y)\ dx\ dy\\ &=\int_{0}^{\infty}ye^{-y}\left(\int_{0}^{\infty}\frac{x}{y}e^{-x/y}dx\right)\ dy\\ &= \int_{0}^{\infty}y^{2} e^{-y}dy \end{align} We can now integrate by parts where $U=y^2$ and $dV= e^{-y}dy$. \begin{align} E[XY]&=\int_{0}^{\infty}y^2e^{-y} dy= \left(-y^2 e^{-y}|_{0}^{\infty}\right)+\int_{0}^{\infty}2ye^{-y}dy\\ &=2E[Y]\\ &=2 \end{align} As a result, \begin{align}Cov(X,Y)&=2-(1)(1)\\ Cov(X,Y)&=1 \end{align}

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.