X,Y uniformly distributed with uniformly distributed parameter

density functionprobabilityprobability distributions

Let $U$ be uniformly distributed on $[0,1]$, therefore dividing the interval in two intervals: $[0,U]$ and $[U,1]$. Now let $X$ be uniformly distributed on $[0,U]$ and $Y$ be uniformly distributed on $[0,1−U]$.

a) Find the conditional density of $U$ given $Y$.

b) Find the joint density of $X$ and $Y$.

It's quite easy to verify that for a), $f(U|Y) = \frac{-1}{(1-u)ln|1-u|} $. $f(X,Y)$ is less straightforward. I tried writing $$f(x,y) = f(y|x)f(x)$$ where $f(x)=\int f(x|u)f(u)du=\int \frac{1}{u}du =ln|u|.$ However I don't know how to approach $f(y|x)$. What am I missing?

Best Answer

$$f(x,y) = E_U[f(x,y|u)] = \int f(x,y|u) f(u) du$$ Based on the construction of $X$, $Y$: $$ f(x,y|u) = f(x|u)f(y|u)$$ Where $$f(x|u) = \frac{1}{u} I(0\leq x\leq u), \quad f(y|u) = \frac{1}{1-u}I(0\leq y\leq 1-u).$$ Note that the variables $x$ and $y$ appear in the integration bound. As an example, to calculate $f(x)$ you may write: $$f(x) = \int f(x|u) f(u) du = \int \frac{1}{u} I(x\leq u)I(0\leq u\leq 1) du= \int_{x}^{1} \frac{1}{u} du,$$ where $I(\cdot)$ is the indicator function.

Also note that: $$U\sim \text{Uniform}(0,1)\Rightarrow f(u) = I(0\leq u\leq 1).$$