Consider the joint pdf of $(X, Y)$ given by
$$f(x, y) = \begin{cases} y^{-1}\text{exp}\left(-y\right) & 0 < x < y \\[1em] 0, & \text{ otherwise.} \end{cases} $$
a) Compute $\mathbb{E}[X^{3} | Y = y]$
b) Are $X$ and $Y$ independent?
So, my attempt for $(a)$ was to first compute $f_{x \mid y}(x \mid y)$ as follows:
$$f_{x|y}(x|y) = \frac{f(x,y)}{\int_{-\infty}^{\infty}f(x,y) \mathop{dx}} = \frac{1}{y}.$$
So,
$$\mathbb{E}[X^{3} \mid Y = y] = \int_{0}^{y} x^{3}\frac{1}{y} \mathop{dx} = \boxed{y^3/4}$$
For $(b)$, I try to decompose $f(x, y)$ into the product of two marginals. We have
$$f_{Y}(y) = \int_{0}^{y} f(x, y) \mathop{dx} = e^{-y}.$$
But, I can't compute
$$f_{X}(x) = \int_{x}^{\infty} f(x,y) \mathop{dy}. $$
Wolfram Alpha can't compute it in a nice way either. Is my answer for $(a)$ correct? How can I do $(b)$?
(a) is quite correct.
For (b) you have that $f_{X,Y}(x,y)=y^{-1}e^{-y}\mathbf 1_{0\leq x\leq y}$ and $f_Y(y)=e^{-y}\mathbf 1_{0\leq y}$ . Okay.
Don't worry about having trouble finding the marginal density function for $X$. Just ask, can there be any mono-variate function wrt $x$, $g(x)$, such that $y^{-1}e^{-y}\mathbf 1_{0\leq x\leq y}=g(x)~e^{-y}\mathbf 1_{0\leq y}$ ? Therefore, can $X,Y$ be independent?