Nearest Neighbour Index

Statistics
Introduced by
Philip J. Clark & Francis C. Evans
Year
1954
Type
Summary statistic for the degree of clustering or dispersion in a point pattern
Family
Point pattern analysis

What does it do?

The nearest neighbour index, introduced by Clark and Evans in 1954, is a summary statistic that describes whether a set of points is clustered, randomly scattered, or evenly dispersed.

It divides the observed mean distance from each point to its nearest neighbour by the mean distance expected under complete spatial randomness. The resulting ratio, with its significance test, gives one interpretable number that is widely used in point-pattern analysis.

The intuition behind the method

Drop a handful of points on a map and measure how far each one sits from its nearest companion. If the points cluster into tight clumps, those nearest-neighbour distances are short; if the points spread out as evenly as possible, the distances are long; if they fall purely at random, the distances take an in-between value that mathematics can predict exactly. The nearest neighbour index simply asks whether the points are closer together, farther apart, or about as far as random chance would dictate, turning a visual impression of 'clumpy' or 'spread out' into a defensible number on a scale anchored at one for randomness.

History

Philip Clark and Francis Evans published 'Distance to nearest neighbor as a measure of spatial relationships in populations' in Ecology in 1954. In that paper they derived the expected nearest-neighbour distance under randomness and proposed the ratio R and its test. The index was developed for spacing in populations of plants and animals, and its use has since extended to geography and other spatial sciences. Later second-order methods such as Ripley's K function were developed to address the single-scale and edge-effect limitations of the original approach.

When to use it

Use the nearest neighbour index for a quick first characterization of a point pattern, such as settlements, retail outlets, trees, nests, or crime locations, when the question is whether the points are clustered or dispersed relative to randomness and a single summary with a test is wanted. It suits exploratory work and comparisons between patterns recorded over study areas of similar extent. Do not rely on it alone when the pattern may have structure at several distances (multi-scale methods such as Ripley's K or pair-correlation functions are more suitable), when the study-area boundary is ill-defined, since A enters the expected distance directly, or when point density varies across the area, because the expected value assumes one constant intensity n/A.

Limitations and considerations

  • Only the distance to the single nearest neighbour is used, so the index summarizes one spatial scale and two patterns with different multi-scale structure can share the same value.
  • The area A enters the expected distance, so R changes directly with how the study region is drawn, not only with the points.
  • The expected value assumes one constant intensity n/A; density variation across the region is read as clustering.
  • Points near the boundary can have their true nearest neighbour outside the region, which inflates their measured distances and pushes R toward dispersion unless edges are corrected.
  • The z-test shown on this page is not edge-corrected. For a pattern with points near the boundary, its p-value does not match a corrected analysis, so an edge-corrected test should be used.
  • The p-value rests on a normal approximation to the z-score, which is reasonable only for moderate to large numbers of points. With few points, a Monte Carlo envelope under complete spatial randomness, obtained by simulating random patterns within the same study area, gives a more reliable test.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The ratio R has a fixed benchmark of 1 for randomness, so the direction of departure (clustering below 1, dispersion above 1) can be read off directly.
  • The expected distance and the standard error of the z-test are analytic functions of n and A, so the basic test requires no simulation.
  • Only point coordinates and the size of the study area are needed; the upper bound of about 2.149 for a hexagonal lattice gives the dispersion direction a known ceiling.

Applications

  • Assessing whether settlements or towns are regularly spaced, as central place theory predicts.
  • Characterizing the dispersion or clustering of retail stores, services, or facilities.
  • Analysing the spacing of trees, nests, or animal territories in ecology.
  • Summarizing the concentration of crime, accident, or disease point locations.
  • Comparing the spatial regularity of point patterns across regions or time periods.

How it works

How it works

1

For every point in the pattern, the distance to its single closest neighbour is measured, and these distances are averaged to give the observed mean nearest-neighbour distance d-bar-o. This one number captures the typical spacing of the pattern: small when points huddle together, large when they hold each other at arm's length.

Formula
\bar{d}_o = \frac{1}{n}\sum_i d_i
2

Under complete spatial randomness, with points scattered independently and uniformly at the observed density n/A, where A is the study-area size, the expected mean nearest-neighbour distance is one over twice the square root of the density. This d-bar-e is the benchmark spacing that a purely random pattern of the same intensity would produce, derived analytically by Clark and Evans.

Formula
\bar{d}_e = \frac{1}{2\sqrt{n/A}}
3

The nearest neighbour index R is the observed mean distance divided by the expected mean distance. R below 1 indicates clustering (points closer than random), R equal to 1 indicates randomness, and R above 1 indicates dispersion (points more evenly spaced than random), with a theoretical maximum of about 2.149 attained by a perfectly regular hexagonal lattice.

Formula
R = \frac{\bar{d}_o}{\bar{d}_e}
4

To judge whether an observed R departs meaningfully from randomness, a standardized z-score is formed by dividing the difference between observed and expected mean distances by the standard error of the expected distance under randomness. The standard error is 0.26136 divided by the square root of n-squared over A. The formula as written contains no edge correction, so it is appropriate only when boundary effects are negligible. For patterns with points close to the study boundary, an edge-corrected version of the test should be used instead. The z-score is compared with the normal distribution to obtain an approximate p-value for the null hypothesis of complete spatial randomness.

Formula
z = \frac{\bar{d}_o - \bar{d}_e}{SE_{\bar{d}_e}},\quad SE = \frac{0.26136}{\sqrt{n^2/A}}

Common pitfalls

  • Drawing the study-area boundary arbitrarily, since A is part of the expected distance and therefore changes R.
  • Ignoring edge correction, which biases R upward (toward apparent dispersion) for points near the border.
  • Applying the index to a clearly inhomogeneous pattern and interpreting the resulting clustering as a spatial process when it may only reflect density variation.
  • Reporting the index alone as conclusive instead of checking it against a multi-scale measure such as Ripley's K.

Frequently asked questions

What do the values of the nearest neighbour index mean?

The index R is the ratio of the observed mean nearest-neighbour distance to the distance expected under complete spatial randomness. R less than 1 means points are closer together than random, indicating clustering; R equal to 1 means the pattern is indistinguishable from random; and R greater than 1 means points are more evenly spaced than random, indicating dispersion. The theoretical maximum is about 2.149, achieved by a perfectly regular hexagonal arrangement.

Why are edge effects a problem for the index?

Points near the boundary of the study area may have their true nearest neighbour lying outside the studied region, so the measured nearest-neighbour distance is artificially inflated. This biases the index toward apparent dispersion. Edge-correction methods such as buffering, toroidal wrapping, or analytical corrections reduce this bias, and because the expected distance depends on the area A, defining the study region carefully is essential to a meaningful result.

How does the nearest neighbour index compare with Ripley's K function?

The nearest neighbour index summarizes the pattern at a single scale, the distance to the one closest neighbour, and gives a single number. Ripley's K function instead counts neighbours within a range of distances, showing whether clustering or dispersion occurs at different scales. K is more informative for complex patterns, while the Clark-Evans index is simpler and quicker; the two are complementary, so reporting both gives a fuller picture.

Related methods

Sources

  1. Clark, P. J., & Evans, F. C. (1954). Distance to nearest neighbor as a measure of spatial relationships in populations. Ecology, 35(4), 445–453.

    Open DOI reference