Moran’s I

Intermediate

What you need first. Nothing else on this path comes first. This page is part of Applications.

In spatial statistics, Moran’s I is an index of whether neighbouring areas have more similar values than a random reassignment of those values. Four districts lie in a line. Their values are 1, 2, 4, and 5. The large numbers sit next to each other, and so do the small ones. A correlation of the values with themselves is not defined in the ordinary way, because there is only one list. What can be computed is a correlation of each value with its neighbours.

Moran’s II is that index. It is large and positive when similar values cluster, and negative when neighbours tend to be unlike. A single number does not say whether the map is surprising. That requires a comparison with maps in which the same values have been reassigned.[1][2]

Moran’s I

Moran’s I
Fact Value
Topic Applications
Listed on Applications
Worked example 1

Motivating example

House prices, election shares, and disease rates are reported for areas. A choropleth map shows clusters, and the eye is quick to find them. The same values, painted onto the areas at random, also produce patches. People are good at seeing patterns, including patterns that a random painting would have produced. Moran’s II measures the association that is actually in the neighbour relation, and a randomisation test asks how often a random painting would have produced an index at least as large. The areas stay where they are. Only the numbers move. That is the null used for the usual significance statement: a reassignment of the observed values, not a model in which new areas are drawn from an infinite population.[2][1]

On the Boston census tracts of 1978, the median prices of owner-occupied housing give a global Moran’s II of about 0.6270.627 under queen contiguity, against an expectation of about −0.002-0.002. The positive index matches a map in which expensive tracts sit near expensive tracts. The expectation is near zero because, under no correlation, the formula centres near −1/(n−1)-1/(n-1), which for hundreds of tracts is a small negative number. A small positive index is therefore not automatically evidence of clustering. The distance from −1/(n−1)-1/(n-1) is the comparison.[1]

Intuition

Centre the values by subtracting their mean. A neighbour pair in which both deviations have the same sign contributes a positive product. A pair with opposite signs contributes a negative product. Weight each product by how strongly the two areas are treated as neighbours, add the products, and compare the total with the overall sum of squared deviations. The ratio is large when the map is smooth. Standardising the deviations does not change the ratio, because the scale appears in every product and in the sum of squares. The weights are a choice. A shared border, a distance band, or a fixed number of nearest areas will not give the same index.[1][2]

In a row-standardised weights matrix the spatial lag of an area is a weighted average of its neighbours. A Moran scatterplot puts the value on one axis and that lag on the other. The slope of the fitted line is Moran’s II. A positive slope means high values sit near high values and low values sit near low values. The sign of the values themselves is not the question. High next to high and low next to low both raise the slope.[2]

Definition

Let Y1,…,YnY_1,\ldots,Y_n be the values on nn areas, with mean Yˉ\bar Y, and let wijw_{ij} be a spatial weight, with wii=0w_{ii}=0. Moran’s II is

I=n∑i∑jwij∑i∑jwij(Yi−Yˉ)(Yj−Yˉ)∑i(Yi−Yˉ)2.I=\frac{n}{\sum_i\sum_j w_{ij}}\frac{\sum_i\sum_j w_{ij}(Y_i-\bar Y)(Y_j-\bar Y)}{\sum_i(Y_i-\bar Y)^2}.

The denominator of the leading fraction is the sum of all weights. The fraction that follows is a weighted covariance of the values with their neighbours, divided by the variance of the values. Positive II means clustering of similar values. Negative II means that neighbours are dissimilar. Values usually fall between −1-1 and 11, and the reference point under no spatial pattern is

E[I]=−1n−1,\mathbb{E}[I]=-\frac{1}{n-1},

not zero. An index significantly above that expectation is read as positive autocorrelation. An index significantly below it is read as negative autocorrelation.[1][2]

Statistical use

The index is the standard global summary for a continuous variable on areas, after a binary join-count for presence and absence. It is reported with the weights, not as a bare number. For a large number of areas the centred index, divided by an estimated standard deviation, is compared with a standard normal reference. The alternative that does not use that normal approximation is Monte Carlo randomisation: reassign the observed values to the fixed areas, recompute II, and repeat. The Monte Carlo pp-value is the proportion of reassigned maps whose index is at least as extreme as the observed index, in the direction of the alternative.[1][2]

A local version IiI_i can be computed for each area. One definition is

Ii=n(Yi−Yˉ)∑j(Yj−Yˉ)2∑jwij(Yj−Yˉ),I_i=\frac{n(Y_i-\bar Y)}{\sum_j(Y_j-\bar Y)^2}\sum_j w_{ij}(Y_j-\bar Y),

and the global index is proportional to the sum of the local indices. A global signal can therefore be opened into a map of where the association is strong. A high local index means the area is surrounded by similar values. A low local index means it is surrounded by dissimilar values. The local map still needs its own reference distribution, because a large IiI_i is not by itself a significance statement.[1]

Worked example

Four areas, A–B–C–D, are neighbours only along the line. The binary weights are 1 for each ordered neighbour pair and 0 otherwise, so S0=∑i∑jwij=6S_0=\sum_i\sum_j w_{ij}=6. The values are 1, 2, 4, and 5. Their mean is 3, and the deviations are −2,−1,1,2-2,-1,1,2. The sum of squared deviations is 4+1+1+4=104+1+1+4=10. The neighbour products, counting both directions, are

2[(−2)(−1)+(−1)(1)+(1)(2)]=2(2−1+2)=6.2\bigl[(-2)(-1)+(-1)(1)+(1)(2)\bigr]=2(2-1+2)=6.

Therefore

I=46⋅610=0.4.I=\frac{4}{6}\cdot\frac{6}{10}=0.4.

The positive value matches the map: low values share a border, and high values share a border. The expectation under the usual no-pattern reference is −1/3-1/3, so 0.40.4 sits above that reference. With only four areas the normal approximation is not the tool the large-sample formula was built for. The sign and the arithmetic of II are still well defined.[1]

Your turn. Keep the same four areas and the same weights. The values are now 1, 2, 2, and 1. What is Moran’s II?

The mean is 1.5 and the deviations are -0.5, 0.5, 0.5, and -0.5. The sum of squared deviations is 1. The sum of weighted neighbour products is -0.5. Then I=(4/6)×(−0.5)/1=−1/3I = (4/6) \times (-0.5)/1 = -1/3. Neighbours tend to lie on opposite sides of the mean.

Common misconceptions

A large II is not by itself a significance statement. The same values shuffled across the areas produce a cloud of indices, and the observed index is judged against that cloud. In the Boston tract calculation the expectation was about −0.002-0.002, so the observed 0.6270.627 is far from the null centre. A value of 0.050.05 on a map with the same expectation would be a different claim.[1][2]

A positive index means similar values are neighbours, not that the values are high. High next to high and low next to low both raise II. Geary’s CC is a different global index of the same idea. It uses squared differences of the raw values rather than products of standardised deviations, and it need not be converted into II by a fixed formula. Getis and Ord’s GG is aimed at concentration of high or low values and does not pick up negative autocorrelation. Reporting one of them as if it were the others changes the question.[2][1]

Connections

Moran’s II is the areal index most often paired with Geary’s CC inside spatial analysis. The variogram answers a related question for measurements at coordinates: how fast similarity decays with distance. An autocorrelation function does the analogous job for a series ordered in time. A local Moran statistic is the map that the global index averages over. The spatial lag that appears in the Moran scatterplot is the same lag that a spatial regression uses as a predictor, which is why a global II is often the first summary before a spatial model is fitted. The weights remain part of the answer. A queen contiguity and a kk-nearest-neighbour graph are different neighbour relations, and each produces its own II.[2][1]

Check yourself

Try these questions before opening an answer.

Standardising

Why does replacing the deviations by standardised deviations leave Moran’s I unchanged?

The same scale factor appears in every product in the numerator and in the sum of squares in the denominator, so it cancels.

The null centre

Why is the reference value of Moran’s I under no spatial pattern -1/(n-1) rather than zero?

Centring a finite list of values and tying them to a fixed neighbour graph forces a small negative expectation when the values are randomly reassigned. The comparison is with that expectation.

Low clusters

Why can a positive value of Moran’s I describe a cluster of low values?

The products use deviations from the mean. Low next to low gives a positive product, just as high next to high does.

See also

Abundance estimation · Actuarial science · Astrostatistics · Biostatistics · Business analytics · Censoring · Chemometrics · Computational biology

Glossary and index

References

  1. ^ a b c d e f g h i j k a. (§8.1) b. (§8.1) c. (§8.1 and §8.2) d. (§8.1) e. (§8.1) f. (§8.1 and §8.2) g. (§8.4) h. (§8.1) i. (§8.2) j. (§8.1) k. (§8.1 and §8.4) Moraga, Paula (2023). Spatial Statistics for Data Science: Theory and Practice with R. Chapman & Hall/CRC. https://www.paulamoraga.com/book-spatial/
  2. ^ a b c d e f g h i a. (§8.3.3) b. (§8.3) c. (§8.3.1 and §8.3.3) d. (§8.3.3) e. (§8.3.3) f. (§8.3.3) g. (§8.3.3) h. (§8.3.4) i. (§8.3.1 and §8.3.3) Rey, Sergio J., Arribas-Bel, Dani & Wolf, Levi J. (2020). Geographic Data Science with Python. Routledge. https://geographicdata.science/book/
Cite this page
Plain text
StatWiki (2026). "Moran's I." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/morans-i.html
BibTeX
@misc{statwiki_morans_i,
  author = {{StatWiki}},
  title = {{Moran's I}},
  year = {2026},
  url = {https://www.statwiki.io/articles/morans-i.html},
  urldate = {2026-12-02},
  note = {StatWiki, last updated 2 December 2026}
}