Solved – Problem calculating joint and marginal distribution of two uniform distributions

density functionjoint distributionmarginal-distribution

Suppose we have random variable $X_1$ distributed as $U[0,1]$ and $X_2$ distributed as $U[0,X_1]$, where $U[a,b]$ means uniform distribution in interval $[a,b]$.

I was able to compute joint pdf of $(X_1,X_2)$ and marginal pdf of $X_1$.

$$ p(x_1,x_2) = \frac{1}{x_1}, \text{ for }\quad 0\le x_1\le 1, \quad 0\le x_2 \le x_1,$$

$$ p(x_1)= 1, \text{ for } \quad 0\le x_1\le 1.$$

However while computing marginal pdf of $X_2$ I am encountering limits problem. The resultant of integral through marginal of $X_2$ is $\log(X_1)$ and the limits are from 0 to 1. As $\log(X_1)$ is not defined for $X_1=0$, I am facing a difficulty.

Am I wrong somwhere? Thanks.

Best Answer

In the "marginalisation" integral, the lower limit for $x_1$ is not $0$ but $x_2$ (because of the $0<x_2<x_1$ condition).

So the integral should be:

$$p(x_2)=\int p(x_1,x_2) dx_1=\int \frac{I(0\leq x_2\leq x_1\leq 1)}{x_1} dx_1=\int_{x_2}^{1} \frac{dx_1}{x_1}=log\big(\frac{1}{x_2}\big)$$

You have stumbled across, what I think is one of the hardest parts of statistical integrals - determining the limits of integration.

NOTE: This is consistent with Henry's answer, mine is the PDF, and his is the CDF. Differentiating his answer gives you mine, which shows we are both right.

Related Question