Given the joint p.d.f., are $X$ and $Y$ independent? the conditional p.d.f. of $X$ given $Y=y$

conditional probabilityconditional-expectationdensity functionindependenceprobability distributions

Let $(X,Y)$ be two random variables with joint p.d.f.
$$f_{X,Y}(x,y)=\begin{cases}\frac{1}{y}e^{-x/y}e^{-y}&\text{if }0<x<\infty\text{ and }0<y<\infty\\0&\text{otherwise}\end{cases}$$

  1. What is the marginal of $Y$?
  2. Are $X$ and $Y$ independent?
  3. What is the conditional p.d.f. of $X$ given $Y=y$?
  4. What is $\mathbb{E}[X\mid Y]$?

My Attempt

  1. The marginal of $Y$ can be found by integrating the joint p.d.f. w.r.t. $x$. So
    $$f_Y(y)=\int^\infty_0f_{X,Y}(x,y)dx=\int^\infty_0\frac{1}{y}e^{-x/y}e^{-y}dx=\left[-e^{-x/y-y}\right]^\infty_0=e^{-y}$$
  2. To know if they are independent, we must check that $f_{X,Y}(x,y)=f_X(x)f_Y(y)$. This means we need to find the marginal p.d.f. for $X$. My problem is that the integral is quite hard, and even after using an online integral calculator, I was given a gamma function that could not be computed for the bounds $[0,\infty)$. Since this is not a calculus class, I was wondering if there is some easier way to check independence that I am missing.
  3. I know the formula for the conditional p.d.f. of $X$ given $Y$:
    $$f_{X|Y}=\frac{f_{X,Y}(x,y)}{f_Y(y)}=\frac{\frac{1}{y}e^{-x/y}e^{-y}}{e^{-y}}=\frac{1}{y}e^{-x/y}$$
    My concern is that I was asked for the conditional p.d.f. of $X$ given $Y=y$. Is there a difference between the two or is it just different ways of writing it?
  4. $$\mathbb{E}[X\mid Y]=\int^\infty_0xf_{X|Y}(x\mid y)dx$$
    Using the last part, we have
    $$=\int^\infty_0\frac{x}{y}e^{-x/y}dx=\left[-(x+y)e^{-x/y}\right]^\infty_0=y$$

Best Answer

For 2. if $X$ and $Y$ are independent then $f_X(x)=\frac{f_{XY}(x,y)}{f_Y(y)}$ should not depend on $y$, which is clearly not the case for your pdf. There is no need to explicitly calculate $f_X(x)$

For 3. instead of $f_{X|Y}$ you should write $f_{X|Y}(x|y)=\ldots$