“Spatial Statistics” does not mean applying traditional (non-spatial) statistical methods to data that just happens to be spatial (has X and Y coordinates). Spatial statistics integrate space and spatial relationships directly into their mathematics (area, distance, length, etc.). For many spatial statistics, these spatial relationships are specified formally through a spatial weights matrix file or table.
A spatial weights matrix is a representation of the spatial structure of your data. It is a quantification of the spatial relationships that exist among the features in your data set (or, at least, a quantification of the way you conceptualize those relationships). Because the spatial weights matrix imposes a structure on your data, you should select a conceptualization that best reflects how features actually interact with each other (giving thought, of course, to what it is you are trying to measure). If you are measuring clustering of a particular species of seed-propogating tree in a forest, for example, some form of inverse distance is probably most appropriate. However, if you are assessing the geographic distribution of a region’s commuters, travel time or travel cost might be a better choice.
While physically implemented in a variety of ways, conceptually the spatial weights matrix is an NxN table (“N” is the number of features in the data set). There is one row for every feature and one column for every feature. The cell value for any given row/column combination is the weight that quantifies the spatial relationship between those row and column features.
At the most basic level, there are two strategies for creating weights to quantify the relationships among data features: binary or variable weighting. For binary strategies (fixed distance, K nearest neighbors, or contiguity) a feature is either a neighbor (1) or it is not (0). For weighted strategies (inverse distance or zone of indifference) neighboring features have a varying amount of impact (or influence) and weights are computed to reflect that variation.
The Generate Spatial Weights Matrix tool creates a binary file defining the relationships among features in your dataset, based on your parameter specifications. It is constructed in a way that minimizes required computations and computer memory. These relationships are utilized in the mathematics of the spatial statistics tools.
Additional Resources:
Mitchell, Andy. The ESRI Guide to GIS Analysis, Volume 2. ESRI Press, 2005.
Getis, Arthur and Jared Aldstadt. Constructing the spatial weights matrix using a local statistic. Geographical Analysis, 36(2): 90–104, 2004.