Calculating a distribution function that depends on a distribution

If I have the a uniform distribution defined that depends on another uniform distribution how can I calculate what the probability density function is?

For example, Let $(X|Y=y)$ be a random variable uniformly distributed over $[0,y]$. Given that $Y$ is uniformly distributed over $[0,1]$ what is the density function of (X,Y) ?

• Your notation is not standard. Please reformulate it as follows. Let X(y) be a random variable uniformly distributed over [0,y]. Given that Y is uniformly distributed over [0,1] what is the density function of X(Y)?
– zoli
Feb 25 '15 at 11:07
• Hint: For every $x$ in $(0,1)$, $$\int_0^1\mathbf 1_{t\gt x}\frac{dt}t=-\log x.$$
– Did
Feb 25 '15 at 11:21
• Are you asking us to find the distribution of $X$ after we introduced $Y$ into it, so like $(X|Y=y)$ and then we want to get X, or are you asking for us to find the distribution of $(X,Y)$, I.e. The joint distribution? Feb 25 '15 at 13:18
• For your interest, the formulation "Let $(X|Y=y)$ be a random variable uniformly distributed over $[0,y]$" is quite incorrect. There is no such thing as a random variable $(X|Y=y)$.
– Did
Feb 25 '15 at 15:36
• @Did No that is a notation used in statistics, its means you are looking at a random variable parametrized with $Y$. I see it my actuary courses everywhere. Feb 25 '15 at 15:55

By the definition of $X$ and $Y$ we have $$f_{X(Y)|Y=y}(x)=f_{X(y)|Y=y}(x)=\begin{cases}\frac{1}{y} \text{ if }0\le x\le y \\ \ 0 \text{ otherwise.} \end{cases}$$ With this $$f_{X(Y)}(x)=\begin{cases}\int_0^1f_{X(y)|Y=y}(x)dy=\int_x^1\frac{1}{y}dy=-ln(x)& \ \text{if } 0\le x \le 1\\ 0 &\text{ otherwise.} \end{cases}$$

But you wanted to know the distribution function of $X(Y)$. Here it is

$$F(x)_{X(Y)}=\begin{cases}0&\text{if }x \lt 0\\ -\int_0^xln(u)du=x-xln(x)&\text{if }0\le\ x\le1\\ 1& \text{otherwise}.\end{cases}$$

Explanatory note:

Behind what we have above the following are $$f_{X(Y)}(x)=\int_{-\infty}^{+\infty}f_{X(Y),Y}(x,y)dy$$ and $$f_{X(Y),Y}(x,y)=f_{X(y)|Y=y}(x)f_Y(y)=\begin{cases}\frac{1}{y}\text{ if }0\le x\le y \le 1\\ \ 0 \text{ otherwise},\end{cases}$$ and $$f_Y(y)=\begin{cases} 1\text{ if }0\le y\le1\\ 0\text{ otherwise.} \end{cases}$$

So if I got this properly...

We have $(X|Y=y) \text{~Uniform} (0,y)$ and we have $Y \text {~Uniform} (0,1)$, right?

Then we know that

$f_{X|Y=y} (x) = \frac 1 y, \quad 0<x<y$

And

$f_{Y} (y) = \frac 1 1 = 1, \quad 0<y<1$

Now what I'm confused is to what you want...

If you want the joint pdf of $(X, Y)$ then we do

$$f_{X,Y} (x, y) = f_{X|Y=y} (x) * f_Y(y) = \frac 1 y *1 = \frac 1 y, \quad 0<x<y<1$$

If want the marginal of $X$ unconditioned from $Y$, we get it by integrating $Y$ out of the joint :

$$f_X(x) = \int_x^1 f_{X, Y} (x, y) dy, \quad 0<x<1 \\ = \int_x^1 \frac 1 y dy, \quad 0<x<1 \\ = \ln (y)]_x^1 , \quad 0<x<1 \\ = - \ln (x), \quad 0<x<1$$