Given a geostatistical model, Z(s), its variogram (h) is formally defined as where f(s, u) is the joint probability density function of Z(s) and Z(u). For an intrinsic random field, the variogram can be estimated using the method of moments estimator, as follows: where h is the distance separating sample locations s i and s i +h, N(h) is the number of distinct data pairs. In some circumstances, it may be desirable to consider direction in addition to distance. In an isotropic case, h should be written as a scalar h, representing magnitude. Note: In the literature the terms variogram and semivariogram are often used interchangeably. By definition (h) is semivariogram and the variogram is 2(h). ( ) ( ) u s u s u s u s h d d f Z Z Z Z ) , ( ) ( ) ( 2 1 ) ( ) ( var 2 1 ) ( 2 }} = = | | 2 ) ( 1 ) ( ) ( ) ( 2 1 ) (