Simple kriging (source code)

= Simple kriging

<Simple kriging> assumes a known <mean> function. If $m=(m(s_1),\ldots,m(s_n))^T$ and $m_0=m(s_0)$ are known, center the observations, predict the residual, and add back the target <mean>:
$$
\widehat Z_0=m_0+c^T\Sigma^{-1}(z-m),\qquad
s_{\mathrm{SK}}^2=v_0-c^T\Sigma^{-1}c.
$$
For known zero <mean>, these reduce to $c^T\Sigma^{-1}z$ and $v_0-c^T\Sigma^{-1}c$. Completing the <covariance> <quadratic form> gives
$$
v_0-2w^Tc+w^T\Sigma w
=s_{\mathrm{SK}}^2+(w-\Sigma^{-1}c)^T\Sigma(w-\Sigma^{-1}c),
$$
which proves minimum error <variance> among predictors of the form $m_0+w^T(Z-m)$. No sum-to-one constraint is needed: the known <mean> already supplies the offset. In the exponential example from <ordinary kriging>, imposing known zero <mean> gives weights $(0,2/5,2/5)^T$, prediction $2$, and error <variance> $3/5$. The smaller error <variance> uses additional knowledge of the <mean>; it is not a free improvement when the <mean> is unknown.

If $(Z_0,Z)$ has a joint <multivariate normal distribution>, the displayed prediction is exactly $\mathbb E[Z_0\mid Z=z]$, and $s_{\mathrm{SK}}^2$ is its conditional <variance>. A <conditional expectation> minimizes <mean squared error> among all square-integrable functions of the observations. Without a joint <multivariate normal distribution>, <simple kriging> remains the best predictor in the specified affine class, but the <conditional expectation> may be nonlinear and its conditional <variance> may depend on $z$. Thus <Gaussian process regression> and the second-moment <kriging> construction agree under these assumptions, while having different starting points.<Gaussian Processes for Machine Learning by Carl Edward Rasmussen and Christopher K. I. Williams>[chapter 2, equations (2.23)–(2.24) and (2.38)]{ref}