Probability problem the AP statistics teacher can’t solve

geometric-probabilityprobability

This is a challenge problem that my AP Stat teacher can't solve, so I am hoping that I can find an answer here. I am aware that you could use a computer to run simulations to get an approximate, but I am looking for a more definitive answer.

The question is: Assume 2 points are placed in rectangle $ABCD$ at random. A line is drawn connecting said points. What is the probability that the midpoint of the line drawn falls in the circle with a diameter of $w$?

Image of the problem

If you cannot see the image, here is a description of the model. There is a rectangle labeled $ABCD$ with one side length of $4w$ and another side length of $2w$. In the center of the rectangle there is a circle with a diameter of $w$.

Best Answer

To simplify the problem, let's assume that $w = 1$ (since the probability is preserved by scaling the figure) and that the figure is centered at the origin. To make it more precise:

Let $X_1, X_2$ be uniformly distributed on $[-2, 2]$, and let $Y_1, Y_2$ be uniformly distributed on $[-1, 1]$, all independent from one another. Then the points $(X_1, Y_1)$ and $(X_2, Y_2)$ are uniformly distributed on the rectangle $[-2, 2] \times [-1, 1]$. Their midpoint is given by $$M = (M_x, M_y) = \left(\frac{X_1 + X_2}{2}, \frac{Y_1 + Y_2}{2}\right).$$ Our eventual goal is to determine if $M$ lies in the disk centered at the origin with radius $1/2$.

Since $M_x$ and $M_y$ are the average of two i.i.d. uniform variables, they have a triangular distribution; that is, the density of $M_x$ is $\frac 1 2 - \left| \frac x 4 \right|$ on $[-2, 2]$, and the density of $M_y$ is $1 - |y|$ on $[-1, 1]$. (The motivation for these density functions is that they make symmetric triangles centered at $0$ with total area of $1$ on the regions forming their support.) To check that we're on the right track, we note that $$\int_{-2}^2 \int_{-1}^1 (1 - |y|) \left( \frac 1 2 - \left| \frac x 4 \right| \right) \, \textrm d y \, \textrm d x = 1$$ which confirms that we have at least written down a valid joint density function for the two coordinates.

Our task now is to recompute that same integral, but this time integrating over the aforementioned disk instead of on the entire rectangle. To get rid of the absolute values, let's exploit the symmetry of the problem and restrict ourselves to quadrant 1 by computing $$\color{blue}{4} \cdot \iint_D (1 - y) \left( \frac 1 2 - \frac x 4 \right) \, \textrm dy \, \textrm dx$$ where $D$ is the portion of the disk that lies in Quadrant 1. Converting to polar coordinates gives \begin{align*} 4 \cdot \int_0^{1/2} \int_0^{\pi/2} (1 - r \sin \theta) \left( \frac 1 2 - \frac 1 4 r \cos \theta \right) \cdot r \, \textrm d \theta \, \textrm d r \end{align*} which is equal to $\fbox{$\frac{\pi}{8} - \frac{15}{128} \approx 0.275512$}$, confirming @Stephen Donovan's numerical calculations. (Note: I used Wolfram Alpha for laziness, but that integral is perfectly doable by hand.)