I just started a course on spatial statistics, so I’ve got covariance functions and variograms on the mind. This post is mostly for me to work through their intuition and relationship.
Say you have some spatio-temporal process, with specific locations denoted , with the value of the process those points are . For concreteness, these locations could be latitude and longitude and the field could be the outdoor temperature. Or maybe the locations are the the space-time of a player on a basketball court and the field is her shot percentage or scoring efficiency from that point.
Either way, one basic intuition is that values from two close points in a field will be more ‘similar’ than two distant points. This is a loaded assumption. Even temperature values are influenced by weather patterns and other exogenous variables can create unexplained variance. But we’ll go with it for now (and there are ways of accounting for these latent influences).
One way to encode this assumption is a covariance function, which simply takes in two points and spits out a covariance value. Given a covariance function , the random variables will have the covariance structure given by
Note that this function is restricted to only create positive semidefinite matrices. One commonly used covariance function is
and another may square the difference.
One thing to notice is that this particular covariance function relies only on the distance between and , (denoted by ), meaning it takes the form
When the covariance structure of a field only relies on this distance between points, and we assume that there is some mean value , then the process is second order (or weakly) stationary (and this particular case the covariance only relies on the magnitude of the distance, not the direction, making it isotropic).
Intuitively, this covariance matrix encodes that we expect the covariance in temperature between Boston and New York to be much higher than the covariance between Seattle and Miami.
But you can also consider the variation of the difference in temperature between a pair of cities. This is the intuition behind a variogram. The variogram function describes how we expect the value of the field to vary given the two positions. It is formally defined
Also note that this function needs to spit out positive values for all locations .
When the variance between two locations in the process relies only on the distance (and again, we have some mean value) then the process is said to be intrinsically stationary.
And it turns out that the class of second order stationary processes is a subclass of the broader class of intrinsically stationary processes.
We can also relate the concepts of second order stationery covariance functions to intrinsically stationary variograms.
So there you have it – two ways of modeling spatial statistical dependency and how they relate. Noel Cressie and Christopher K. Wikle. Statistics for Spatio-Temporal Data (Chapter 4). Wiley , 2011.
 Luke Bornn, Gavin Shaddick, and James V. Zidek. Modeling Nonstationary Processes Through Dimension Expansion. Journal of the American Statistical Association, March 2012, Vol. 107, No. 497, Theory and Methods.