Theory of Kriging

W'ô

Theory of random fields Random functions First-order stationarity Spatial Second-order stationarity Theory of Kriging The intrinsic hypothesis

Ordinary Kriging Optimization criterion D G Rossiter Computing the kriging Computing OK weights Nanjing Normal University, Geographic Sciences Department The OK system W¬'f0ffb Solution of the OK system 30-November-2016 Theory of Kriging

W'ô

Theory of random fields 1 Theory of random fields Random functions First-order Random functions stationarity Spatial covariance First-order stationarity Second-order stationarity Spatial covariance The intrinsic hypothesis Second-order stationarity Ordinary Kriging The intrinsic hypothesis Optimization criterion Computing the kriging variance Computing OK weights 2 Ordinary Kriging The OK system Optimization criterion Solution of the OK system Computing the kriging variance Computing OK weights The OK system Solution of the OK system Theory of Kriging Overview W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order • Kriging is a Best Linear Unbiased Predictor (BLUP) of the stationarity The intrinsic value of an attribute at an unsampled location. hypothesis

Ordinary • “Best” is defined as the lowest prediction variance Kriging Optimization among all possible combination of weights for the criterion Computing the weighted sum prediction. kriging variance Computing OK • Derivation of the weights from this optimization weights 1 The OK system criterion depends on a theory of random fields. Solution of the OK system • This is a model of how the reality that we observe, and which we want to predict, is structured. • The model represents a random process with spatial .

12nd section of this lecture Theory of Kriging Theory of random fields W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis

Ordinary Presentation is based on R. Webster and M. Oliver, 2001 Kriging Optimization for environmental scientists, Chichester etc.: John criterion Computing the Wiley & Sons, Ltd.; ISBN 0-471-96553-7 kriging variance Computing OK weights Notation: A point in space of any dimension is symbolized by a The OK system Solution of the OK bold-face letter, e.g. x. In 2D this is (x , x ). system 1 2 Theory of Kriging Theory of random fields – key idea W'ô

Theory of random fields Random functions First-order 1 Key idea: The observed attribute values are only one of stationarity Spatial covariance many possible realisations of a random process (also Second-order stationarity called a “stochastic” process) The intrinsic hypothesis 2 This random processes is spatially auto-correlated , so Ordinary Kriging that attribute values are somewhat dependent. Optimization criterion 3 At each point x, an observed value z is one possiblility of Computing the kriging variance a Z(x) Computing OK weights The OK system 4 There is only one reality (which is sampled), but it is one Solution of the OK system realisation of a process that could have produced many realities. µ and variance σ 2 etc.

5 Cumulative distribution (CDF): F{Z(x; z)} = Pr[Z(x ≤ zc)] 6 the probability Pr governs the random process; this is where we can model spatial dependence Theory of Kriging Random functions W'ô

Theory of random fields Random functions First-order stationarity • Each point has its own random process, but these all have Spatial covariance Second-order the same form (same kind of ) stationarity The intrinsic hypothesis • However, there may be spatial dependence among Ordinary points, which are therefore not independent Kriging Optimization • As a whole, they make up a over the criterion Computing the whole field R kriging variance Computing OK • i.e., the observed values are assumed to result from some weights The OK system random process but one that respects certain Solution of the OK system restrictions, in particular spatial dependence • The set of values of the random variable in the spatial field: Z = {Z(x), ∀x ∈ R} is called a regionalized variable • This variable is doubly infinite: (1) number of points; (2) possible values at each point Theory of Kriging Simulated fields W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic • Equally probable realizations of the same hypothesis spatially-correlated random process Ordinary Kriging Optimization • The fields match an assumed model criterion Computing the • These are equally-probable alternate realities, assuming kriging variance Computing OK the given process weights The OK system Solution of the OK • We can determine which is most likely to be the one reality system we have by . • Next pages: simulated fields on a 256x256 grid Theory of Four realizations of the same field – before sampling Kriging

W'ô Unconditional simulations, Co variogram model

sim3 sim4 25 Theory of random fields Random functions First-order stationarity Spatial covariance 20 Second-order stationarity The intrinsic hypothesis

Ordinary 15 Kriging Optimization criterion Computing the kriging variance Computing OK 10 weights sim1 sim2 The OK system Solution of the OK system

5

0

−5 Theory of Four realizations of the same field – after sampling Kriging

W'ô Conditional simulations, Jura Co (ppm), OK

sim3 sim4 25 ● ● Theory of ● ● ● ● random fields ● ● ● ● ● ● ● ● Random functions ●● ● ●● ●

● ● ● ● ● ● ● ●● ● ●● ● ● ● ● First-order ● ● ● ●

● ● stationarity ● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●●●● ● ● ●●●● ● ● 20 Spatial covariance ● ● ● ● ● ●● ●● ● ●● ●● ●● ● ●● ● ●●● ●● ●●● ●● Second-order ● ● ● ● ● ● ● ● ● ● ● ● ● ● stationarity ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● The intrinsic ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● hypothesis ●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● Ordinary ● ● ● ● ● ● ● ● 15 ● ● ●● ● ● ● ●● ● ● ●● ●●● ● ● ●● ●●● ● ● ● ● ● Kriging ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Optimization ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● criterion ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● Computing the ● ● ● ● ● ● ● ● ● ● kriging variance ● ● ● ● ● ● ● ● ● ● Computing OK sim1 sim2 10 weights ● ● ● ● The OK system ● ● ● ●

● ● ● ● Solution of the OK ● ● system ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●

● ● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● 5 ●●● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●● ●● ● ●● ● ●●● ●● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●●● ● ● ●● ●●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −5 Theory of Fields with same variogram parameters, different models Kriging

W'ô sim.sph sim.pen Theory of random fields Random functions 20 First-order stationarity Spatial covariance Second-order stationarity The intrinsic 15 hypothesis

Ordinary Kriging Optimization criterion Computing the 10 kriging variance Computing OK sim.exp sim.gau weights The OK system Solution of the OK system 5

0

−5 Theory of Fields with same model, different variogram parameters Kriging

W'ô sim.sph.0 sim.sph.20 25 Theory of random fields Random functions First-order 20 stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis 15

Ordinary Kriging Optimization criterion 10 Computing the kriging variance Computing OK sim.sph.40 sim.sph.60 weights The OK system Solution of the OK 5 system

0

−5 Theory of Kriging W'ô Uncorrelated field with first-order stationarity (same expected

Theory of value everywhere) random fields Random functions Corresponds to pure “nugget” variogram model. First-order stationarity Spatial covariance white noise Second-order stationarity 8 The intrinsic hypothesis 6 Ordinary Kriging 4 Optimization criterion

Computing the 2 kriging variance Computing OK weights 0 The OK system Solution of the OK system −2

−4

−6

−8 Theory of Kriging First-order stationarity W'ô

Theory of random fields Random functions • First-order Problem: We have no way to estimate the expected stationarity Spatial covariance values of the random process at each location µ(x) ... Second-order stationarity • . . . since we only have one realisation (what we actually The intrinsic hypothesis measure), rather than the whole set of realisations that Ordinary could have been produced by the random process. Kriging Optimization criterion • Solution: assume that the expected values at all Computing the kriging variance locations in the field are the same: Computing OK weights The OK system x = ∀x ∈ Solution of the OK E[Z( i)] µ, i R system • This is called first-order stationarity of the random process • so µ is not a function of position x. • Then we can estimate the (common) from the sample values and their spatial structure. Theory of Kriging Problems with first-order stationarity W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance • It is often not plausible: Second-order stationarity 1 We observe the value to be different in several The intrinsic hypothesis regions (strata)

Ordinary 2 We observe a regional trend Kriging Optimization • In both cases there is a process that is not stationary criterion Computing the which we can model: kriging variance Computing OK 1 model the strata or trend, then the residuals may be weights The OK system first-order stationary → Kriging with External Drift or Solution of the OK system Regression Kriging) 2 model a varying mean along with the local structure → Universal Kriging • Another solution: study the differences between values, not the values themselves, and in a “small” region. Theory of Kriging Spatial covariance W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity • Key idea: nearby observations may be correlated. The intrinsic hypothesis • Since it’s the same variable, this is autocorrelation Ordinary Kriging • There is only one realisation of the random field per Optimization criterion point, but each point is a different realisation, so in Computing the kriging variance some sense they are different variables, which then have a Computing OK weights covariance. The OK system Solution of the OK • Key Insight: system Under certain assumptions (see below), this covariance can be considered to depend only on the separation (and possibly the direction) between the points. Theory of Kriging Covariance W'ô

Theory of random fields Random functions First-order • Recall from non-spatial : the sample covariance stationarity Spatial covariance between two variables z1 and z2 observed at n points is: Second-order stationarity The intrinsic n hypothesis 1 X Cb(z1, z2) = (z1 −Ψz1) · (z2 −Ψz2) Ordinary n i i Kriging i=1 Optimization criterion Computing the • Spatial version: there is only one variable x: kriging variance Computing OK weights The OK system Cb(x1, x2) = E[{Z(x1) − µ(x1)}·{Z(x2) − µ(x2)}] Solution of the OK system • Because of first-order stationarity, the expected values are the same, so:

Cb(x1, x2) = E[{Z(x1) − µ}·{Z(x2) − µ}] Theory of Kriging Second-order stationarity (1) – At one point W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance • Problem: The covariance at one point is its variance: Second-order stationarity The intrinsic 2 2 hypothesis σ = E[{Z(xi) − µ} ] Ordinary Kriging Optimization • This can not be estimated from one sample of the many criterion Computing the possible realisations. kriging variance Computing OK • weights Solution: assume that the variance is the same finite The OK system value at all points. Solution of the OK system • Then we can estimate the variance of the process from the sample by considering all the random variables (at different points) together. • This assumption is part of second-order stationarity Theory of Kriging Second-order stationarity (2) – Over the spatial W'ô field Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis • Problem: The covariance equation as written is between Ordinary all the points in the field. It is huge! And again, there is no Kriging Optimization way to estimate these from just one point pair per variable criterion Computing the pair. kriging variance Computing OK • weights Solution (the key insight): Assume that the covariance The OK system between points depends only on their separation Solution of the OK system • Then we can estimate their covariance from a large number of sample pairs, all separated by (approximately) the same separation vector h (distance, possibly with direction). Theory of Kriging Derivation of the W'ô

Theory of random fields • Autocovariance (‘auto’ = same regionalized variable), at a Random functions First-order separation h: stationarity Spatial covariance Second-order stationarity C[Z(x), Z(x + h)] = E[{Z(x) − µ}·{Z(x + h) − µ}] The intrinsic hypothesis = E[{Z(x)}·{Z(x + h)} − µ2] Ordinary Kriging ≡ C(h) Optimization criterion Computing the kriging variance • Autocorrelation: Autocovariance normalized by total Computing OK 2 weights variance σ , which is the covariance at a point: The OK system Solution of the OK system ρ(h) = C(h)/C(0)

• Semivariance: deviation of covariance at some separation from total variance:

γ(h) = C(0) − C(h) Theory of Kriging Characteristics of Spatial Correlation functions W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic • = − hypothesis symmetric: C(h) C( h) etc. Ordinary • of ρ(h) ∈ [−1 ··· 1] Kriging Optimization criterion • Positive (covariance) or negative (variogram) semi-definite Computing the kriging variance matrices; this restricts the choice of models Computing OK weights • Continuity, especially at 0. But this is often not observed, The OK system Solution of the OK the “nugget” effect. system • Solved by adding a nugget structure to the spatial correlation model. Theory of Kriging Problems with second-order stationarity W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity • It assumes the existence of a covariance and, so, a finite The intrinsic hypothesis variance Var(Z(x)) = C(0) Ordinary Kriging • This is often not plausible; in particular the covariance Optimization criterion often increases without bound as the area increases. Computing the kriging variance • Solutions Computing OK weights 1 Study the differences between values, not the values The OK system Solution of the OK themselves, and in a “small” region; then he system may be bounded → the intrinsic hypothesis (see next); 2 So, model the semi-variance, not co-variance. 3 This is a weaker assumption. Theory of Kriging The Intrinsic Hypothesis W'ô

Theory of random fields Random functions First-order • Replace mean values Z(x) with mean differences, which stationarity Spatial covariance are the same over the whole random field, at least within Second-order stationarity some ‘small’ separation h. Then the expected value is 0: The intrinsic hypothesis

Ordinary E[Z(x) − Z(x + h)] = 0 Kriging Optimization criterion • Replace covariance of values with of Computing the kriging variance differences: Computing OK weights The OK system 2 Solution of the OK Var[Z(x) − Z(x + h)] = E[{Z(x) − Z(x + h)} ] = 2γ(h) system • The equations only involve the difference in values at a separation, not the values, so the necessary assumption of finite variance need only be assumed for the differences, a less stringent condition. • This is the intrinsic hypothesis. Theory of Kriging Using the empirical variogram to model the W'ô random process Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis Ordinary • The semivariance of the separation vector γ(h) is now Kriging Optimization given as the estimate of covariance in the spatial field. criterion Computing the kriging variance • It models the spatially-correlated component of the Computing OK weights regionalized variable The OK system Solution of the OK • We must go from the empirical variogram to a system variogram model in order to be able to model the random process at any separation. Theory of Kriging Ordinary Kriging W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis In this section we: Ordinary Kriging 1 Present OK and its optimization criterion; Optimization criterion 2 Derive a computable form of the prediction variance; Computing the kriging variance Computing OK 3 Derive the OK system of equations; weights The OK system 4 Show the solution to the OK syste, Solution of the OK system This all depends on the theory of random fields, Theory of Kriging Ordinary Kriging (OK) – Overview W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance • A linear predictor of the value at an unknown location, Second-order stationarity The intrinsic given the locations of a set of points and their known hypothesis values. Ordinary Kriging • The linear predictor is a weighted sum of the known Optimization criterion values. Computing the kriging variance Computing OK • The weights are based on a model of spatial weights The OK system autocorrelation between the known values. Solution of the OK system • This model is of the assumed spatial autocorrelated random process that produced a random field. • We have observed the values of some attribute at some locations in this random field, we want to predict others. Theory of Kriging OK as a weighted sum W'ô

Theory of random fields Random functions • The estimated value z at a point x0 is predicted as the First-order b stationarity weighted average of the values at the observed points xi: Spatial covariance Second-order stationarity N The intrinsic X hypothesis zb(x0) = λiz(xi) Ordinary i=1 Kriging Optimization criterion • Computing the The weights λi assigned to the observed points must sum kriging variance Computing OK to 1: weights N The OK system X Solution of the OK λi = 1 system i=1 • Therefore, the prediction is unbiased with respect to the underlying random function Z:

E[Zb(x0) − Z(x0)] = 0 Theory of Kriging What makes it “Ordinary” Kriging? W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order • The expected value (mean) is unknown, and must be stationarity The intrinsic estimated from the sample hypothesis • Ordinary If the mean is known we use Simple Kriging (SK) Kriging Optimization • There is no regional trend criterion Computing the • If so we use Universal Kriging (UK). kriging variance Computing OK • There is no feature-space predictor, i.e. one of more weights The OK system other attributes, known at both the observation and Solution of the OK system prediction points, that helps explain the attribute of interest • If so we use Kriging with External Drift (KED) or Regression Kriging (RK). Theory of Kriging Weighted-sum linear predictors W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance • There are many of these! The only restriction is Second-order PN stationarity i=1 λi = 1 The intrinsic hypothesis • All weight to closest observation (nearest-neighbour) Ordinary λ = 1, λ = 0. Kriging i j6=i Optimization • Average of points within some specified distance (average criterion Computing the in radius) kriging variance Computing OK • Average of some number of nearest points weights The OK system • Inverse distance-weighted averages within radius or some Solution of the OK system specified number • declustered versions of these • kriging: weights derived from the kriging equations • Which is “optimal”? • To decide, we need an optimization criterion. Theory of Kriging Optimization criterion W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis Ordinary • “Optimal” depends on some objective function which can Kriging Optimization be minimized with the best weights; criterion Computing the kriging variance • We choose the variance of the prediction as the Computing OK weights objective function; i.e. we want to minimize the The OK system Solution of the OK uncertainty of the prediction. system Theory of Kriging Prediction Variance W'ô

Theory of random fields Random functions First-order For any predictor (not just the kriging predictor): stationarity Spatial covariance • The prediction z(x ) at a given location x may be Second-order b 0 0 stationarity compared to the true value z(x ); note the “hat” symbol to The intrinsic 0 hypothesis indicate an estimated value rather than a measured one. Ordinary Kriging • Even though we don’t know the true value, we can write Optimization criterion the expression for the prediction variance Computing the kriging variance Computing OK • This is defined as the expected value of the squared weights The OK system difference between the estimate and the (unknown) true Solution of the OK system value:   2  2 σ (Z(x0)) ≡ E Zb(x0) − Z(x0)

• If we can express this in some computable form (i.e. without the unknown true value) we can use it as an optimality criterion Theory of Kriging Derivation of the prediction variance W'ô

Theory of (Based on P K Kitanidis, Introduction to geostatistics: random fields Random functions applications to hydrogeology, Cambridge University Press, First-order stationarity 1997, ISBN 0521583128; §3.9) Spatial covariance Second-order 1 In OK, the estimated value is a linear combination of stationarity The intrinsic values x , with weights λ derived from the kriging hypothesis i i

Ordinary system: Kriging N Optimization X criterion z(x0) = λiz(xi) Computing the b kriging variance i=1 Computing OK weights 2 The OK system Kriging variance: Solution of the OK system   2  2 σ (Z(x0)) ≡ E Zb(x0) − Z(x0)

3 Re-write the kriging variance with the weighted linear sum:

 N  2  X 2 σ (Z(x0)) = E λiz(xi) − Z(x0) i=1 Theory of Kriging Expanding into parts W'ô

Theory of random fields Random functions First-order 4 Add and subtract the unknown mean µ: stationarity Spatial covariance Second-order  N  stationarity 2  X 2 The intrinsic σ (z(x0)) = E λi(z(xi) − µ) − (Z(x0) − µ) hypothesis i=1 Ordinary Kriging Optimization 5 Expand the square: criterion Computing the kriging variance N Computing OK h X 2 weights 2 = −  The OK system σ (Z(x0)) E λiz(xi) µ Solution of the OK i=1 system N X −2 λi(z(xi) − µ)(Z(x0) − µ) i=1 2i +(Z(x0) − µ) Theory of Kriging Bring expectations into each term W'ô

Theory of random fields 6 Replace the squared single summation (first term) by a Random functions First-order double summation, i.e. with separate indices for the two stationarity Spatial covariance parts of the square (two observation points): Second-order stationarity The intrinsic N N N hypothesis X 2 X X λiz(xi) − µ = λiλj(z(xi) − µ)(z(xj) − µ) Ordinary Kriging i=1 i=1 j=1 Optimization criterion Computing the 2 kriging variance 7 Bring the expectation into each term : Computing OK weights The OK system N N Solution of the OK 2 X X   system σ (Z(x0)) = λiλjE (z(xi) − µ)(z(xj) − µ) i=1 j=1 N X   −2 λiE (z(xi) − µ)(Z(x0) − µ) i=1  2 +E (Z(x0) − µ)

2expectation of a sum is the sum of expectations Theory of Kriging From expectations to covariances W'ô

Theory of random fields 8 The three expectations in the previous expression are the Random functions First-order definitions of covariance or variance: stationarity   Spatial covariance 1 E (z(xi) − µ)(z(xj) − µ) : covariance between two Second-order observation points stationarity   The intrinsic 2 E (z(x ) − µ)(Z(x ) − µ) : covariance between one hypothesis i 0

Ordinary observation point and the prediction point Kriging  2 3 E (Z(x0) − µ) : variance at the prediction point Optimization criterion Computing the 9 So, replace the expectations with covariances and kriging variance Computing OK variances: weights The OK system Solution of the OK N N system 2 X X σ (Z(x0)) = λiλjCov(z(xi), z(xj)) i=1 j=1 N X −2 λiCov(z(xi), Z(x0)) i=1

+Var(Z(x0)) Theory of Kriging How can we evaluate this expression? W'ô

Theory of random fields Random functions First-order stationarity • Problem 1: how do we know the covariances between Spatial covariance Second-order any two points? stationarity The intrinsic • hypothesis Answer: by applying a covariance function which only

Ordinary depends on spatial separation between them. Kriging Optimization • Problem 2: how do we find the correct covariance criterion Computing the function? kriging variance Computing OK weights • Answer: by fitting a variogram model to the empirical The OK system Solution of the OK variogram system • Problem 3: how do we know the variance at any point? • Answer: The actual value doesn’t matter • it will be eliminated in the following algebra . . . • . . . but it must be the same at all points • this is the assumption of second-order stationarity. Theory of Kriging Stationarity (1) W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order • This is a term for restrictions on the nature of spatial stationarity The intrinsic variation that are required for OK to be correct hypothesis

Ordinary • First-order stationarity: the expected values (mean of the Kriging Optimization random function) at all locations in the random field are criterion Computing the the same: kriging variance Computing OK E[Z(xi)] = µ, ∀xi ∈ R weights The OK system • Solution of the OK Second-order stationarity: system 1 The variance at any point is finite and the same at all locations in the field 2 The covariance structure depends only on separation between point pairs Theory of Kriging Stationarity (2) W'ô

Theory of random fields Random functions First-order • The concept of stationarity is often confusing, because stationarity Spatial covariance stationarity refers to expected values, variances, or Second-order stationarity co-variances, rather than observed values. The intrinsic hypothesis • Of course the actual values change over the field! That is Ordinary Kriging exactly what we want to use to predict at unobserved Optimization criterion points. Computing the kriging variance • First-order stationarity just says that before we sampled, Computing OK weights The OK system the expected value at all locations was the same. Solution of the OK system • That is, we assume the values result from a spatially-correlated process with a constant mean – not constant values. • Once we have some observation values, these influence the probability of finding values at other points, because of spatial covariance. Theory of Kriging Unbiasedness W'ô

Theory of random fields Random functions • An unbiased estimate is one where the expectation of the First-order stationarity estimate equals the expectation of the true (unknown) Spatial covariance Second-order value: stationarity     The intrinsic E z(x ≡ E Z(x ) = µ hypothesis b 0 0 Ordinary Kriging   Optimization • We will estimate E z(x as a weighted sum: criterion b 0 Computing the kriging variance N N N Computing OK   X   X X weights E z(x = λ E z(x ) = λ µ = µ λ The OK system b 0 i i i i Solution of the OK i=1 i=1 i=1 system   • Since E zb(x0) = µ (unbiasedness), we must have

N X λi = 1 i=1 This is a constraint in the kriging system. Theory of Kriging From point-pairs to separation vectors W'ô

Theory of random fields Random functions First-order stationarity • As written above, the covariances between all point-pairs Spatial covariance Second-order must be determined separately, and since there is only stationarity The intrinsic one realization of the random field, it’s imposible to know hypothesis

Ordinary these from the observations. Kriging Optimization • However, because of second-order stationarity, we can criterion Computing the assume that the covariances between any two points kriging variance Computing OK depend only on their separation and a single covariance weights The OK system function. Solution of the OK system • So rather than try to compute all the covariances, we just need to know this function, then we can apply it to any point-pair, just by knowing their separation and this function. • So, OK is only as good as the covariance model! Theory of Kriging Replace point-pairs with separation vectors W'ô

Theory of random fields Random functions Continuing the derivation of the OK equations: First-order stationarity 10 Substitute the covariance function of separationh into Spatial covariance Second-order the expression: stationarity The intrinsic hypothesis N N Ordinary 2 X X Kriging σ (Z(x0)) = λiλjCov(h(i, j)) Optimization i=1 j=1 criterion Computing the N kriging variance X Computing OK weights −2 λiCov(h(i, 0)) The OK system i=1 Solution of the OK system +Cov(0)

• h(i, 0) is the separation between the observation point xI and the point to be predicted x0. • h(i, j) is the separation between two observation points xi and xj. • Cov(0) is the variance of the random field at a point Theory of Kriging From covariances to semivariances W'ô

Theory of random fields 11 Replace covariances by semivariances, using the relation Random functions First-order Cov(h) = Cov(0) − γ(h): stationarity Spatial covariance Second-order N N N stationarity 2 X X X The intrinsic σ (Z(x )) = − λ λ γ(h(i, j)) + 2 λ γ(h(i, 0)) hypothesis 0 i j i i=1 j=1 i=1 Ordinary Kriging Optimization criterion Replacing covariances by semivariances changes the sign. Computing the kriging variance Computing OK weights • First term: depends on the covariance structure of the The OK system Solution of the OK known points; the greater the product of the two weights system for a given semivariance, the lower the prediction variance (note − sign) • Second term: depends on the covariance between the point to be predicted and the known points

• This is now a computable expression for the kriging variance at any point x0, given the locations of the observation points xi, once the weights λi are known. Theory of Kriging Computing the weights W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic hypothesis Ordinary • Q: How do we compute the weights λ to predict at a Kriging Optimization given point? criterion Computing the kriging variance • A: We compute these weights for each point to be Computing OK weights predicted, by an optimization criterion, which in OK is The OK system Solution of the OK minimizing the kriging variance. system Theory of Kriging Objective function (1): Unconstrained W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity • In a minimization problem, we must define an objective The intrinsic hypothesis function f to be minimized. In this case, it is the kriging Ordinary Kriging variance in terms of the N weights λi: Optimization criterion Computing the N N N kriging variance X X X Computing OK f (λ) = 2 λiγ(xi, x0) − λiλjγ(xi, xj) weights The OK system i=1 i=1 j=1 Solution of the OK system • This expression is unbounded and can be trivially solved by setting all weights to 0. We must add another constraint to bound it. Theory of Kriging Objective function (2): Constrained W'ô

Theory of • The added constraint is unbiasedness: the weights must random fields Random functions sum to 1. First-order stationarity • This is added as term in the function to be optimized, Spatial covariance Second-order along with a new argument to the function, the LaGrange stationarity The intrinsic hypothesis multipler ψ

Ordinary Kriging Optimization criterion N Computing the X kriging variance f (λ, ψ) = 2 λiγ(xi, x0) Computing OK i=1 weights The OK system N N Solution of the OK X X system − λiλjγ(xi, xj) i=1 j=1  N  X  −2ψ λi − 1 i=1 

• The last term ≡ 0, i.e. the prediction is unbiased; ψ must be added as a variable so there is one variable per equation Theory of Kriging Minimization W'ô

Theory of random fields Random functions • Minimize by setting all N + 1 partial derivatives to zero First-order stationarity (N prediction points; 1 constraint): Spatial covariance Second-order stationarity ∂f (λi, ψ) The intrinsic = 0, ∀i hypothesis ∂λi Ordinary Kriging ∂f (λi, ψ) Optimization = 0 criterion ∂ψ Computing the kriging variance Computing OK weights The OK system • In the differential equation with respect to ψ, all the λ are Solution of the OK system constants, so the first two terms differentiate to 0; in the last term the ψ differentiates to 1 and we are left with the unbiasedness condition:

N X λi = 1 i=1 Theory of Kriging The Ordinary Kriging system W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity The intrinsic • In addition to unbiasedness, the partial derivatives with hypothesis respect to the λ give N equations (one for each λ ) in Ordinary i i Kriging N + 1 unknowns (the λi plus the LaGrange multiplier ψ): Optimization criterion Computing the kriging variance N Computing OK X weights λjγ(xi, xj) + ψ = γ(xi, x0), ∀i The OK system j=1 Solution of the OK system • This is now a system of N + 1 equations in N + 1 unknowns and can be solved by linear algebra. Theory of Kriging Solving the OK system W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity 1 For the system as a whole: compute the semivariances The intrinsic hypothesis between all pairs of observed points γ(xi, xj) from their Ordinary separation, according to the variogram model Kriging Optimization 2 At each point x0 to be predicted: criterion Computing the 1 Compute the semivariances x x from the separation kriging variance γ( i, 0) Computing OK between the point and the observed values, according to weights The OK system the variogram model Solution of the OK system 2 Solve simultaneously for the weights and multiplier 3 Compute the predicted value as the weighted average of the observed values, using the computed weights 4 Compute the kriging variance. Theory of Kriging Matrix form of the OK system W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Aλ = b Second-order stationarity The intrinsic hypothesis   Ordinary γ(x1, x1) γ(x1, x2) ··· γ(x1, xN) 1 Kriging  γ(x , x ) γ(x , x ) ··· γ(x , x ) 1  Optimization  2 1 2 2 2 N  criterion  . . . .  Computing the A =  . . . .  kriging variance  . . ··· . .  Computing OK   weights  γ(xN, x1) γ(xN, x2) ··· γ(xN, xN) 1  The OK system Solution of the OK 1 1 ··· 1 0 system     λ1 γ(x1, x0)  λ   γ(x , x )   2   2 0   .   .  λ =  .  b =  .   .   .       λN   γ(xN, x0)  ψ 1 Theory of Kriging Inside the OK Matrices W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order The block matrix notation shows the semivariances and stationarity The intrinsic LaGrange multiplier explicitly: hypothesis Ordinary ! Kriging Γ 1 Optimization A = T criterion 1 0 Computing the kriging variance " # Computing OK weights λ = Λ The OK system ψ Solution of the OK system " # b = Γ0 1 Theory of Kriging Solution of the OK system W'ô

Theory of random fields Random functions • This is a system of N + 1 equations in N + 1 unknowns, so First-order stationarity can be solved if A is positive definite; this is guaranteed Spatial covariance Second-order by using authorized models: stationarity The intrinsic hypothesis λ = A−1b Ordinary Kriging Optimization criterion • Predict at a point x0, using the weights: Computing the kriging variance Computing OK N weights X The OK system Zb(x0) = λiz(xi) Solution of the OK system i=1

• The kriging variance at a point is:

2 T σb (x0) = b λ

• The last element of λ is ψ, which depends on covariance structure of the observed points. Theory of Kriging End W'ô

Theory of random fields Random functions First-order stationarity Spatial covariance Second-order stationarity Key points to remember about OK: The intrinsic hypothesis

Ordinary 1 It depends on the theory of random fields. Kriging st nd Optimization 2 It requires the assumption of 1 and 2 order criterion Computing the stationarity kriging variance Computing OK weights 3 Computations are based on a model of spatial The OK system autocorrelation Solution of the OK system 4 Its prediction is the Best Linear Unbiased Predictor (BLUP), if “best” “lowest prediction variance”.