# Kriging

In statistics, originally in geostatistics, Kriging or Gaussian process regression is a method of interpolation for which the interpolated values are modeled by a Gaussian process governed by prior covariances, as opposed to a piecewise-polynomial spline chosen to optimize smoothness of the fitted values. Under suitable assumptions on the priors, Kriging gives the best linear unbiased prediction of the intermediate values. Interpolating methods based on other criteria such as smoothness need not yield the most likely intermediate values. The method is widely used in the domain of spatial analysis and computer experiments. The technique is also known as Kolmogorov Wiener prediction. Example of one-dimensional data interpolation by kriging, with confidence intervals. Squares indicate the location of the data. The Kriging interpolation, shown in red, runs along the means of the normally distributed confidence intervals shown in gray. The dashed curve shows a spline that while smooth nevertheless departs significantly from the expected intermediate values given by those means.

The theoretical basis for the method was developed by the French mathematician Georges Matheron based on the Master's thesis of Danie G. Krige, the pioneering plotter of distance-weighted average gold grades at the Witwatersrand reef complex in South Africa. Krige sought to estimate the most likely distribution of gold based on samples from a few boreholes. The English verb is to krige and the most common noun is kriging; both are often pronounced with a hard "g", following the pronunciation of the name "Krige".

## Main principles

### Related terms and techniques

The basic idea of Kriging is to predict the value of a function at a given point by computing a weighted average of the known values of the function in the neighborhood of the point. The method is mathematically closely related to regression analysis. Both theories derive a best linear unbiased estimator, based on assumptions on covariances, make use of Gauss-Markov theorem to prove independence of the estimate and error, and make use of very similar formulae. Even so, they are useful in different frameworks: Kriging is made for estimation of a single realization of a random field, while regression models are based on multiple observations of a multivariate data set.

The Kriging estimation may also be seen as a spline in a reproducing kernel Hilbert space, with the reproducing kernel given by the covariance function. The difference with the classical Kriging approach is provided by the interpretation: while the spline is motivated by a minimum norm interpolation based on a Hilbert space structure, Kriging is motivated by an expected squared prediction error based on a stochastic model.

Kriging with polynomial trend surfaces is mathematically identical to generalized least squares polynomial curve fitting.

Kriging can also be understood as a form of Bayesian inference. Kriging starts with a prior distribution over functions. This prior takes the form of a Gaussian process: $N$ samples from a function will be normally distributed, where the covariance between any two samples is the covariance function (or kernel) of the Gaussian process evaluated at the spatial location of two points. A set of values is then observed, each value associated with a spatial location. Now, a new value can be predicted at any new spatial location, by combining the Gaussian prior with a Gaussian likelihood function for each of the observed values. The resulting posterior distribution is also Gaussian, with a mean and covariance that can be simply computed from the observed values, their variance, and the kernel matrix derived from the prior.

### Geostatistical estimator

In geostatistical models, sampled data is interpreted as a result of a random process. The fact that these models incorporate uncertainty in their conceptualization doesn't mean that the phenomenon - the forest, the aquifer, the mineral deposit - has resulted from a random process, but solely allows to build a methodological basis for the spatial inference of quantities in unobserved locations and to the quantification of the uncertainty associated with the estimator.

A stochastic process is simply, in the context of this model, a way to approach the set of data collected from the samples. The first step in geostatistical modulation is the creation of a random process that best describes the set of experimental observed data.

The set of random variables, constitutes a random function of which only one realization is known $z(x_{i})$ - the set of experimental data. With only one realization of each random variable it's theoretically impossible to determine any statistical parameter of the individual variables or the function.

The proposed solution in the geostatistical formalism consists in assuming various degrees of stationarity in the random function, in order to make possible the inference of some statistic values.

For instance, if a workgroup of scientists assumes appropriate, based on the homogeneity of samples in area $A$ where the variable is distributed, the hypothesis that the first moment is stationary (i.e. all random variables have the same mean), then, they are implying that the mean can be estimated by the arithmetic mean of sampled values. Judging a hypothesis like this as appropriate is the same as considering that sample values are sufficiently homogeneous to validate that representativity.

The hypothesis of stationarity related to the second moment is defined in the following way: the correlation between two random variables solely depends on the spatial distance that separates them and is independent of its location:

$C(Z(x_{1}),Z(x_{2}))=C(Z(x_{i}),Z(x_{i}+\mathbf {h} ))=C(\mathbf {h} )$ $\gamma (Z(x_{1}),Z(x_{2}))=\gamma (Z(x_{i}),Z(x_{i}+\mathbf {h} ))=\gamma (\mathbf {h} )$ This hypothesis allows to infer those two measures - the variogram and the covariogram - based on the $N$ samples:

$\gamma (\mathbf {h} )={\frac {1}{2N(\mathbf {h} )}}\sum _{i=1}^{N(\mathbf {h} )}\left(Z(x_{i})-Z(x_{i}+\mathbf {h} )\right)^{2}$ $C(\mathbf {h} )={\frac {1}{N(\mathbf {h} )}}\sum _{i=1}^{N(\mathbf {h} )}\left(Z(x_{i})Z(x_{i}+\mathbf {h} )\right)-m(x_{i})m(x_{i}+\mathbf {h} )$ ### Linear estimation

The weights $w_{i}$ are intended to summarize two extremely important procedures in a spatial inference process:

When calculating the weights $w_{i}$ , there are two objectives in the geostatistical formalism: unbias and minimal variance of estimation.

If the cloud of real values $Z(x_{0})$ is plotted against the estimated values ${\hat {Z}}(x_{0})$ , the criterion for global unbias, intrinsic stationarity or wide sense stationarity of the field, implies that the mean of the estimations must be equal to mean of the real values.

The second criterion says that the mean of the squared deviations $({\hat {Z}}(x)-Z(x))$ must be minimal, which means that when the cloud of estimated values versus the cloud real values is more disperse, the estimator is more imprecise.

## Methods

Depending on the stochastic properties of the random field and the various degrees of stationarity assumed, different methods for calculating the weights can be deducted, i.e. different types of kriging apply. Classical methods are:

### Ordinary kriging

The unknown value $Z(x_{0})$ is interpreted as a random variable located in $x_{0}$ , as well as the values of neighbors samples $Z(x_{i}),i=1,\cdots ,N$ . The estimator ${\hat {Z}}(x_{0})$ is also interpreted as a random variable located in $x_{0}$ , a result of the linear combination of variables.

In order to deduce the kriging system for the assumptions of the model, the following error committed while estimating $Z(x)$ in $x_{0}$ is declared:

$\epsilon (x_{0})={\hat {Z}}(x_{0})-Z(x_{0})={\begin{bmatrix}W^{T}&-1\end{bmatrix}}\cdot {\begin{bmatrix}Z(x_{i})&\cdots &Z(x_{N})&Z(x_{0})\end{bmatrix}}^{T}=\sum _{i=1}^{N}w_{i}(x_{0})\times Z(x_{i})-Z(x_{0})$ The two quality criteria referred to previously can now be expressed in terms of the mean and variance of the new random variable $\epsilon (x_{0})$ :

Lack of bias:

Since the random function is stationary, $E(Z(x_{i}))=E(Z(x_{0}))=m$ , the following constraint is observed:

$E\left(\epsilon (x_{0})\right)=0\Leftrightarrow \sum _{i=1}^{N}w_{i}(x_{0})\times E(Z(x_{i}))-E(Z(x_{0}))=0\Leftrightarrow$ $\Leftrightarrow m\sum _{i=1}^{N}w_{i}(x_{0})-m=0\Leftrightarrow \sum _{i=1}^{N}w_{i}(x_{0})=1\Leftrightarrow \mathbf {1} ^{T}\cdot W=1$ In order to ensure that the model is unbiased, the weights must sum to one.

Minimum Variance:

Two estimators can have $E\left[\epsilon (x_{0})\right]=0$ , but the dispersion around their mean determines the difference between the quality of estimators. To find an estimator with minimum variance, we need to minimize $E\left(\epsilon (x_{0})^{2}\right)$ .

${\begin{array}{rl}Var(\epsilon (x_{0}))&=Var\left({\begin{bmatrix}W^{T}&-1\end{bmatrix}}\cdot {\begin{bmatrix}Z(x_{i})&\cdots &Z(x_{N})&Z(x_{0})\end{bmatrix}}^{T}\right)=\\&{\overset {*}{=}}{\begin{bmatrix}W^{T}&-1\end{bmatrix}}\cdot Var\left({\begin{bmatrix}Z(x_{i})&\cdots &Z(x_{N})&Z(x_{0})\end{bmatrix}}^{T}\right)\cdot {\begin{bmatrix}W\\-1\end{bmatrix}}\end{array}}$ * see covariance matrix for a detailed explanation

$Var(\epsilon (x_{0})){\overset {*}{=}}{\begin{bmatrix}W^{T}&-1\end{bmatrix}}\cdot {\begin{bmatrix}Var_{x_{i}}&Cov_{x_{i}x_{0}}\\Cov_{x_{i}x_{0}}^{T}&Var_{x_{0}}\end{bmatrix}}\cdot {\begin{bmatrix}W\\-1\end{bmatrix}}$ Once defined the covariance model or variogram, $C(\mathbf {h} )$ or $\gamma (\mathbf {h} )$ , valid in all field of analysis of $Z(x)$ , than we can write an expression for the estimation variance of any estimator in function of the covariance between the samples and the covariances between the samples and the point to estimate:

$\left\{{\begin{array}{l}Var(\epsilon (x_{0}))=W^{T}\cdot Var_{x_{i}}\cdot W-Cov_{x_{i}x_{0}}^{T}\cdot W-W^{T}\cdot Cov_{x_{i}x_{0}}+Var_{x_{0}}\\Var(\epsilon (x_{0}))=Cov(0)+\sum _{i}\sum _{j}w_{i}w_{j}Cov(x_{i},x_{j})-2\sum _{i}w_{i}C(x_{i},x_{0})\end{array}}\right.$ Some conclusions can be asserted from this expression. The variance of estimation:

• is not quantifiable to any linear estimator, once the stationarity of the mean and of the spatial covariances, or variograms, are assumed.

#### Kriging system

{\begin{aligned}&{\underset {W}{\operatorname {minimize} }}&&W^{T}\cdot Var_{x_{i}}\cdot W-Cov_{x_{i}x_{0}}^{T}\cdot W-W^{T}\cdot Cov_{x_{i}x_{0}}+Var_{x_{0}}\\&\operatorname {subject\;to} &&\mathbf {1} ^{T}\cdot W=1\end{aligned}} Solving this optimization problem (see Lagrange multipliers) results in the kriging system:

${\begin{bmatrix}{\hat {W}}\\\mu \end{bmatrix}}={\begin{bmatrix}Var_{x_{i}}&\mathbf {1} \\\mathbf {1} ^{T}&0\end{bmatrix}}^{-1}\cdot {\begin{bmatrix}Cov_{x_{i}x_{0}}\\1\end{bmatrix}}={\begin{bmatrix}\gamma (x_{1},x_{1})&\cdots &\gamma (x_{1},x_{n})&1\\\vdots &\ddots &\vdots &\vdots \\\gamma (x_{n},x_{1})&\cdots &\gamma (x_{n},x_{n})&1\\1&\cdots &1&0\end{bmatrix}}^{-1}{\begin{bmatrix}\gamma (x_{1},x^{*})\\\vdots \\\gamma (x_{n},x^{*})\\1\end{bmatrix}}$ the additional parameter $\mu$ is a Lagrange multiplier used in the minimization of the kriging error $\sigma _{k}^{2}(x)$ to honor the unbiasedness condition.

### Simple kriging

Template:Mbox Simple kriging is mathematically the simplest, but the least general. It assumes the expectation of the random field to be known, and relies on a covariance function. However, in most applications neither the expectation nor the covariance are known beforehand.

The practical assumptions for the application of simple kriging are:

#### Kriging system

The kriging weights of simple kriging have no unbiasedness condition and are given by the simple kriging equation system:

${\begin{pmatrix}w_{1}\\\vdots \\w_{n}\end{pmatrix}}={\begin{pmatrix}c(x_{1},x_{1})&\cdots &c(x_{1},x_{n})\\\vdots &\ddots &\vdots \\c(x_{n},x_{1})&\cdots &c(x_{n},x_{n})\end{pmatrix}}^{-1}{\begin{pmatrix}c(x_{1},x_{0})\\\vdots \\c(x_{n},x_{0})\end{pmatrix}}$ #### Estimation

The interpolation by simple kriging is given by:

${\hat {Z}}(x_{0})={\begin{pmatrix}z_{1}\\\vdots \\z_{n}\end{pmatrix}}'{\begin{pmatrix}c(x_{1},x_{1})&\cdots &c(x_{1},x_{n})\\\vdots &\ddots &\vdots \\c(x_{n},x_{1})&\cdots &c(x_{n},x_{n})\end{pmatrix}}^{-1}{\begin{pmatrix}c(x_{1},x_{0})\\\vdots \\c(x_{n},x_{0})\end{pmatrix}}$ The kriging error is given by:

$\mathrm {Var} \left({\hat {Z}}(x_{0})-Z(x_{0})\right)=\underbrace {c(x_{0},x_{0})} _{\mathrm {Var} (Z(x_{0}))}-\underbrace {{\begin{pmatrix}c(x_{1},x_{0})\\\vdots \\c(x_{n},x_{0})\end{pmatrix}}'{\begin{pmatrix}c(x_{1},x_{1})&\cdots &c(x_{1},x_{n})\\\vdots &\ddots &\vdots \\c(x_{n},x_{1})&\cdots &c(x_{n},x_{n})\end{pmatrix}}^{-1}{\begin{pmatrix}c(x_{1},x_{0})\\\vdots \\c(x_{n},x_{0})\end{pmatrix}}} _{\mathrm {Var} ({\hat {Z}}(x_{0}))}$ which leads to the generalised least squares version of the Gauss-Markov theorem (Chiles & Delfiner 1999, p. 159):

$\mathrm {Var} (Z(x_{0}))=\mathrm {Var} ({\hat {Z}}(x_{0}))+\mathrm {Var} \left({\hat {Z}}(x_{0})-Z(x_{0})\right).$ ### Properties

Template:Mbox (Cressie 1993, Chiles&Delfiner 1999, Wackernagel 1995)

## Applications

Template:Mbox Although kriging was developed originally for applications in geostatistics, it is a general method of statistical interpolation that can be applied within any discipline to sampled data from random fields that satisfy the appropriate mathematical assumptions.

To date kriging has been used in a variety of disciplines, including the following:

### Design and analysis of computer experiments

Another very important and rapidly growing field of application, in engineering, is the interpolation of data coming out as response variables of deterministic computer simulations, e.g. finite element method (FEM) simulations. In this case, kriging is used as a metamodeling tool, i.e. a black box model built over a designed set of computer experiments. In many practical engineering problems, such as the design of a metal forming process, a single FEM simulation might be several hours or even a few days long. It is therefore more efficient to design and run a limited number of computer simulations, and then use a kriging interpolator to rapidly predict the response in any other design point. Kriging is therefore used very often as a so-called surrogate model, implemented inside optimization routines.