Probability of rectangle lying completely inside circle

integrationprobability

Let $C$ be a circle. Two points, $P_1$ and $P_2$ are randomly chosen, with $P_1$ on the circumference of $C$ and $P_2$ in the interior of $C$. What is the probability that the rectangle with diagonal $P_1P_2$ and sides parallel to the $x$-axis and $y$-axis lies entirely inside $C$?

The probability is apparently $\frac{4}{\pi^2}.$ WLOG, we can assume the circle has radius 1. One can pick a point $P_1$ on a circle and let $O$ be the origin. Then let $\theta$ be the angle formed by $OP_1$ and the diameter of $C$ parallel to the $y$-axis. So then a rectangle with both sides parallel to the $x$– and $y$-axes and diagonal $P_1P_2$ will lie entirely inside the circle iff $P_2$ is inside the rectangle inscribed by the circle with both sides parallel to the axes. This inscribed rectangle has area $4\sin\theta \cos\theta.$ Also, the angle $\theta$ varies from $0$ to $\frac{\pi}2$ by definition. So the required area is $\frac{2}{\pi}\int_0^{\pi/2} \dfrac{4\sin\theta\cos\theta}{\pi}d\theta = \dfrac{4}{\pi^2}.$

The question is, where does the $\frac{2}{\pi}$ come from in this answer? Clearly the $\dfrac{4\sin\theta\cos\theta}{\pi}$ comes from dividing the rectangle's area by the circle's area.

Best Answer

To help you understand, you could alternatively allow the angle $\theta$ to range from $0$ to $2\pi$. Then the area of the inscribed rectangle is $|4 \cos \theta \sin \theta|$, since it must be positive (and in quadrants II and IV, exactly one of $\cos \theta$ and $\sin \theta$ is negative).

But if we recall that $P_1$ is uniformly chosen at random on the circumference of the circle, and $\theta$ is the angle that $P_1 O$ makes with the positive $x$-axis, then $\theta$ is uniformly distributed on $[0, 2\pi)$. That means the probability density of $\theta$ is given by $$f(\theta) = \frac{1}{2\pi}, \quad 0 \le \theta < 2\pi.$$

Then the desired integral is $$\frac{1}{2\pi} \int_{\theta = 0}^{2\pi} \frac{|4 \cos \theta \sin \theta|}{\pi} \, d\theta.$$ You can use a symmetry argument to complete the calculation.

So back to the original method of solution, all that is different is that by restricting our attention to quadrant I where both $\sin$ and $\cos$ are positive, and exploiting symmetry at an earlier stage, we can simplify the computation. But when we do this, $\theta$ is not uniformly distributed on $[0, \pi/2)$. So the probability density in this case would be $$f(\theta) = \frac{1}{\pi/2} = \frac{2}{\pi}, \quad 0 \le \theta < \pi/2.$$