Distance to random line in Disk

98 Views Asked by At

Consider the model in which we choose two points in the disk uniformly at random. What is the expected distance from the line segment between these two points to the origin? Note that the problem is significantly easier if it were the distance to the line (rather than segment) defined by a and b.

1

There are 1 best solutions below

1
On

Let $P_1$ and $P_2$ be uniformly randomly chosen points of the unit disc. Let $O$ denote the origin, and write $R_i = \overline{OP_i} = \|P_i\|$ and $\Theta = \angle P_1 O P_2 = \arccos\left(\frac{\langle P_1, P_2 \rangle}{R_1R_2} \right)$. We know that $R_1, R_2, \Theta$ are independent and have densities

$$ f_{R_i}(r) = 2r \mathbf{1}_{[0,1]}(r), \qquad f_{\Theta}(\theta) = \frac{1}{\pi} \mathbf{1}_{[0,\pi]}(\theta). $$

Now the distance $L$ between the line segment $\overline{P_1P_2}$ and $O$ is given explicitly by

$$ L = \begin{cases} R_1, & \text{if $R_1 < R_2 \cos\Theta$}, \\ R_2, & \text{if $R_2 < R_1 \cos\Theta$}, \\ \operatorname{dist}(\stackrel{\longleftrightarrow}{P_1 P_2}, O), & \text{otherwise} \end{cases} $$

Note, for instance, that $R_1 < R_2 \cos\Theta$ is equivalent to saying that $\angle O P_1 P_2$ is obtuse. So the above formula follows from analyzing the shape of $\triangle OP_1 P_2$. We also notice that

$$\operatorname{dist}(\stackrel{\longleftrightarrow}{P_1 P_2}, O) = \frac{\left| \det(P_1, P_2) \right|}{\| P_1 - P_2 \|} = \frac{R_1 R_2 \sin\Theta}{\sqrt{R_1^2 + R_2^2 - 2R_1 R_2 \cos\Theta}}. $$

Using this, one can find an expression for the conditional expectation $\mathbb{E}[L \mid \Theta = \theta]$:

$$ \mathbb{E}[L \mid \Theta = \theta] = \frac{8}{5} \int_{0}^{1} \left( \mathbf{1}_{\{ s \leq \cos\theta\}} + \frac{\sin\theta}{\sqrt{1 + s^2 - 2s\cos\theta}} \mathbf{1}_{\{s>\cos\theta\}} \right) s^2 \, ds. $$

So by the Fubini's theorem,

\begin{align*} \mathbb{E}[L] &= \frac{1}{\pi} \int_{0}^{\pi} \mathbb{E}[L \mid \Theta = \theta] \, d\theta \\ &= \frac{8}{5\pi} \int_{0}^{1} \int_{0}^{\pi} \left( \mathbf{1}_{\{ s \leq \cos\theta\}} + \frac{\sin\theta}{\sqrt{1 + s^2 - 2s\cos\theta}} \mathbf{1}_{\{s>\cos\theta\}} \right) s^2 \, d\theta ds \\ &= \frac{8}{5\pi} \int_{0}^{1} \left( \arccos(s) + \frac{1+s}{s} - \frac{\sqrt{1-s^2}}{s} \right) s^2 \, ds \\ &= \frac{52}{45\pi}, \end{align*}

which is approximately $0.36782475736793588711\cdots$.


Indeed, Monte Carlo simulation with $10^5$ pairs of points shows that

Monte Carlo simulation