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.

  • $\begingroup$ 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? $\endgroup$ Aug 31, 2013 at 21:37
  • $\begingroup$ If the radius of the circle is another independent random parameter then we need to know how it is distributed. $\endgroup$ Aug 31, 2013 at 21:48
  • $\begingroup$ Sorry for the above comment!!! line segment joining those two points forms the diameter of the circle. $\endgroup$ Aug 31, 2013 at 21:49

3 Answers 3


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.

  • $\begingroup$ 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. $\endgroup$ Aug 31, 2013 at 22:07
  • 1
    $\begingroup$ @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 $$ $\endgroup$ Aug 31, 2013 at 22:21
  • 4
    $\begingroup$ 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 $\endgroup$
    – leonbloy
    Aug 31, 2013 at 22:37
  • $\begingroup$ @leonbloy I like your geometric argument. $\endgroup$ Aug 31, 2013 at 22:39
  • $\begingroup$ 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? $\endgroup$ Aug 31, 2013 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
radius = sqrt((x.center-x1)^2+(y.center-y1)^2)
distance.to.center = sqrt((x.center-1/2)^2+(y.center-1/2)^2)
sum(radius > distance.to.center)

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.


Another way to approach this problem would be to consider the angle made by the two points A and B at O (centre of the square).

In the case that O lies on the boundary of the circle with AB as diameter, the ∠AOB = 90 degrees.

If O lies inside the circle then the ∠AOB is greater than 90 degrees and if point O lies outside the circle then the ∠AOB is less than 90 degrees.

Since A and B are iid we can see the probability of ∠AOB being greater than 90 is 1/2


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .