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

2,802

## Solution 1

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.

## Solution 2

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
distance.to.center = sqrt((x.center-1/2)^2+(y.center-1/2)^2)


This simulates drawing $10^8$ pairs of points

(x1, y1), (x2, y2)
, and finds the center and radius of the corresponding circles, and checks to see whether those circles contain the center of the square (1/2, 1/2). When I ran this I got 49995062, meaning that the probability can be estimated as 0.49995062. I'd say that's close to 1/2.

Share:
2,802 Author by

### Rahul Sharma

Updated on September 18, 2021

• 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?
• If the radius of the circle is another independent random parameter then we need to know how it is distributed.
• Sorry for the above comment!!! line segment joining those two points forms the diameter of the circle.
• 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.
• @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$$
• 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
• • • 