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?