[Math] Find the conditional probability density function of $Y$ given $X=x$

probability

Suppose $Y$ is a continuous random variable with probability density function $f(y)={192\over y^4}$, for $y\geq 4$ ($0$ otherwise). If the conditional distribution of X given $Y = y$ is a uniform distribution on $[0, y]$. Find the conditional probability density function of $Y$ given $X = x$.

My clue is that:
$$f_{X|Y}(x|y)={f_{X,Y}(x,y)\over{f_Y(y)}}={1\over y}$$
then we get $$f_{X,Y}(x,y)={192\over y^5}$$
$$f_{Y|X}(y|x)={f_{X,Y}(x,y)\over{f_X(x)}}$$
But I don't know how to find the domain of $Y$ in terms of $X$ to get $f_X(x)$.
Am I on the right track?

Best Answer

Note that the expression for the joint density $f_{X,Y}(x,y)$ that you computed only holds for $x$ and $y$ satisfying $x \ge 0$ and $y \ge \max\{x, 4\}$; it is zero otherwise. Thus for $x \ge 0$ we have $$f_X(x) = \int_{-\infty}^\infty f_{X,Y}(x,z) \, dz = \int_{\max\{x, 4\}}^\infty \frac{192}{z^5} \, dz.$$


Continuing the computation leads to $$f_X(x) = 48 \max\{x, 4\}^{-4} = \begin{cases}48 / 4^4 & x \in [0, 4] \\ 48 / x^4 & x > 4\end{cases}$$ So, $$\int_0^\infty f_X(x) \, dx = 4 \cdot \frac{48}{4^4} + \int_4^\infty \frac{48}{x^4} \, dx = \frac{3}{4} + \frac{16}{4^3} = 1.$$