# CDF of Euclidean distance between two points.

2-D plane, a circle $\text{C}_0$ of radius $R$ centered at $A(0,0)$, $N$ random points $D_i(x_i,y_i),i=1\dots N$ are independently uniformly distributed in $\text{C}_0$.

Choose the point $D_s$ from $D_i$ which has the smallest Euclidean distance to point $A$, i.e., $$s = \mathop{\arg\min}_{i=1\dots N}\sqrt{x_i^2+y_i^2},\\ d_s=\min_{i=1\dots N}\sqrt{x_i^2+y_i^2}.$$

I know that the CDF of $d_s$ is $$F_{d_s}(r)=1-\left(1-\frac{r^2}{R^2}\right)^N,0\leq r\leq R.$$

If there is another point $P(a,0),a>R$, the Euclidean distance from $D_s$ to $P$ is $$d_{sp}=\sqrt{(x_s-a)^2+y_s^2}.$$

How can I find the CDF or PDF of $d_{sp}$ ?

In the case of $N=1$, I can get the CDF $$F_{d_{sp}}(r)=\frac{\text{Area of } \text{C}_0\cap\text{C}_1\text{}}{\text{Area of C}_0},$$ where $\text{C}_1$ indicates the circle centered at $P$ with radius $r$, and $\text{C}_0\cap\text{C}_1$ is the intersection of the two circles.

But when $N>1$, I can't find the results. The MATLAB simulation shows that Expectation of $d_{sp}$ decreases as $N$ grows. I thinks there must be an explicit expression of the CDF of $d_{sp}$. The figure shows MATLAB CDF simulation results.

Thanks a lot!

-
Most people distinguish between the circle $C_0$ -- the set of all points at distance $R$ from the origin -- and the disc which is the set of all points at distance less than $R$ (or less than or equal to $R$) from the origin. Which do you mean? Because with the usual meaning of circle, all the random points are at distance exactly $R$ from the origin! – Dilip Sarwate Aug 17 at 20:53

You will find this problem much simpler if you recast it in polar rather than rectangular coordinates. The problem is then:

2-D plane, a unit circle $\text{C}_0$ at the origin $O(0,0)$, $N$ random points $D_i(r_i,\theta_i),i=1\dots N$ are independently uniformly distributed in $\text{C}_0$.

This means that the coordinates $R$ and $\Theta$ are independent uniform random variables with $R=\frac{2r}{R^2}$ and $\Theta=U(0,2\pi)$.

Choose the point $D_s$ from $D_i$ which has the smallest Euclidean distance to point $O$, i.e., \begin{align} s &= \mathop{\arg\min}_{i=1\dots N}r_i\\ d_s&=r_{min}\\ \end{align}

Consider another point $P(a,0),a>1$, the Euclidean distance from $d_s$ to $P$ is $$d_{sp}=\sqrt{(r_{min})^2+a^2-2r_{min}a\cos{\theta_{r_{min}}}}$$

Or in terms of random variables: $$D_{sp}=\sqrt{R^2+a^2-2Ra\cos{\Theta}}$$

Can you take it from here?

By the way - this also works for $a\le1$

-
Thank you very much for the answer! However, $D_i$ is iud in $\text{C}_0$ does not mean $R=U(0,R)$. I think the PDF of $r$ is $$f_r(x)=\frac{2x}{R^2}, 0\leq x\leq R.$$ But you really show me a method to solve it. I'll try $r\text{ and }\theta$ method immediately. – nnnmao Oct 1 '13 at 2:08
True, $U(0,R)$ is not right. The number of points must be proportional to the area of the ring. The CDF must be $$\frac{r^2}{R^2}$$ which gives your PDF. Will edit answer. – Dale M Oct 2 '13 at 6:03
Hi @DaleM, may I ask a question based on your answer? How to get the distribution of $D_{sp}$, based on $D_{sp}=\sqrt{R^2+a^2-2Ra\cos\theta}$? Thank you! – Chang Mar 17 at 23:30