# Probability that centre of the square lies inside the circle joining the two points inside the square

Two points are uniformly and independently distributed (located) inside a square. A circle is drawn such that the segment joining the two points is a diameter. Find the probability that the center of the square lies inside that circle.

• How do you draw a circle from two points? Do you make the line segment joining them the diameter of the circle with centre at the midpoint? – Michael Albanese Aug 31 '13 at 21:37
• If the radius of the circle is another independent random parameter then we need to know how it is distributed. – Maxim Umansky Aug 31 '13 at 21:48
• Sorry for the above comment!!! line segment joining those two points forms the diameter of the circle. – Rahul Sharma Aug 31 '13 at 21:49

Call the first point A, the second point B, and the center O. Join the line AO, and extend a line DOE through O, perpendicular to AO and continuing in both directions. If B is on the other side of DOE from A, then the circle joining A and B will contain the center. If B is on the same side of the line as A, then it will not. The line bisects the square's area, so the probability is 1/2.

• can you please elaborate on the geometry part that how will the circle contain the center of the square if A and B are on opposite sides of the line DOE. – Rahul Sharma Aug 31 '13 at 22:07
• @RahulSharma Choose the coordinate system such that $O$ is the origin, observe $$\left|\;\vec{0} - \frac{\vec{A}+\vec{B}}{2}\;\right| \le \frac{|\vec{A}-\vec{B}|}{2} \iff \vec{A}\cdot \vec{B} \le 0$$ – achille hui Aug 31 '13 at 22:21
• To put it other way: 1) the circle does not cover $O$ iff the angle $\widehat{AOB}$ is acute. 2) The probability that $\widehat{AOB}$ is acute is 1/2 – leonbloy Aug 31 '13 at 22:37
• @leonbloy I like your geometric argument. – achille hui Aug 31 '13 at 22:39
• Fix a circle with diameter AB, and try placing O in different locations: outside the circle, on the circumference of the circle, inside the circle. What can you say about angle AOB in each of the three cases? – G Tony Jacobs Aug 31 '13 at 22:41

Although the answer has already been given, it's possible to check this via simulation. In R:

n = 10^8
x1 = runif(n, 0, 1)
x2 = runif(n, 0, 1)
y1 = runif(n, 0, 1)
y2 = runif(n, 0, 1)
x.center = (x1+x2)/2
y.center = (y1+y2)/2

This simulates drawing $10^8$ pairs of points
(x1, y1), (x2, y2)