where N is the number of cases, Xi is the variable value at a particular location, Xj is the variable value
at another location, X is the mean of the variable, and Wij is a weight applied to the comparison between
location i and location j. Wij is a distance-based weight matrix which is the inverse distance between
locations i and j (1/dij).