Suppose that 3-dimensional space contains countably infinite number of randomly positioned particles (points), on average $1$ particle per a unit of volume. Their distribution is homogeneous and isotropic. I'm interested in next questions:
- What is the average distance from a particle to its closest neighbor?
- What is the average distance from a particle to its second (or $n$-th) closest neighbor?
What approach would you recommend to solve these problems? Thanks.
For the $n$-th closest neighbour to be at distance $r$, we must have $n-1$ points in the sphere of radius $r$ and one point at distance $r$. The probability for the former is $\mathrm e^{-\lambda}\lambda^{n-1}/(n-1)!$ with $\lambda=\frac43\pi r^3$ (a Poisson distribution), and the density for the latter is $4\pi r^2$. Thus the expected distance to the $n$-th closest neighbour is
$$ \frac{\int_0^\infty r\left(\frac43\pi r^3\right)^{n-1}\mathrm e^{-\frac43\pi r^3}4\pi r^2\mathrm dr}{\int_0^\infty\left(\frac43\pi r^3\right)^{n-1}\mathrm e^{-\frac43\pi r^3}4\pi r^2\mathrm dr}=\left(\frac43\pi\right)^{-\frac13}\frac{\Gamma\left(n+\frac13\right)}{\Gamma(n)}=\left(\frac{3n}{4\pi}\right)^{\frac13}+O\left(n^{-\frac23}\right)\;. $$
For $n=1$, this is approximately $0.55396$, and for $n=2$ it is approximately $0.73861$; for large $n$ it is approximately given by the radius of a sphere expected to contain $n$ points.