1 / 146100%
Variogram Calculation in
Geostatistics
1 PROBLEM 1: VARIOGRAM CALCULATION
Question: Given the following paired data points (distance, semivariance), calculate the
experimental variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
2 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
3 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
4 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
5 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
6 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
7 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
8 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
9 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
10 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
11 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
12 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
13 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
14 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
15 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
16 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
X
Y
Z
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
17 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
18 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
19 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
20 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
21 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
22 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
23 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
24 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
25 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
26 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
27 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
28 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
29 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
30 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
31 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
32 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
33 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
34 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
35 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
36 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
37 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
38 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
39 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
40 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
41 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
42 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
43 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
X
Y
Z
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
44 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
45 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
46 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
47 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
48 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
49 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
50 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
51 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
52 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
53 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
54 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
55 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
56 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
57 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
58 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
59 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
60 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
61 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
62 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
63 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
64 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
65 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
66 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
67 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
68 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
69 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
70 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
X
Y
Z
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
71 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
72 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
73 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
74 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
75 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
76 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
77 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
78 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
79 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
80 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
81 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
82 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
83 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
84 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
85 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
86 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
87 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
88 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
89 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
90 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
91 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
92 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
93 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
94 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
95 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
96 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
97 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
X
Y
Z
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
98 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
99 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
100 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
101 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
102 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
103 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
104 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
105 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
106 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
107 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
108 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
109 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
110 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
111 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
112 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
113 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
114 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
115 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
116 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
117 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
118 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
119 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
120 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
121 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
122 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
123 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
124 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
X
Y
Z
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
125 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
126 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
127 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Given the following paired data points (distance, semivariance), calculate the experimental
variogram and fit a spherical model to it:
(10, 2.1), (20, 3.5), (30, 4.2), (40, 4.8), (50, 5.1), (60, 5.3)
Solution:
Step 1: Plot the experimental variogram using the given data points.
Step 2: Estimate the sill, range, and nugget effect from the plot:
Sill (C): Approximately 5.3
Range (a): Approximately 50
Nugget effect (C0): Approximately 0
Step 3: Use the spherical model equation:
𝛾()={𝐶0+𝐶[3ℎ
2𝑎1
2(
𝑎)3]for 𝑎
𝐶0+𝐶 for >𝑎
Step 4: Substitute the estimated values into the equation:
𝛾()={5.3[3ℎ
1001
2(
50)3]for 50
5.3 for >50
Step 5: Plot the fitted model alongside the experimental variogram to assess the fit.
128 PROBLEM 2: KRIGING ESTIMATION
Question: Using simple kriging, estimate the value at an unsampled location (5, 5) given the
following data points and their values:
(0, 0): 10 (0, 10): 15 (10, 0): 12 (10, 10): 18
Assume an exponential variogram model with a sill of 20 and a range of 8.
Solution:
Step 1: Calculate the distances between the unsampled location and the data points:
d1 = sqrt((5-0)^2 + (5-0)^2) = 7.07
d2 = sqrt((5-0)^2 + (5-10)^2) = 7.07
d3 = sqrt((5-10)^2 + (5-0)^2) = 7.07
d4 = sqrt((5-10)^2 + (5-10)^2) = 7.07
Step 2: Calculate the semivariances using the exponential model:
𝛾()=20(1𝑒3ℎ
8)
γ1 = γ2 = γ3 = γ4 = 20 * (1 - exp(-3 * 7.07 / 8)) = 15.8
Step 3: Set up the kriging system:
[015.8 15.8 15.8
15.8015.8 15.8
15.8 15.8 0 15.8
15.8 15.8 15.8 0 ][𝑤1
𝑤2
𝑤3
𝑤4]=[15.8
15.8
15.8
15.8]
Step 4: Solve for the weights (w1, w2, w3, w4).
Step 5: Calculate the estimated value:
𝑍=𝑤110+𝑤215+𝑤312+𝑤418
129 PROBLEM 3: SPATIAL AUTOCORRELATION
Question: Calculate Moran’s I for the following spatial data:
10
12
8
15
9
11
7
13
14
Assume rook’s case adjacency for the weights matrix.
Solution:
Step 1: Calculate the mean (μ) of the values: μ = (10 + 12 + 8 + 15 + 9 + 11 + 7 + 13 + 14)
/ 9 = 11
Step 2: Create the weights matrix (W) using rook’s case adjacency:
𝑊=
[
0 1 0 1 0 0 0 0 0
1 0 1 0 1 0 0 0 0
0 1 0 0 0 1 0 0 0
1 0 0 0 1 0 1 0 0
0 1 0 1 0 1 0 1 0
0 0 1 0 1 0 0 0 1
0 0 0 1 0 0 0 1 0
0 0 0 0 1 0 1 0 1
0 0 0 0 0 1 0 1 0
]
Step 3: Calculate the numerator of Moran’s I:
𝑁=𝑤𝑖𝑗
𝑛
𝑗=1
𝑛
𝑖=1 (𝑥𝑖𝜇)(𝑥𝑗𝜇)
Step 4: Calculate the denominator of Moran’s I:
𝐷=(𝑥𝑖𝜇)2
𝑛
𝑖=1
Step 5: Calculate Moran’s I:
𝐼=𝑛
𝑊𝑁
𝐷
where n is the number of observations (9) and W is the sum of all weights (24).
Step 6: Interpret the result:
I > 0: Positive spatial autocorrelation
I < 0: Negative spatial autocorrelation
I ≈ 0: No spatial autocorrelation
130 PROBLEM 4: TREND SURFACE ANALYSIS
Question: Perform a first-order trend surface analysis on the following data:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Solution:
Step 1: Set up the equation for a first-order trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
Step 2: Create the design matrix:
𝑋=[1 1 1
1 1 2
1 2 1
1 2 2]
Step 3: Set up the normal equations: (𝑋𝑇𝑋)𝑏=𝑋𝑇𝑍
Step 4: Solve for the coefficients (b0, b1, b2):
𝑏=(𝑋𝑇𝑋)−1𝑋𝑇𝑍
Step 5: Interpret the results:
b0: Intercept
b1: Coefficient for X (east-west trend)
b2: Coefficient for Y (north-south trend)
Step 6: Write the equation of the fitted trend surface:
𝑍=𝑏0+𝑏1𝑋+𝑏2𝑌
131 PROBLEM 5: SPATIAL INTERPOLATION
Question: Using inverse distance weighting (IDW) with a power of 2, estimate the value at
point (2.5, 2.5) given the following data points:
(1, 1): 10 (1, 4): 15 (4, 1): 12 (4, 4): 18
Solution:
Step 1: Calculate the distances from the estimation point to each data point:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 2: Calculate the weights using the inverse distance formula:
𝑤𝑖=1
𝑑𝑖2
w1 = 1 / 2.12^2 = 0.222
w2 = 1 / 2.69^2 = 0.138
w3 = 1 / 2.69^2 = 0.138
w4 = 1 / 2.12^2 = 0.222
Step 3: Normalize the weights: 𝑤𝑖= 𝑤𝑖
𝑤𝑗
𝑛
𝑗=1
Step 4: Calculate the estimated value:
𝑍=𝑤𝑖
𝑛
𝑖=1 ′𝑍𝑖
where Z_i are the known values at the data points.
Step 5: Interpret the result and discuss the limitations of IDW interpolation.
132 PROBLEM 6: VARIOGRAM CLOUD ANALYSIS
Question: Given the following spatial data:
X
Y
Z
1
1
10
2
1
12
1
2
15
2
2
18
3
3
20
Create a variogram cloud and interpret the results.
Solution:
Step 1: Calculate the distances and squared differences for all pairs of points:
For each pair (i, j):
Distance: h_ij = sqrt((x_i - x_j)^2 + (y_i - y_j)^2)
Squared difference: γ_ij = (z_i - z_j)^2 / 2
Step 2: Create a scatter plot with distance (h) on the x-axis and semivariance (γ) on the y-axis.
Step 3: Analyze the variogram cloud:
Look for trends or patterns in the distribution of points
Identify any outliers or anomalies
Observe the overall shape and spread of the cloud
Step 4: Interpret the results:
Discuss the presence or absence of spatial correlation
Comment on the variability of the data at different distances
Identify any potential anisotropy or directional effects
Step 5: Consider next steps, such as binning the data to create an experimental variogram.
133 PROBLEM 7: CROSS-VALIDATION FOR KRIGING
Question: Perform leave-one-out cross-validation for ordinary kriging using the following data:
X
Y
Z
1
1
10
1
3
15
3
1
12
3
3
18
2
2
14
Assume an exponential variogram model with a sill of 20 and a range of 2.5.
Solution:
Step 1: For each data point, remove it from the dataset and estimate its value using ordinary
kriging with the remaining points.
Step 2: Calculate the kriging equations for each iteration:
[𝛾(11) 𝛾(1𝑛)1
𝛾(𝑛1) 𝛾(𝑛𝑛)1
1 1 0][𝑤1
𝑤𝑛
𝜇]=[𝛾(10)
𝛾(𝑛0)
1]
where γ(h) is the exponential variogram model:
𝛾()=20(1𝑒3ℎ
2.5)
Step 3: Solve the kriging equations for each iteration to obtain the weights and Lagrange
multiplier.
Step 4: Calculate the estimated value for each removed point:
𝑍𝑖=𝑤𝑗
𝑛−1
𝑗=1 𝑍𝑗
Step 5: Calculate the cross-validation statistics:
Mean Error (ME): 𝑀𝐸=1
𝑛(𝑍𝑖𝑍𝑖)
𝑛
𝑖=1
Mean Squared Error (MSE): 𝑀𝑆𝐸=1
𝑛(𝑍𝑖𝑍𝑖)2
𝑛
𝑖=1
Root Mean Squared Error (RMSE): 𝑅𝑀𝑆𝐸=𝑀𝑆𝐸
Mean Standardized Error (MSE): 𝑀𝑆𝐸=1
𝑛𝑍𝑖−𝑍𝑖
𝜎𝑖
𝑛
𝑖=1
Root Mean Squared Standardized Error (RMSSE): 𝑅𝑀𝑆𝑆𝐸=1
𝑛(𝑍𝑖−𝑍𝑖
𝜎𝑖)2
𝑛
𝑖=1
Step 6: Interpret the results:
ME should be close to 0 for unbiased estimation
RMSE should be as small as possible
MSE should be close to 0
RMSSE should be close to 1
Step 7: Based on the cross-validation results, discuss the performance of the kriging model and
suggest potential improvements.
134 PROBLEM 8: INDICATOR KRIGING
Question: Perform indicator kriging to estimate the probability that the value at location (2.5,
2.5) exceeds a threshold of 15, given the following data:
X
Y
Z
1
1
10
1
4
18
4
1
12
4
4
20
Assume a spherical variogram model for the indicator variable with a sill of 0.25 and a range of
3.
Solution:
Step 1: Transform the data into indicator variables:
𝐼(𝑥)={1if 𝑍(𝑥)>15
0if 𝑍(𝑥)15
Step 2: Calculate the distances between the estimation point and the data points:
d1 = sqrt((2.5-1)^2 + (2.5-1)^2) = 2.12
d2 = sqrt((2.5-1)^2 + (2.5-4)^2) = 2.69
d3 = sqrt((2.5-4)^2 + (2.5-1)^2) = 2.69
d4 = sqrt((2.5-4)^2 + (2.5-4)^2) = 2.12
Step 3: Calculate the semivariances using the spherical model:
𝛾()={0.25[3ℎ
2(3)1
2(
3)3]for 3
0.25 for >3
Step 4: Set up the kriging system:
[
𝛾(𝑑11)𝛾(𝑑12)𝛾(𝑑13)𝛾(𝑑14)1
𝛾(𝑑21)𝛾(𝑑22)𝛾(𝑑23)𝛾(𝑑24)1
𝛾(𝑑31)𝛾(𝑑32)𝛾(𝑑33)𝛾(𝑑34)1
𝛾(𝑑41)𝛾(𝑑42)𝛾(𝑑43)𝛾(𝑑44)1
1 1 1 1 0
]
[
𝑤1
𝑤2
𝑤3
𝑤4
𝜇
]
=
[
𝛾(𝑑1)
𝛾(𝑑2)
𝛾(𝑑3)
𝛾(𝑑4)
1
]
Step 5: Solve for the weights (w1, w2, w3, w4) and Lagrange multiplier (μ).
Step 6: Calculate the estimated probability:
𝑃=𝑤1𝐼(𝑥1)+𝑤2𝐼(𝑥2)+𝑤3𝐼(𝑥3)+𝑤4𝐼(𝑥4)
Step 7: Interpret the result as the probability that the value at (2.5, 2.5) exceeds the threshold
of 15.
135 PROBLEM 9: BAYESIAN GEOSTATISTICS
Question: Using a Bayesian approach, estimate the mean and variance of a spatial random
field given the following observations:
X
Y
Z
1
1
10
1
2
12
2
1
15
2
2
18
Assume a Gaussian prior with mean μ_0 = 13 and variance σ_0^2 = 16, and a measurement
error variance of σ_ε^2 = 1.
Solution:
Step 1: Define the prior distribution: 𝜇𝑁(𝜇0,𝜎02)
Step 2: Define the likelihood function: 𝑍𝑖|𝜇𝑁(𝜇,𝜎𝜀2)
Step 3: Calculate the sample mean and variance:
𝑍=1
𝑛𝑍𝑖
𝑛
𝑖=1
𝑠2=1
𝑛1(𝑍𝑖𝑍)2
𝑛
𝑖=1
Step 4: Calculate the posterior mean:
𝜇𝑛=𝑛
𝜎𝜀2𝑍+1
𝜎02𝜇0
𝑛
𝜎𝜀2+1
𝜎02
Step 5: Calculate the posterior variance:
𝜎𝑛2=1
𝑛
𝜎𝜀2+1
𝜎02
Step 6: Calculate the 95
𝐶𝐼95%=𝜇𝑛±1.96𝜎𝑛2
Step 7: Interpret the results:
Discuss the posterior mean and how it compares to the prior mean and sample mean
Explain the meaning of the posterior variance and credible interval
Comment on the influence of the prior and the data on the posterior distribution
136 PROBLEM 10: MULTIVARIATE GEOSTATISTICS
Question: Perform a linear model of coregionalization (LMC) for two variables, Z1 and Z2,
given the following cross-variogram and direct variogram models:
γ11(h) = 10 Sph(h/100) + 5 Exp(h/50)
γ22(h) = 15 Sph(h/100) + 8 Exp(h/50)
γ12(h) = 8 Sph(h/100) + 4 Exp(h/50)
Where Sph and Exp denote spherical and exponential models, respectively.
Solution:
Step 1: Identify the basic structures and their ranges:
Structure 1: Spherical model with range a1 = 100
Structure 2: Exponential model with range a2 = 50
Step 2: Set up the coregionalization matrices for each structure:
For the spherical model:
𝐵1=[𝑏11
(1)𝑏12
(1)
𝑏21
(1)𝑏22
(1)]
For the exponential model:
𝐵2=[𝑏11
(2)𝑏12
(2)
𝑏21
(2)𝑏22
(2)]
Step 3: Solve for the elements of B1 and B2 using the sill values:
b11^(1) = 10, b22^(1) = 15, b12^(1) = b21^(1) = 8
b11^(2) = 5, b22^(2) = 8, b12^(2) = b21^(2) = 4
Step 4: Verify that B1 and B2 are positive semi-definite matrices:
Calculate the determinants: det(B1) ≥ 0 and det(B2) ≥ 0
Check that the diagonal elements are non-negative
Step 5: Write the final LMC model:
[𝛾11()𝛾12()
𝛾21()𝛾22()]=𝐵1Sph(ℎ/100)+𝐵2Exp(ℎ/50)
Step 6: Interpret the results:
Discuss the spatial correlation structure for each variable
Explain the cross-correlation between the variables
Comment on the different ranges and their implications for spatial prediction
Step 7: Discuss potential applications of the LMC model, such as cokriging for improved spatial
prediction.
Students also viewed