CDF of the distance of two random points on (0,1) Let $Y_1 \sim U(0,1)$ and $Y_2 \sim U(0,1)$.
Let $X = |Y_1 - Y_2|$.
Now the solution for the CDF in my book looks like this:
$P(X < t) = P(|Y_1 - Y_2| < t) = P(Y_2 - t < Y_1 < Y_2 + t) = 1-(1-t)^2$
They give this result without explanation. How do they come up with the $1-(1-t)^2$ part? Can you help me find the explanation?

Note that $P[-t<Y_1-Y_2<t]=P[(Y_1,Y_2)\in A]$ where $A=\{(y_1,y_2)|-t<y_1-y_2<t\}$.
Again note that $P[(Y_1,Y_2)\in A]=\text{Area of A}=1-(1-t)^2$. You need to draw a graph and need to find the area of A.
