What's the probability of choosing two numbers from $[0,1]$ and having the difference at least one half? We have the unit interval $[0,1]$ and we want to find the probability of picking two random numbers $a,b$ from that interval with $|a-b|>0.5$.
Must I investigate $[0,1]×[0,1]$?
I don't have the faintest idea of how to solve this. The problem is that $[0,1]$ has infinite numbers to pick from… so how to calculate a probability with infinitely many items in the sample space?
I would be really happy if somebody shed a light on this.
 A: Quick, draw a diagram!

Since the two random variables are independent and uniformly distributed, the answer is clearly $\frac14$.
A: The geometric approach works well here. If you choose two points uniformly from the interval $[0,1]$, that's the same as choosing a point uniformly from the square with vertices $(0,0), (0,1), (1,0)$ and $(1,1)$. Now, you can graph the lines corresponding to the conditions $y=x+\frac12$ and $y=x-\frac12$. Between those lines are points where the difference between $x$ and $y$ is less than $\frac12$, and outside of them, you find points where the difference is greater. Use geometry to calculate the area inside your square of interest, but not between those two lines. That's your answer, since the total area of the square is $1$.
A: Note:
$$|a-b|>0.5 \Rightarrow a>b+0.5 \ \ \ \text{or} \ \ \ a<b-0.5.$$
Considering $0\le a,b\le 1$ we get:
$$\begin{cases} b+0.5<a\le 1 \\ 0\le b<0.5 \end{cases} \ \ \ \text{or} \ \ \ \begin{cases} 0\le a <b-0.5 \\ 0.5<b\le 1\end{cases}.$$
We make up double integrals:
$$P=\int_0^{0.5} \int_{b+0.5}^1 \mathrm{d}a \, \mathrm{d}b\color{red}{+}\int_{0.5}^1 \int_0^{b-0.5} \mathrm{d}a \, \mathrm{d}b=$$
$$\int_0^{0.5} (0.5-b)\, \mathrm{d}b \color{red}{+} \int_{0.5}^1 (b-0.5)\, \mathrm{d}b=$$
$$0.25-0.125 \color{red}{+} 0.5-0.125-0.5+0.25=0.25.$$
