Probability using volumes wedge Suppose that a point $(X, Y, Z)$ is chosen uniformly at random from the wedge
$f(x ,y,z)$ belongs to $\mathbb{R}^3: 0 \leq x, y \leq 1, \textrm{and}\, 0 \leq z \leq x$.


*

*Compute the probability $(a \leq X \leq b)$ and $(c \leq Y \leq d)$ for $0 \leq a \leq b$ and $0 \leq c \leq d$. Are $X$ and $Y$ independent random variables?

*Find the probability density function for the distributions of each of $X$ and $Y$.

*Find the joint probability density function for the joint distribution of $(X, Y)$.


I feel it has to be done by computing volume of prism but I don't exactly know how to do that. Any help would be appreciated. Thanks!!
I did the first part and I got $\frac{b^2d}{2}$ as I simply computed the volume of the prismhen for P(X<=b) I got f(x)=b and similarly for P($Y\leq y$) I got $fy(y)=d$ then their joint distribution as f(x,y)= bd so i deduced $X$ and $Y$ are independent.Please let me know if what I did is correct.
 A: 
I did the first part and I got $\frac{b^2d}{2}$ as I simply computed the volume of the prismhen for P(X<=b) i got f(x)=b and similarly for P(Y<=y) i got fy(y)=d then their joint distribution as f(x,y)= bd so i deduced X and Y are independent.Please let me know if what i did is correct.

Question 1. asks to find $P(a\leqslant X\leqslant b,c\leqslant Y\leqslant d)$ for $0 \leqslant a \leqslant b\leqslant1$ and $0 \leqslant c \leqslant d\leqslant1$ (do you see why we add the condition that $b,d\leqslant1$?). This is the ratio of the volumes of the domains $D(a,b,c,d)$ and $D(0,1,0,1)$, where, for every $0 \leqslant a \leqslant b\leqslant1$ and $0 \leqslant c \leqslant d\leqslant1$,
$$
D(a,b,c,d)=\{(x,y,z)\mid a\leqslant x\leqslant b,c\leqslant y\leqslant d,0\leqslant z\leqslant x\}.
$$
Hence,
$$
|D(a,b,c,d)|=\int_a^b\int_c^d\int_0^x\mathrm dz\mathrm dy\mathrm dx=(d-c)\int_a^bx\mathrm dx=\tfrac12(b^2-a^2)(d-c).
$$
Using this for $(a,b,c,d)=(0,1,0,1)$ and considering the ratio yields
$$
P(a\leqslant X\leqslant b,c\leqslant Y\leqslant d)=(b^2-a^2)(d-c).
$$
Thus, $P(a\leqslant X\leqslant b,c\leqslant Y\leqslant d)=P(a\leqslant X\leqslant b)P(c\leqslant Y\leqslant d)$ for every $0 \leqslant a \leqslant b\leqslant1$ and $0 \leqslant c \leqslant d\leqslant1$ hence $X$ and $Y$ are indeed independent and
$$
P(a\leqslant X\leqslant b)=b^2-a^2,\qquad P(c\leqslant Y\leqslant d)=d-c.
$$
Differentiating, one gets the densities
$$
f_X(x)=2x\mathbf 1_{(0,1)}(x),\qquad f_Y(y)=\mathbf 1_{(0,1)}(y).
$$
This solves 1. and 2. (and nearly 3.). You might wish to compare with what you wrote.
