0

Let $X$ and $Y$ be independent variables, uniformly distributed in the interval $[0,1]$. Find the CDF of $|X-Y|$.

I tried the following:

$$P(|X-Y|\le z) = P((X-Y)\le z) + P((X-Y)\le -z) = 1 - P((X-Y)> z) + P((X-Y)\le -z).$$

Comparing with solution, it seems I have something extra. (I got $1-(1-z)^2)+...$ (not figured out what $P((X-Y)\le -z)$ is yet ). What have I done wrong?

StubbornAtom
  • 17,052
Amos Ku
  • 99
  • $P(|X-Y| \leq z) = P(-z \leq X-Y \leq z)$. Your equations are messed up – Lukas Rollier Jan 08 '20 at 16:04
  • You can proceed like this: $P(|X-Y|\le z)=P(X-Y\le z,X>Y)+P(Y-X\le z,Y>X)=2P(X-Y\le z,X>Y)$. Drawing a picture yields the answer. – StubbornAtom Jan 09 '20 at 12:23
  • " (|−|≤)=(−≤−≤) -- This is what I started with, but I was thinking that I have not seen any previous example in my book that has this expression, so I think I may express it as the total probability format. ." – Amos Ku Jan 09 '20 at 15:23

1 Answers1

0

Since both $X$ and $Y$ have a uniform distribution, and they are independent, their joint distribution is just the uniform distribution on the square $[0,1]^2$. What portion of this square has the property that $|X-Y| \leq z$? Well, we can either have $0 \leq X-Y \leq z$ or $0 \leq Y-X \leq Z$. Drawing these things (unfortunately I do not know how to quickly draw in latex) shows that it is a strip around the first bisector. Hence, we are looking for the area of this strip. This is just one minus the area of the triangles we cut off, and those we can put together to form a smaller square of side length $1-z$.

This gives $P(|X-Y|\leq z) = 1-(1-z)^2 = 2z-z^2$.

Lukas Rollier
  • 1,289
  • 4
  • 11
  • I think you are getting there, but I am still trying to figure out in the wording portion of your answer. I am trying to visualize this answer of yours. – Amos Ku Jan 09 '20 at 15:25