Spatial Statistics & Supply Chain Analytics
Global Moran’s I Spatial Autocorrelation and Null Expectation Formula
Calculate Global Moran’s I = (N / S_0) * (SUM_ij w_ij * z_i * z_j) / SUM(z_i^2) across contiguous regions and benchmark against exact finite-sample expectation E[I] = -1 / (N - 1).
Catch the finite-sample trap: spatial randomness has E[I] = -1 / (N - 1), NOT zero!
When auditing regional stockouts, disease incidence, or real-estate cap rates across N contiguous zones, Global Moran’s (1950) I measures spatial clustering via I = (N / S_0) * (SUM_i z_i * Lag_z_i) / SUM(z_i^2), where z_i = x_i - x_bar are mean-centered values, Lag_z_i = SUM_j w_ij * z_j is each region’s spatially weighted neighbor sum, and S_0 = SUM_ij w_ij is total weight sum. Crucially, because z_i = x_i - x_bar sums to zero, under complete spatial randomness E[I] = -1 / (N - 1) < 0 — benchmarking small-N regional maps against 0 understates positive clustering!
Verify by hand on a 4-zone linear corridor Z1-Z2-Z3-Z4 (N = 4, binary rook adjacency: Z1<->Z2, Z2<->Z3, Z3<->Z4, so S_0 = 1 + 2 + 2 + 1 = 6) with clustered values x = {10, 12, 28, 30} in B2:B5 (mean = 20): deviations z = {-10, -8, +8, +10}, SUM(z_i^2) = 328, neighbor sums Lag_z = {-8, -2, +2, +8}, cross-product SUM(z_i * Lag_z_i) = 80 + 16 + 16 + 80 = 192 -> Moran’s I = (4 / 6) * (192 / 328) = 0.3902 (far above random expectation E[I] = -1 / 3 = -0.3333!).
| Spatial Corridor Metric (N = 4) | Exact Formula | Sample Output |
|---|---|---|
| Centered Sum of Squares SUM(z_i^2) | SUM((x_i - x_bar)^2) | 328.0000 |
| Spatial Cross-Product SUM(z_i * wz_i) | SUM_i z_i * (SUM_j w_ij * z_j) | +192.0000 (Clustered) |
| Global Moran’s I Statistic | (N / S_0) * CrossProd / SUM(z_i^2) | +0.3902 |
| Exact Spatial-Randomness Null E[I] | -1 / (N - 1) | -0.3333 (Checkerboard -> -0.9106!) |
Global Moran’s I Spatial Autocorrelation Formula
Multiply N / S_0 by SUMPRODUCT(z_i, Lag_z_i) / SUMPRODUCT(z_i^2) and guard constant flat maps where SUM(z_i^2) = 0.
=LET(n_reg, ROWS(B2:B5), s_0, SUM(E2:E5), ss_z, SUMPRODUCT(C2:C5, C2:C5), IF(OR(n_reg <= 1, s_0 <= 0, ss_z <= 0), "Constant Map or Disconnected Graph", ROUND((n_reg / s_0) * (SUMPRODUCT(C2:C5, D2:D5) / ss_z), 4)))Checkerboard Dispersion Test (Negative Spatial Autocorrelation)
Swap Z2 and Z3 to form an alternating high-low checkerboard x = {10, 28, 12, 30} (set B3 = 28, B4 = 12): neighboring zones now repel each other, flipping Moran’s I strongly negative from +0.3902 to -0.9106 (below E[I] = -0.3333)!
=ROUND(-1 / (ROWS(B2:B5) - 1), 4)Try the example
Use the original values or change them to test your understanding.