# Distance between $2$ random points in a segment.

On a straight line of length $10$ cm, two points A, B are selected at random uniformly and independently. What is the probability that the distance $AB > 4$ cm?

Edit: I edited the question to make it more clear. Note that apart from the clear answer to this question from mjqxxx, Gerry Myerson gives an answer to the question "If two numbers $a$ and $b$ are chosen uniformly and independently in $[0,10]$, what is the probability that the product $ab>4$". Both answers are nicely illustrated by Henry. Gilles Bonnet 17.05.14.

-

Draw Cartesian axes labeled $A$ and $B$. You're asking about the fraction of the square $[0,10]\times[0,10]$ that is greater than $4$ units away (measured horizontally or vertically) from the diagonal $A=B$. Geometrically this region consists of two isosceles right triangles with side length $6$, so its total area is $36$. The desired probability is $0.36$.

-
Can you please put a diagram.It will be easy to understand.Your ans is right. – Aizen Jun 27 '12 at 7:49
Also tell me why the other ans i.e area outside the curve AB=4 didn't work. – Aizen Jun 27 '12 at 7:54

$$\int_{4/10}^{10} \left(10-\frac{4}{x}\right) \, dx \quad / \quad 10^2$$ $$= 0.96 - 0.04 \,\log_e 25 \approx 0.831\ldots$$

And for mjqxxxx's alternative interpretation of $AB \gt 4$

$$2 \times \frac{6 \times 6}{2}\quad / \quad 10^2 \quad = \quad 0.36$$

-
This does not show the points where $AB > 4$. Note that this is a distance, not the product of the coordinates of $A$ and $B$. – mrf Jun 27 '12 at 9:31
+1 for supplying the diagram. – Gerry Myerson Jun 27 '12 at 11:33
I think where the original question says $AB$, it means the distance between points $A$ and $B$ on the segment, not the product of the distances of $A$ and $B$ from the left endpoint of the segment. – MJD Jun 27 '12 at 13:51

Draw Cartesian axes, labeled $A$ and $B$. You're asking about the part of $[0,10]\times[0,10]$ outside the curve $AB=4$.

-
A quick Monte Carlo simulation tallying proportion of pairs of uniform pseudoramdom points in [0,1] separated by more than 4/10 seems to converge to ~0.36, and this is approximately the numerical value of the integral of 4/(10x) from 4/10 to 1. (ie, 2 Log(5/2)/5). but is that the same as the "part outside" the curve AB=4? – alancalvitti Jun 27 '12 at 5:51
There's a square, there's a curve inside the square, and I want the proportion of the square above the curve. But why are you looking at numbers separated by more than 4/10, when the question is about products, not differences, of numbers? – Gerry Myerson Jun 27 '12 at 6:45
@GerryMyerson: Because the notation "$AB$" means the length of the segment from $A$ to $B$. Admittedly, the problem should ask for the probability that $AB > 4$ cm, not just "$4$". – mjqxxxx Jun 27 '12 at 7:31
@mjqxxxx, darn, looks like you're right. OK, everyone, ignore my answer and comment. – Gerry Myerson Jun 27 '12 at 11:32