Jump to content

mean nearest neighbor distance in 3d


inkliing

Recommended Posts

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

Link to comment
Share on other sites

Modest at

 

http://hypography.com/forums/physics-mathematics/21509-mean-nearest-neighbor-distance-3d.html

 

was helpful in pointing me to this link:

 

http://books.google.com/books?id=hpxpyOak1psC&pg=PA171&lpg=PA171&dq=%22probability+law+for+nearest-neighbor+distance+in+a+random+distribution+of+particles%22&source=bl&ots=T9lWLj9rLx&sig=q3ldVEWmqUBu3FWcWJ75S85-Wc8&hl=en&ei=n3MNS82wC4ikMJDlrNAC&sa=X&oi=book_result&ct=result&resnum=1&ved=0CAgQ6AEwAA#v=onepage&q=%22probability%20law%20for%20nearest-neighbor%20distance%20in%20a%20random%20distribution%20of%20particles%22&f=false

 

And now I need to integrate:

 

integral of x^3 exp(-a x^3) dx, with a = constant,

 

but I couldn't. Hopefully, it's an easy integral and and someone will figure it out.

 

In a 3-dimensional random distribution, the basic idea for finding the average distance from any given particle to its nearest neighbor begins with:

 

P®dr = [1 - integral from 0 to r of P®dr][4 pi r^2 pho dr] (1)

 

where

pho = average number of particles/unit volume

P® dr = the probability of a particle's nearest neighbor occurring in the interval [r,r+dr]

integral from 0 to r of P® dr = probablity that an arbitrary particle's nearest neighbor lies within a distance r of the particle

1 - integral from 0 to r of P® dr = the probability that the nearest neighbor is no closer than r.

 

differentiating & separating eq. 1:

 

dP/P = [2/r - 4 pi rho r^2] dr

 

integrating:

 

P = [constant] r^2 exp(- [4/3] pi rho r^3)

 

normalizing:

 

1 = integral from 0 to infinity of P® dr

1 = [constant] integral from 0 to infinity of r^2 exp(-[4/3] pi rho r^3) dr

1 = [constant] [-[1/(4 pi rho)] exp(-[4/3] pi rho r^3)] evlauated from 0 to infinity

 

gives the constant = 4 pi rho and P® = 4 pi rho r^2 exp(-[4/3] pi rho r^3)

 

The average distance from any given particle to its nearest neighbor in 3 dimensions is then the expectation value of r:

 

<r> = integral from 0 to infinity of r P® dr

<r> = [4 pi rho] [integral from 0 to infinity of r^3 exp(-[4/3] pi rho r^3) dr]

 

I was unable to do the last integral, but I'm sure someone can :)


Merged post follows:

Consecutive posts merged

since what we really want is the average distance to the nearest star system, and atlasoftheuniverse.com reports 23 star systems within 12.5 ly (35 stars but 3 trinaries, 6 binaries, and 14 singles), we have:

 

rho = 23/([4/3]pi 12.5^3)

rho = 0.0028113 star systems/cubic light-year

 

rho is only an estimate since some of the star systems near the outer edge of the volume (of 12.5 ly radius) might have nearest neighbors outside the volume and some star systems just outside the volume might have nearest neighbors inside.

 

since the integral of x^3 exp(-a x^3)dx doesn't seem to be integrable, I used

 

people.hofstra.edu/stefan_waner/RealWorld/integral/integral.html

 

to numerically integrate:

 

the integral from 0 to infinity of 0.035328(x^3)(e^(-0.011776(x^3)))dx = 3.93 light years

 

as the average distance from an arbitrary star system in the solar neighborhood to its nearest nighbor :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.