HomeArticlesGeoinformatics

Kriging: Interpolating Space With Honest Uncertainty

Estimate values at unsampled locations by fitting a variogram to your data, then solving a linear system that is unbiased, minimum-variance, and knows exactly how confident it is.

mysimulator teamUpdated June 2026≈ 8 min read▶ Open the simulation

Guessing what lies between the samples

Rain gauges, soil-sample boreholes, ore-grade drill cores, air-quality sensors — real-world measurements almost never cover the ground continuously. Spatial interpolation is the problem of turning a scattered set of point measurements into a continuous estimated surface. The crude approaches are deterministic: nearest neighbour just copies the closest sample, inverse distance weighting blends nearby samples by a fixed power of distance. Both produce a surface, but neither is grounded in how the underlying phenomenon actually varies over space, and neither tells you how much to trust the result away from a sample point.

live demo · a random field interpolated between samples● LIVE

Tobler's law and the variogram

Waldo Tobler's first law of geography states it plainly: everything is related to everything else, but near things are more related than distant things. Kriging turns that intuition into a function. The variogram (or semivariogram) describes how dissimilar two measurements typically become as the distance between them grows:

γ(h) = 0.5 * E[ (Z(x) - Z(x+h))^2 ]      // expected squared difference at lag h

spherical model fit to the empirical curve:
γ(h) = nugget + sill * (1.5*(h/range) - 0.5*(h/range)^3)   for h < range
γ(h) = nugget + sill                                        for h >= range

Three parameters describe the fitted curve. The nugget is the discontinuity at zero separation — measurement noise or genuine micro-scale variability the sampling grid is too coarse to resolve. The sill is the plateau variance the curve settles at once points are far enough apart to be statistically independent. The range is the distance at which that plateau is reached.

Ordinary kriging: the best linear unbiased predictor

Ordinary kriging estimates the value at an unsampled point as a weighted sum of nearby samples, but unlike inverse distance weighting the weights are not chosen by hand — they fall out of a linear system built directly from the fitted variogram, subject to one constraint: the weights must sum to one, which guarantees the estimator is unbiased.

for every sample i, solve:
   Σ_j λ_j * γ(x_i, x_j) + μ = γ(x_i, x0)      // μ = Lagrange multiplier
   Σ_j λ_j = 1                                  // unbiasedness constraint

estimate:  Ẑ(x0) = Σ_j λ_j * Z(x_j)
variance:  σ²(x0) = Σ_j λ_j * γ(x_j, x0) + μ

Among all linear estimators, this choice of weights is the one that minimises the expected squared error — which is exactly what "best linear unbiased predictor" means. With a zero nugget, kriging is also an exact interpolator: at a sample location it returns precisely the measured value. Crucially, the same system also produces the kriging variance, a genuine, spatially varying measure of confidence that grows the further you move from the nearest samples — something inverse distance weighting simply has no mechanism to provide.

The knobs: nugget and range reshape the surface

Raise the nugget relative to the sill and the interpolated surface gets rougher and pulls toward the global mean even close to samples, because the model is being told the data itself is noisy and less trustworthy. Shrink the range and each sample's influence becomes very local, producing a patchy surface that looks close to nearest-neighbour; stretch the range and the surface smooths out, with distant samples pulling weight toward each other and predictions extrapolating further with apparent (but not necessarily justified) confidence.

Where kriging is actually used

The method is named after Danie Krige, a South African mining engineer, and was formalised mathematically by Georges Matheron in the 1960s under the name geostatistics — its first job was estimating ore reserves from a sparse grid of drill holes, where getting the uncertainty right has direct financial consequences. It has since spread to soil science, precision agriculture, environmental pollutant mapping, and climate and rainfall interpolation. There is also a direct line to modern machine learning: ordinary kriging is mathematically identical to Gaussian process regression with a covariance function derived from the variogram — same equations, different vocabulary, developed independently in geostatistics and in statistics decades apart.

Frequently asked questions

What is the difference between kriging and inverse distance weighting?

Kriging derives its weights from the data's actual measured spatial autocorrelation, the variogram, and gives an unbiased, minimum-variance estimate plus a genuine map of uncertainty. Inverse distance weighting simply weights by a fixed power of distance with no statistical justification and produces no error estimate at all.

What do the nugget, sill and range control?

The nugget is the discontinuity or measurement noise seen at zero separation distance. The sill is the plateau variance the variogram reaches once points are far enough apart to be uncorrelated. The range is the distance at which that plateau is reached — beyond it, samples contribute almost nothing to each other's estimate.

Why is kriging called the best linear unbiased predictor?

Among every possible linear combination of the sample values, the kriging weights are the unique choice that makes the expected estimation error zero and simultaneously minimises the variance of that error, given the fitted variogram model — hence BLUP.

Try it live

Everything above runs in your browser — open Spatial Interpolation & Kriging and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Spatial Interpolation & Kriging simulation

What did you find?

Add reproduction steps (optional)