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$.

  • 4
    $\begingroup$ "Assume 2 points are placed in rectangle ABCD at random." This is a trap. Are you saying for example that the Cartesian coordinates of the lower left and upper right corners are $(0,0)$ and $(4w,2w)$ and that each random point is selected by choosing a random number $x$ in $[0,4w]$ and a random number $y$ in $[0,2w]$ and then assigning that point to the Cartesian coordinate $(x,y)$? Is this what you are referring to by random assignment? If not, before the problem can be attacked, you need to specify the exact procedure used to select the points at random. $\endgroup$ May 26 at 16:13
  • 3
    $\begingroup$ @user2661923 That is not a helpful comment. While technically you are correct that we need to specify a probability measure to be precise, it is generally understood that picking a point inside a bounded domain in $\mathbb{R}^n$ means doing so in the standard measure that is proportional to the Euclidean volume. $\endgroup$
    – Nate
    May 26 at 16:31
  • $\begingroup$ To expand on @user2661923's comment, I could flip a coin and if heads, choose point $(w/2,w/7)$ and if tails, $(3w/4,5w/3)$. It's a randomly chosen point. $\endgroup$
    – David P
    May 26 at 16:31
  • $\begingroup$ Assume that you accept my specification, re previous comment. Given any point $(x_1,y_1)$, let $p(x_1,y_1)$ denote the fraction of points $(x,y)$ such that the line segment $\overline{(x_1,y_1) (x,y)}$ has its midpoint in the circle. Then, the final computation will be $$\frac{\int_0^{4w}\int_0^{2w}p(x_1,y_1)~dy~dx}{\int_0^{4w}\int_0^{2w}1 ~dy ~dx}.$$ So, the problem reduces to computing $p(x,y).$ $\endgroup$ May 26 at 16:31
  • 1
    $\begingroup$ I agree strongly with @Nate. I think there is one clear meaning of the question, and it's to have a probability measure proportional to area. I am genuinely baffled that people could think this problem is underspecified. $\endgroup$ May 26 at 18:52

2 Answers 2


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.)


Let's assume a rectangle is centered at $(0,0)$, has width $w$, and has height $h$. In other words, associate the rectangle with the cartesian product $\Omega=\left[-\frac{w}{2},\frac{w}{2}\right]\times \left[-\frac{h}{2},\frac{h}{2}\right]$. Further assume an inscribed circle has radius $R\leq \min\{\frac{w}{2},\frac{h}{2}\}$ and is also centered about the origin.

If $(X_1,Y_1),(X_2,Y_2)\sim \mathcal{U}\left(\Omega\right)$ then $X_1,X_2,Y_1,Y_2$ are mutually independent random variables with $X_1,X_2 \sim \mathcal{U}\left[-\frac{w}{2},\frac{w}{2}\right]$ and $Y_1,Y_2\sim \mathcal{U}\left[-\frac{h}{2},\frac{h}{2}\right]$.

We're tasked to find the probability that $\Big\|\left(\frac{X_1+X_2}{2},\frac{Y_1+Y_2}{2}\right)\Big\|\leq R$. Notice how $$\begin{eqnarray*}\mathbb{P}\left(\Big\|\left(\frac{X_1+X_2}{2},\frac{Y_1+Y_2}{2}\right)\Big\|\leq R\right) &=& \mathbb{P}\left(X^2+Y^2\leq4 R^2\right)\end{eqnarray*}$$ where $X=X_1+X_2$ and $Y=Y_1+Y_2$. Acknowledge that $X,Y$ are independent random variables that each possess a triangular distribution whose pdfs are delineated below: $$f_{X}(x)=\left(\frac{1}{w}-\frac{|x|}{w^2}\right)\cdot 1_{[-w,w]}(x) \\ f_{Y}(y)=\left(\frac{1}{h}-\frac{|y|}{h^2}\right)\cdot 1_{[-h,h]}(y)$$ From independence $f_{X,Y}\equiv f_X \cdot f_Y$ and $$\begin{eqnarray*}\mathbb{P}\left(X^2 +Y^2 \leq 4R^2\right) &=&\int_{-2R}^{2R} \int _{-\sqrt{4R^2-x^2}}^{\sqrt{4R^2-x^2}}f_{X,Y}(x,y)\mathrm{d}y\mathrm{d}x \\ &=&4\int_0^{\pi/2}\int_0^{2R}\left(\frac{1}{w}-\frac { r\cos(\theta)}{w^2} \right)\left(\frac{1}{h}-\frac {r \sin(\theta)}{h^2} \right)r\mathrm{d}r\mathrm{d}\theta \\ &=& \frac{4R^{2}\left(-8hR+3\pi hw+6R^{2}-8Rw\right)}{3h^{2}w^{2}}\end{eqnarray*}$$ If you replace $w$ with $4w$, h with $2w$, and $R$ with $\frac{w}{2}$ this probability simplifies to $\frac{1}{128}\left(16\pi-15\right)$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.