Hi. In 3 dimensional Euclidean space with the usual metric, d=[(delta x)^2+(delta y)^2+(delta z)^2]^1/2, I'm trying to figure out the average distance between nearest neighbors in a randomly distributed sample of particles. My best initial guess for the average distance from any given particle to its nearest neighbor is d_nearest neighbor_mean=(volume/n)^1/3 where n particles are randomly distributed in a 3 dimensional volume.

The question originated when I wondered what was the average distance between stars in the solar neighborhood. atlasoftheuniverse.com gives 35 stars (including the Sun) within 12.5 light-years, and the above formula yields 6.16 ly as the avg distance from any given star to its closest neighbor. This seemed a little high to me, since the distance from the Sun to its nearest neighbor (Proxima Centauri) is 4.4 ly. But perhaps the Sun has a closer-than-avg nearest neighbor, since, after all, the distribution should be very close to random. Let us assume that the stars are randomly distributed.

I originally thought it would be easy to figure this out, but after trying unsuccessfully for an hour to work out a better formula, then another hour trying to google one, I gave up. Thanks in advance