Linear Prediction for Spatial and Spatio-Temporal Fields

36-740, Fall 2026

10 September 2026 (Lecture 6)

\[ \newcommand{\Expect}[1]{\mathbb{E}\left[ #1 \right]} \newcommand{\Var}[1]{\mathrm{Var}\left[ #1 \right]} \newcommand{\SampleVar}[1]{\widehat{\mathrm{Var}}\left[ #1 \right]} \newcommand{\Cov}[1]{\mathrm{Cov}\left[ #1 \right]} \newcommand{\TrueRegFunc}{\mu} \newcommand{\EstRegFunc}{\widehat{\TrueRegFunc}} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator*{\argmin}{argmin} \DeclareMathOperator{\det}{det} \newcommand{\TrueNoise}{\epsilon} \newcommand{\EstNoise}{\widehat{\TrueNoise}} \newcommand{\AutoCov}{\gamma} \newcommand{\LinearExpect}[1]{\mathbb{L}\left[ #1 \right]} \]

In our previous episode

Optimal linear prediction for spatial data

\[\begin{eqnarray} \EstRegFunc(r_0) & = & \alpha + \vec{\beta} \cdot \left[\begin{array}{c} X(r_1) \\ X(r_2) \\ \vdots \\ X(r_n) \end{array}\right]\\ \alpha & = & \Expect{X(r_0)} - \vec{\beta} \cdot \left[\begin{array}{c} \Expect{X(r_1)}\\ \Expect{X(r_2)} \\ \vdots \\ \Expect{X(r_n)}\end{array}\right] ~ \text{(goes away if everything's centered)}\\ \vec{\beta} & = & {\left[\begin{array}{cccc} \Var{X(r_1)} & \Cov{X(r_1), X(r_2)} & \ldots & \Cov{X(r_1), X(r_n)}\\ \Cov{X(r_1), X(r_2)} & \Var{X(r_2)} & \ldots & \Cov{X(r_2), X(r_n)}\\ \vdots & \vdots & \ldots & \vdots\\ \Cov{X(r_1), X(r_n)} & \Cov{X(r_2), X(r_n)} & \ldots & \Var{X(r_n)}\end{array}\right]}^{-1} \left[\begin{array}{c} \Cov{X(r_0), X(r_1)}\\ \Cov{X(r_0), X(r_2)}\\ \vdots \\ \Cov{X(r_0), X(r_n)}\end{array}\right] \end{eqnarray}\]

This should look familiar

What do we need to know?

Expectation values

What about variance and covariance?

\[ \Cov{X(r), X(q)} = \Expect{X(r)X(q)} -\TrueRegFunc(r) \TrueRegFunc(q) = \Expect{(X(r)-\TrueRegFunc(r))(X(q) - \TrueRegFunc(q))} \]

Smoothing for covariance estimation

Some restrictions on \(\Cov{X(r), X(q)}\)

Some restrictions on \(\Cov{X(r), X(q)}\)

Some restrictions on \(\Cov{X(r), X(q)}\)

Estimating a stationary covariance function

Think of the Irish wind data

What about Belfast?

(Why is Belfast not in the data set?)

Try a stationary, isotropic covariance

global.mean <- mean(wind.loc$MeanWind)
distances <- spDists(coordinates(wind.loc), longlat = TRUE)
c.rq <- outer(wind.loc$MeanWind - global.mean, wind.loc$MeanWind - global.mean, "*")
rho.rq <- c.rq/var(wind.loc$MeanWind)

Try a stationary, isotropic covariance

plot(x = as.vector(distances), y = as.vector(rho.rq), xlab = "Distance (km)", ylab = expression((x(r) -
    bar(x))(x(q) - bar(x))/sigma^2))
lines(smooth.spline(x = as.vector(distances), y = as.vector(rho.rq), cv = TRUE))
L.rough <- -log(0.14)/100
curve(exp(-L.rough * x), add = TRUE, col = "blue")
legend("topright", legend = c("Data", "Spline", "Exponential"), pch = c(1, NA, NA),
    lty = c("blank", "solid", "solid"), col = c("black", "black", "blue"))

Try a stationary, isotropic covariance

Kriging

wind.prediction <- function(r, L) {
    fit <- c(fit = NA, se = NA)
    global.mean <- mean(wind.loc$MeanWind)
    global.var <- var(wind.loc$MeanWind)
    distances.to.r <- spDistsN1(pts = coordinates(wind.loc), pt = r, longlat = TRUE)
    distances.among.q <- spDists(coordinates(wind.loc), longlat = TRUE)
    corYZ <- exp(-L * distances.to.r)
    corZ <- exp(-L * distances.among.q)
    Z <- wind.loc$MeanWind
    fit["fit"] <- global.mean + (Z - global.mean) %*% solve(corZ) %*% corYZ
    fit["se"] <- sqrt(global.var - t(corYZ) %*% solve(corZ) %*% corYZ)
    return(fit)
}

wind.prediction(r = as.numeric(belfast.longlat), L = L.rough)
##      fit       se 
## 5.362427 1.358965

Spatio-temporal prediction

Prediction error

\[ Expect{(Y - \LinearExpect{Y|Z})^2} = \Var{Y-\LinearExpect{Y|Z}} = \Var{Y} - \Cov{Y,Z}^T (\Var{Z})^{-1} \Cov{Y,Z} \]

Some historical notes: Krige

Some figures from Krige (1981)

“Typical gold inch-dwt [=concentration] trend surfaces in the Klerksdorp goldfield on the basis of two-dimensional moving averages [= kriging]… Moving averages of \(100 \times 100\) ft areas within a mined-out section of \(500\times 500\) ft” (p. 28, caption of fig. 21a)

Some figures from Krige (1981)

“Illustration of the agreement between auto-covariance patterns of gold values for 25, 50, 100, and 200-ft square ore units for a section of the Hartebeestfontein mine” (p. 23, caption of fig. 18)

Some historical notes: “kriging”, “geostatistics”

Summary

Backup: Estimating the Mean of a Stationary Random Field

Backup: Valid covariance functions

Backup: Varieties of kriging

The geostatistics people distinguished a lot of varieties of kriging:

Backup: Parametric covariance (or correlation) estimation

Backup: Nonlinear least squares

Backup: Nonlinear least squares illustrated

Using optim():

rho.mse <- function(L) {
    mean((rho.rq - exp(-L * distances))^2)
}
L.optim <- optim(par = L.rough, fn = rho.mse, method = "BFGS")
L.optim$par
## [1] 0.02432098

so estimated correlation length is \(41 \mathrm{km}\) rather than initial guess of \(51 \mathrm{km}\)

Backup: Nonlinear least squares illustrated

Using nls():

nls(as.vector(rho.rq) ~ exp(-L * as.vector(distances)), start = list(L = L.rough))
## Nonlinear regression model
##   model: as.vector(rho.rq) ~ exp(-L * as.vector(distances))
##    data: parent.frame()
##       L 
## 0.02428 
##  residual sum-of-squares: 109.6
## 
## Number of iterations to convergence: 5 
## Achieved convergence tolerance: 3.649e-06

Backup: “Variograms”

(There are some situations where \(v(r,s)\) is well-defined but \(\Cov{X(r), X(s)}\) is not, but they are weird)

Backup: Generalized Least Squares and Gauss-Markov

References

Batchelor, G. K. 1996. The Life and Legacy of G. I. Taylor. Cambridge, England: Cambridge University Press.

Gneiting, Tilmann, Marc G. Genton, and Peter Guttorp. 2007. “Geostatistical Space-Time Models, Stationarity, Separability, and Full Symmetry.” In Statistical Methods for Spatio-Temporal Systems, edited by Bärbel Finkenstädt, Leonhard Held, and Valerie Isham, 151–75. Boca Raton, Florida: Chapman; Hall/CRC. https://doi.org/10.1201/9781420011050.

Krige, D. G. 1981. Lognormal-de Wijsian Geostatistics for Ore Evaluation. Second. South African Institute of Mining and Metallurgy Monograph Series. Johannesburg: South African Institute of Mining and Metallurgy. http://www.saimm.co.za/Conferences/Geostatistics/GeostatisticsI.pdf.

Matheron, Georges. 2019. Matheron’s Theory of Regionalised Variables. Edited by Vera Pawlowsky-Glahn and Jean Serra. Oxford: Oxford University Press. https://doi.org/10.1093/oso/9780198835660.001.0001.

Ripley, Brian D. 1981. Spatial Statistics. New York: Wiley. https://doi.org/10.1002/0471725218.

Shalizi, Cosma Rohilla. n.d. Advanced Data Analysis from an Elementary Point of View. Cambridge, England: Cambridge University Press. http://www.stat.cmu.edu/~cshalizi/ADAfaEPoV.

Zimmerman, Dale L., and Noel Cressie. 1992. “Mean Squared Prediction Error in the Spatial Linear Model with Estimated Covariance Parameters.” Annals of the Institute of Statistical Mathematics 44:27–43. https://doi.org/10.1007/BF00048668.