# How to calculate this joint distribution?

Suppose $f:\mathbb{R}\to[0,\infty)$ is Borel measurable and the integral of $f$ is strictly positive and finite. Moreover we have a r.v.'s $X$ and $Y$, where $Y$ is uniformly(0,1) distributed and independent of $X$. Furthermore we assume that the distribution of $X$ is given by

$$P_X(A)=\frac{\int_Af(x)dx}{\int_\mathbb{R}f(x)dx}$$

Then I want to calculate the distribution Function of $Z:=(X,f(X)Y)$, i.e.

$$P(Z\in A)$$

for a Borel set $A=A_1\times A_2\in \mathbb{R}\times\mathbb{R}$.

$$P(Z\in A)=P(X\in A_1,f(X)Y\in A_2)$$

I know that $X$ and $Y$ are independent, but I think $X,f(X)Y$ are not in general. So how can I compute this? It's an exercise in my probability book. The solution should be, that $Z$ is uniformly subgraph$(f)$ distributed, which means.

$$\mathcal{U}_{subgraph(f)}(B)=\frac{\lambda(B)}{\lambda(subgraph(f))}$$

where $\lambda$ is the lebesgue measure and $subgraph(f):=\{(x,y)\in \mathbb{R}^2;0\le y\le f(x)\}$. I know that $\lambda(subgraph(f))=\int_\mathbb{R}f(x)dx$.

-

For brevity, we will assume that $\int_{\mathbb R} f\, d\lambda=1$ (just replace $f$ by $f/\int_{\mathbb R} f\, d\lambda$ otherwise).
Given $X = x$, we now, that $f(X)Y$ is uniformly $[0, f(x)]$-distributed. Hence the density of $Z$ is given by \begin{align*} d_Z(z_1, z_2) &= d_{f(X)Y}(z_2 \mid X = z_1)d_X(z_1)\\ &= \frac 1{f(z_1)}\chi_{[0,f(z_1)]}(z_2) \cdot f(z_1)\\ &= \chi_{[0,f(z_1)]}(z_2) \end{align*} Now, for a Borel set $A \subseteq \mathbb R^2$, we have \begin{align*} P(Z \in A) &= \int_A d_Z(z)\, dz\\ &= \int_A \chi_{[0,f(z_1)]}(z_2)\, dz\\ &= \int_{\mathbb R^2} \chi_A(z)\chi_{[0,f(z_1)]}(z_2)\, dz\\ &= \int_{\mathbb R^2} \chi_{\{z \in A \mid 0 \le z_2 \le f(z_1)\}}(z)\, dz\\ &= \lambda^2(\{z \in A \mid 0 \le z_2 \le f(z_1)\}). \end{align*} which is the portion of the subgraph of $f$ contained in $A$ (your denominator above vanishes as I supposed $\int_{\mathbb R} f\, d\lambda^1 = \lambda^2(\text{subgraph}\, f) = 1$.
I have a question, why is $f(X)Y$ uniformly $[0,f(x)]$ distributed? And how you conclude from there that $d_Z(z_1,z_2)=d_{f(X)Y}(z_2|X=z_1)d_X(z_1)$? – user20869 Oct 4 '12 at 12:07