[Math] Determine the joint pdf from the conditional distribution and marginal distribution of one of the variables

calculusdensity functionprobabilityuniform distribution

Have this question I think I'm doing right, but I am unsure:

Let $(X,Y)$ be a random vector characterized as follows. The marginal density $f_X(x)=2x$ for $0 \le X \le 1$ and the conditional distribution of Y given X=x is uniformly distributed in [0,x]. Find the joint pdf f(x,y) and marginal density $f_Y$.

From this, I took the conditional probability to be
$$
f_{Y|X}(y|x)=\frac{1}{x}
$$
for $0 \le y \le x$ and from there calculated
$$
f_{XY}(x,y) = f_{Y|X}(y|x)*f_X(x)=\frac{1}{x}*2x=2
$$
I know pdfs can have values greater than 1, but this seems off to me.

For the marginal distribution of y, I know to integrate the pdf over all values of x, so I did this:
$$
f_Y(y)=\int_0^y 2dx = 2y
$$
for $0 \le y \le 1$. I can't imagine that this is correct. Thank you for your help!

Best Answer

The joint density looks like this:

enter image description here

So, the marginal distribution of $Y$ is given by the following integral

$$\int_y^1 2 \ dx=2(1-y)$$

if $0\leq y\leq 1$.

Related Question