# How Krige and Variogram work

Kriging is an advanced geostatistical procedure that generates an estimated surface from a scattered set of points with z-values. Kriging in ArcObjects has two methods: Krige and Variogram. The difference between them is they allow different levels of control over the operation.

Kriging is a complex procedure that requires greater knowledge about spatial statistics than can be conveyed in this command reference. Before using the kriging methods, you should have a thorough understanding of the fundamentals of kriging and have assessed the appropriateness of your data for modeling with this technique. If you do not have a good understanding of this procedure, it is strongly recommended that you review some of the references listed at the end of this command reference.

Kriging is based on the regionalized variable theory that assumes that the spatial variation in the phenomenon represented by the z-values is statistically homogeneous throughout the surface (for example, the same pattern of variation can be observed at all locations on the surface). This hypothesis of spatial homogeneity is fundamental to the regionalized variable theory.

Point sets that are known to have anomalous pits or spikes, or abrupt changes that might be represented by break lines in a TIN, are not appropriate for the kriging technique. In some cases, the data can be pre-stratified into regions of uniform surface behavior for separate analysis.

The spatial variation is quantified by the semivariogram. The semivariogram is estimated by the sample semivariogram, which is computed from the input point dataset. The value of the sample semivariogram for a separation distance of h (referred to as the lag) is the average squared difference in z-value between pairs of input sample points separated by h. The sample semivariogram is calculated from the sample data with the equation:

where n is the number of pairs of sample points separated by the distance h.

Below is an example of a typical semivariogram:

There are several important features worth noting in the plot of the sample semivariogram. At relatively short lag distances of h, the semivariance is small but increases with the distance between the pairs of sample points. At a distance referred to as the range, the semivariance levels off to a relatively constant value referred to as the sill. This implies that beyond this range distance, the variation in z-values is no longer spatially correlated. Within the range, the z-value variation is smaller when the pairs of sample points are closer together.

The extent of the x-axis of the semivariogram is determined by the distance between the most widely separated pair of points in the input sample data. The maximum distance separating the pairs of points used to fit the mathematical function is determined by {radius}.

Kriging offers two types of surface estimators: Ordinary Kriging and Universal Kriging. Ordinary Kriging is represented by the Spherical, Circular, Exponential, Gaussian, and Linear types. With these options, Kriging uses the mathematical function specified with the semiVariogramType argument to fit a line or curve to the semivariance data in the semivariogram. Ordinary Kriging assumes that the variation in z-values is free of any structural component (drift). These five models are provided to ensure that the necessary conditions of the variogram model are satisfied. These methods and conditions are discussed in McBratney and Webster (1986).

The variance is calculated based on the average variance of all point pairs within each interval of the cell size. The variogram is then fitted to the variance points using the Levenberg–Marquardt Method (Press et al., 1988) of nonlinear least squares approximation. A minimum of three points (a variance value at three distances) is required for the fit.

By increasing the cell size, you will increase the number of sample points per cell size interval, thereby providing enough data points to estimate the semivariogram. Once the semivariogram is estimated, a smaller cell size can be used in creating the actual output raster.

In some cases, you may suspect that the spatial variation in z-values in the data contains local trends. Some researchers have discovered that the presence of locally changing linear drift in the data is indicated when the semivariogram has a gently parabolic concave-upward shape near the origin. Universal Kriging, represented by the Universal1 and Universal2 methods, assumes that the spatial variation across the surface also has a structural component referred to as drift. Drift is a systematic change in the z-values in a particular direction.

Universal Kriging assumes that the spatial variation in z-values is the sum of three components: a structural component (drift), a random but spatially correlated component, and random noise representing the residual error. The structural component represents a constant trend over the surface. The random noise is assumed to be spatially independent and have a normal distribution. Once the structural effects have been accounted for, the remaining variation is spatially homogeneous such that the z-value difference between input sample points is merely a function of the distance between them as with Ordinary Kriging.

The Universal1 option uses a linear function to model the drift. The Universal2 option uses a quadratic equation to model the drift. Both methods use the linear technique to model the remaining semivariance. The Radius argument is used to select the number of sample pairs analyzed for each output raster cell. The number of sample points must be large enough to allow the drift to be properly calculated. When specifying the radius, choose a distance that is within the well-correlated portions of the range.

### General issues for using Krige and Variogram

Here are some general issues when performing kriging:

• Make an assessment of the appropriateness of your data for use with the kriging technique.
• Use with several different surface estimators that approximate your data.
• Examine the outSemiVariance in ArcMap. Click the ArcGIS Spatial Analyst drop-down menu, point to Surface Analysis, and click Contour to create contours of the variance. Look for areas where the selected model has high variance values. More sample points may be needed in these locations.
• If you think your data has a local trend, use the Universal1 or Universal2 estimator and generate contours on the variance output. Repeat the process using differently sized neighborhoods with both methods and observe the changes in the variance. Choose the parameters that yield the best results.

### Mathematical models

Below are the general shapes and the equations of the mathematical models used to describe the semivariance.

### References

Burrough, P.A. Principles of Geographical Information Systems for Land Resources Assessment. New York: Oxford University Press. 1986.

Heine, G.W. A Controlled Study of Some Two-Dimensional Interpolation Methods. COGS Computer Contributions 3 (no. 2): 60-72. 1986.

McBratney, A.B., and R. Webster. Choosing Functions for Semi-variograms of Soil Properties and Fitting Them to Sampling Estimates. Journal of Soil Science 37: 617-639. 1986.

Oliver, M.A. Kriging: A Method of Interpolation for Geographical Information Systems. International Journal of Geographic Information Systems 4: 313-332. 1990.

Press, W.H., S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery. Numerical Recipes in C, The Art of Scientific Computing. New York: Cambridge University Press. 1988.

Royle, A.G., F.L. Clausen, and P. Frederiksen. Practical Universal Kriging and Automatic Contouring. Geoprocessing 1: 377-394. 1981.