Arte SheetsLearn. Try. Understand.

Spatial Statistics & Operations

Getis-Ord Gi* Local Spatial Hotspot and Coldspot Z-Score Formula

Separate high-value spatial hotspots (Z > +1.96) from low-value coldspots (Z < -1.96) using Ord and Getis’s (1995) standardized self-inclusive G_i* statistic.

Distinguish high-high hotspots from low-low coldspots where Moran’s I cannot

Global and Local Moran’s I multiply centered deviations z_i * z_j, producing POSITIVE values for BOTH a cluster of severe warehouse stockouts (+z * +z > 0) AND a cluster of near-zero stockouts (-z * -z > 0)! Ord and Getis (1995) solve this directly via standardized G_i* = (SUM_j w_ij * x_j - x_bar * W_i) / (S_x * SQRT((n * S_1i - W_i^2) / (n - 1))), where self-inclusive neighborhood weights w_ij include focal site i itself (w_ii = 1), W_i = SUM_j w_ij, S_1i = SUM_j w_ij^2 (= W_i for binary 0/1 weights!), and S_x = STDEVP(x).

Verify by hand across n = 8 fulfillment hubs in B2:B9 = {48, 52, 50, 12, 10, 14, 11, 11} (mean x_bar = 26.0000, population SD S_x = STDEVP = 18.6481) where Hub 1’s binary 3-hub neighborhood {Hub 1, Hub 2, Hub 3} has W_1 = 3 (C2:C9 = {1,1,1,0,0,0,0,0}): neighborhood sum is 48 + 52 + 50 = 150 vs null expectation 3 * 26 = 78, finite-population factor SQRT((8*3 - 9) / 7) = SQRT(15 / 7) = 1.4639, and Z(G_1*) = (150 - 78) / (18.6481 * 1.4639) = +2.6376 (significant Hotspot!), whereas cold-cluster {Hub 4, 5, 6} summing to 36 gives Z = (36 - 78) / 27.2980 = -1.5386 (or -2.67+ on severe coldspots)!

Getis-Ord Gi* Component (n = 8, W_i = 3)Exact Formula (Binary 0/1 w_ij)Sample Output
Global Mean x_bar & Pop SD S_xAVERAGE(x); STDEVP(x)26.0000; 18.6481
Local Neighborhood Sum vs ExpectedSUMPRODUCT(w_ij, x_j) vs W_i * x_bar150.00 vs 78.00 (+72.00 excess)
Finite-Population Scale FactorSQRT((n * SUM(w_ij^2) - W_i^2) / (n - 1))1.4639 (SQRT(15 / 7))
Standardized Hotspot Z(G_1*)(Local_Sum - W_i*x_bar) / (S_x * Scale)+2.6376 (99% Hotspot > +2.58!)

Ord-Getis (1995) Standardized Z(G_i*) Formula (General Continuous or Binary Weights)

Use SUMPRODUCT(C2:C9, C2:C9) for S_1i = SUM(w_ij^2) so the formula works identically for binary 0/1 contiguity weights AND inverse-distance spatial weights! Guard W_i = 0 (isolated site) and W_i = n (global-sum degeneracy where n*S_1i - W_i^2 = 0 for all-ones weights).

=LET(n_hub, ROWS(B2:B9), s_pop, STDEVP(B2:B9), w_sum, SUM(C2:C9), s_1i, SUMPRODUCT(C2:C9, C2:C9), rad_v, (n_hub * s_1i - (w_sum^2)) / (n_hub - 1), IF(OR(n_hub <= 1, s_pop <= 0, w_sum <= 0, rad_v <= 0), "Degenerate Neighborhood", ROUND((SUMPRODUCT(B2:B9, C2:C9) - AVERAGE(B2:B9) * w_sum) / (s_pop * SQRT(rad_v)), 4)))

Hotspot vs Coldspot Polarity Flip Check

Verify sign polarity by moving the 3-hub window to low-incident hubs {Hub 5, 7, 8} and dropping them to {1, 1, 1} (set B6=1, B8=1, B9=1 and C2:C4=0, C6=1, C8=1, C9=1): Z(G_i*) flips strongly negative below -1.96 into a statistically significant Coldspot!

=IF(ISNUMBER(F4), IF(F4 >= 1.96, "Significant Hotspot", IF(F4 <= -1.96, "Significant Coldspot", "Not Significant")), F4)

Try the example

Use the original values or change them to test your understanding.

Further reading