TITLE: Probability of circle given by randomly chosen diameter falling inside a square
QUESTION [14 upvotes]: Two dots are thrown into a square with side length 1 cm. The line ending in these two dots is the diameter of a circle. What is the probability that the circle lies in the square?

REPLY [7 votes]: Let $[0,1]^2$ be the given square. For symmetry reasons it is enough to analyze the case where the midpoint of the circle lies in the triangle $\{(x,y)\ |\ 0\leq y\le x\leq{1\over2}\}$. Therefore we have a priori
$$y_1+y_2\leq x_1+x_2\leq 1\ .$$
The only extra constraint here is that
$$\Bigl({x_2-x_1\over2}\Bigr)^2+\Bigl({y_2-y_1\over2}\Bigr)^2\leq \Bigl({y_2+y_1\over2}\Bigr)^2\ ,$$
or
$$|x_2-x_1|\leq 2\sqrt{\mathstrut y_1 y_2}\ .$$
For given $y_1$, $y_2$ the set of admissible $x_1$, $x_2$ is the rectangle
$$R:=\{(x_1,x_2)\ |\ y_1+y_2\leq x_1+x_2\leq 1,\ |x_2-x_1|\leq 2\sqrt{\mathstrut y_1 y_2}\}$$
 of area $2\sqrt{\mathstrut y_1 y_2}\bigl(1-(y_1+y_2)\bigr)$; see the following figure. Here we have used that $2\sqrt{\mathstrut y_1 y_2}\leq y_1+y_2$.

It follows that the probability we are looking for is
$$16\int_0^1\int_0^{1-y_1}\sqrt{\mathstrut y_1 y_2}\bigl(1-(y_1+y_2)\bigr)\ dy_2\ dy_1={\pi\over6}\ .$$