# Deducing the pdf of a random vector from some of its conditional distributions

I have a homework question about random vectors I wish to solve:

Choose a point randomly on the interval $[0,1]$ and label it $X_{1}$. Then choose a point randomly on the interval $[0,X_{1}]$ and label it $X_{2}$.Finally, choose a point randomly on the interval $[0,X_{2}]$ and label it $X_{3}$. Find the joint density function $f(x_{1},x_{2},x_{3})$ of the random vector$(X_{1},X_{2},X_{3})$ Then find the marginal density of $X_{3}$.

I know that by definition $F(x_{1},x_{2},x_{3})=P(X_{1}\leq x_{1},X_{2}\leq x_{2},X_{3}\leq x_{3})$.

I need help getting started, the problem I have is that $X_{2}$ is dependent on $X_{1}$ and $X_{3}$ is dependent on both $X_{1},X_{2}$.

I think this have to do with some conditional probability distribution function (I am probably miss translating this term), but I think that I only know it for two random variables $F_{Y|X}(y|x)=P(Y\leq y|X\leq x)$, is there something similar for $3$ random variables ?

-
Hint: First, use proper notation. Next, it is easier to calculate the density function directly using $$f_{X_1,X_2,X_3}(x_1,x_2,x_3) = f_{X_3\mid X_2,X_1}(x_3\mid x_2, x_1)f_{X_2\mid X_1}(x_2\mid x_1)f_{X_1}(x_1)$$ where the three densities on the right are given to you as being uniform densities, and the joint density is obviously nonzero only in the region of three-dimensional Euclidean space specified by $0 \leq x_3 \leq x_2 \leq x_1 \leq 1$. –  Dilip Sarwate Dec 31 '12 at 17:17
QUOTE: I know that by definition $F(X_{1},X_{2},X_{3})=P(X_{1}\leq x_{1},X_{2}\leq x_{2},X_{3}\leq x_{3})$. END OF QUOTE. What you "know" is wrong. You should have written $F(x_{1},x_{2},x_{3})=P(X_{1}\leq x_{1},X_{2}\leq x_{2},X_{3}\leq x_{3})$. It's absurd the way you wrote it, since one side is a random variable and the other is not. –  Michael Hardy Jan 1 '13 at 0:48
@MichaelHardy - Sorry, that was a typo, I corrected it –  Belgi Jan 1 '13 at 6:38

As Dilip Sarwate already mentioned it's easier to calculate the joint density function $f_{X_1,X_2,X_3}$. Since we know that $X_3$ depends on $X_2$ and $X_2$ depends on $X_1$ we rewrite $f_{X_1,X_2,X_3}$ in the following way:

$$f_{X_1,X_2,X_3}(x_1,x_2,x_3) = f_{X_3|X_2,X_1}(x_3|x_2,x_1) \cdot f_{X_2|X_1}(x_2|x_1) \cdot f_{X_1}(x_1) \tag{1}$$

where

$$f_{Y|Z}(y|z) := \begin{cases} \frac{f_{Y,Z}(y,z)}{f_Z(z)} & f_Z(z) \not= 0 \\ 0 & f_Z(z)=0 \end{cases} \tag{2}$$

denotes the conditional density function of $Y$ given $Z$ (for some random variables $Y,Z$). You can prove that $(1)$ holds by plugging the definition $(2)$ in $(1)$, it's straight-forward.

So we have to determine the density functions on the righthandside in $(1)$. Let's consider $f_{X_2|X_1}$ (then $Y \hat{=} X_2$, $Z \hat{=} X_1$ in $(2)$). We have $f_{X_1}(x_1)=0$ iff $x_1 \in \mathbb{R} \backslash [0,1]$ (since $X_1$ is uniformly distributed on $[0,1]$)), thus

$$f_{X_2|X_1}(x_2|x_1) = 0$$ for all $x_1 \in \mathbb{R} \backslash [0,1]$. From the construction of the random variables we know that $$f_{X_2|X_1}(x_2|x_1) = \frac{1}{x_1} \cdot 1_{[0,x_1]}(x_2)$$ for all $x_1 \in [0,1]$. Hence

$$f_{X_2|X_1}(x_2|x_1) = \frac{1}{x_1} \cdot 1_{[0,x_1]}(x_2) \cdot 1_{[0,1]}(x_1)$$

Try to do the same argumentation for the remaining density function $f_{X_3|X_2,X_1}$...

-