A problem on geometrical probability Two points $P$ and $Q$ are taken at random on a straight line $OA$ of length $a$,show that the chance that $PQ\gt b$,where $b\lt a$ is $$({\frac{a-b}{a}})^2$$
I tried to find out the chance by using geometrical probability, but I failed .
I understand that the problem involves taking up the ratio of favourable and total geometrical area.please help me in this regard.thanks.
 A: Let us denote $P$ and $Q$ the random variables that describe the position of the points $P,Q$, respectively. Notice that $P$ and $Q$ follow uniform distributions $U([0,a])$.
It is not difficult to see (I omit the proof) that the difference $P-Q$ follows a triangular distribution as in the image below:

Then, the probability of $|P-Q|\geq b$ is preciselly the red area of the picture below 

That is:
$\frac{(a-b)^2}{a^2}$
A: Or something like this, green area is what you need - against total area

A: Probably not the most elegant solution, but we can use calculus.
Assign the leftmost and rightmost point of $OA$ to $0$ and $a$ respectively, and $x$ and $y$ be the coordinate of points $P$ and $Q$. We have
$$
P(|y-x|>b) = \frac{\displaystyle \int_0^{a-b}\int_{x+b}^a dy\space dx}{\displaystyle \int_0^a \int_x^ady \space dx} = \big(\frac{a-b}{a}\big)^2
$$
A: You are looking for the probability $$P(Z>b)=P(|X-Y|>b)$$
where $X$ and $Y$ are uniform and independent random variables on $[0,a]$. In case the random variables are independent, their sum corresponds to the convolution of their density functions. I hope you know what a probability density function and convolution are.
For example if we have the density of $Z$, then easily $$P(Z>b)=\int_{Z>b} p_Z(z)dz$$
In this example it is not necessary to calculate the density function of $Z$. It is enough to calculate the density of $X-Y$. If we let $W=-Y$, then we have $X+W$. What is the density of $W$? it is uniform on $[-a,0]$.
if you calcluate $$p_{X+W}(x)=\int_{-\infty}^\infty p_X(y)p_W(x-y)dy=\int_{-\infty}^\infty p_X(x-y)p_W(y)dy$$
you will obtain $$p_{X+W}(x)=\frac{a-x}{a^2}(u(x)-u(x-a))+\frac{x+a}{a^2}(u(-x)-u(-x-a))$$
where $u$ is the unit step function
Now what does $|X-Y|>b$ mean? it means $X-Y>b$ if $X>Y$ AND $Y-X>b$ if $Y>X$. For the last case if you multiply both sides by $-1$, you will get $X-Y<-b$ 
This means we need to integrate the function $p_{X+W}$ over two regions $x<-b$ and $x>b$. That is $$P(|X-Y|>b)=\int_{-a}^{-b} p_{X+W}(x) dx+\int_{b}^a p_{X+W}(x) dx$$.
The result of both integrals are $A=\frac{1}{2}\frac{a-b}{a^2}(a-b)$ and hence $$P(|X-Y|>b)=2A=\frac{(a-b)^2}{a^2}$$
Note that the term $h=(a-b)/a^2$ is the heigth of the little red triangle in zap's answer and $w=(a-b)$ is its width. The triangle function is $p_{X+W}$.
