0

Let $X_1$ and $X_2$ be two independent random variables with distribution $U(0,1)$. Let $Y=|X_1-X_2|$. Find the distribution function and density of $Y$.

Solution: f(x1)=1 whenever x1 between 0 and 1 =0 Else where f(x2)=1 whenever x2 between 0 and 1 =0 Else where f(x1,x2)=1 whenever x1,x2 between 0 and 1 =0 Else where G(y)= P[-y <= x1-x2 <= y] =\int_{-y}^y \int_{x1_y}^{y+x1} 1 dx2 dx1 =\int_{-y}^y -2y dx1 =4y^2 when y between 0 and 1 =0 when y less than 0 =1 when y greater than 1 Thus, g(y)= \diff G(y) =8y Is it correct?

Math1000
  • 36,983

1 Answers1

1

If we plot the region $$ \{(x,y)\in [0,1]^2: |x-y|\leqslant t\} $$ for $t\in(0,1)$, we see that it consists of all of $[0,1]^2$ except for the triangles with vertices $(t,0),(1,0),(1,1-t)$ and $(0,t), (0,1)$ and $(1-t,1)$. These are right triangles each with area $\frac12(1-t)^2$, and so the distribution function of $Y$ is $$ G(t) = 1 - (1-t)^2. $$ Differentiating yields the density $$ g(t) = \frac{\mathsf d}{\mathsf dt} G(t) = 2(1-t). $$

Math1000
  • 36,983