Is that cluster real, or could chance have drawn it?

Moran’s I asks whether similar values sit together anywhere on the map. Getis-Ord Gi* asks where. Both answer with a test against chance, and both depend on who counts as a neighbor.