Modeling Spatial Correlation(The Semivariogram)
©2007 Dr. B. C. Paul
Fitting Spatially Correlated Data This is the case where grabbing random
samples from around does not produce a random result Samples closer together in location parameter are
likely to be similar Real Engineering world situations
Location is location Your taking samples of a site – those close together are
likely to be similar Common with Environmental Clean-ups or Ore
Reserves We encountered this situation when we were
looking at decreasing variance of the mean I showed you a plot of half squared differences that
a computer referenced to see how much variance would average out when one went to larger samples.
The Semivariogram
Half SquaredDifferencesPlotted here(CalledSemi variance)
Distance Plotted Here
Data usually follows a line like this
Semivariograms are anotherType of model that it oftenPays to use your judgment andFit yourself rather than justTell the computer to do leastSquares.
How Do You Do A Semivariogram (With a Computer Unless you have a death wish)
Suppose I have this grid ofSamples spaced on 50 footCenters.
I tell my computer to look at allPossible pairs of points that are50 feet apart. (There are a wholeBunch of them).
For each pair the computerSubtracts one from the other toGet a difference. I squares theDifference and then adds up theResults for every pair.
Continuing My Computational Love Fest The Computer eventually totals up all the
squared differences for every sample pair in the whole grid that is 50 feet apart.
The computer then looks at its tally of how many pairs it found and divides the total by the number of pairs to get an average squared difference for pairs 50 feet apart.
The computer then divides that value by two It’s a calculus and derivation thing where an extra
two shows up and its convenient to just include it in the definition of semivariance
I have my computer do this for every other distance and compute a semivariance for that distance.
The Result
Semivariance
Distance
We now have a sort of histogram of spatialCorrelation of samples.
Model Fitting Time
Semivariance
Distance
We will try to fit a mathematical model to our pattern of spatial correlation.(Not just any line will do – has to meet specific mathematical conditionsYou don’t want to understand).
We Will Look at Fitting a Spherical Model(Because it works about 95% of the time)
Semivariance
Distance
Plot a line for theOver-all variance ofSamples.(As samples becomeVary far apart theyHave no spatialRelationship and tendTo have the sameVariance as just theBackground of theSample set.
A Range of Influence
Semivariance
Distance
Look for a linear trend in the data at the first(you will probably see your semivarianceRising to meet your variance of samples)
Working on the Range
Semivariance
Distance
The Linear trend will intersect the variance of samplesAt about 2/3rds the Range in influence.(The actual range curves up to meet the sampleVariance).
What Does Range of Influence Mean?
Samples located within the range of influence of each other are spatially correlated and when you draw one sample the value of the other sample a distance away is not a matter of random chance When you have a spatially correlated sample
set you can use that information to make more than luck of the draw guesses on the values at points that were never sampled (Can see how I could mine an ore deposit or clean
up an environmental mess better if I knew that kind of stuff)
The Cill and Nugget
Semivariance
Distance
This value is the Cill – it representsThe amount of the variation in theDeposit that shows spatial correlationOver a range of influence.
Your linear trend normally does not intersect 0 at zero distance –Most real deposits have a random element – called the nugget (it first got its name from whether your gold sampling happened to hit a gold nugget or not).
The Model
Nd )(
)*2*2
*3(*)( 3
3
Rd
R
dCNd
Semivariance is represented by gammad represents distanceN is the Nugget value fit to the graphThis applies if d = 0
Semivariance for d>0 and <R where R is the range ofInfluence. C and N represent Cill and Nugget(Cill got misspelled because the mathematicians were French)
NCd )(
Semivariance for d>R
The Model
The spherical model is called a three part model (any guesses about why?)
Our model represents the average similarity of sample values located a distance d apart We’ll look at how we can use that later on
One assumption we make is “Stationarity” Means that our model of spatial correlation continues
to fit over the entire study area May need different models for different types of
mineralized rock or contaminated soils
Some Exceptions
Sometimes the model varies depending on which direction you are moving In that case you have to have your
computer look by direction as well as distance for pairs of samples in the set.
You will fit model differently in different directions
This is called anisotropy Need more detailed study on geostatistics
to get good explanation of anisotropic models and how to fit them.
The Not Really a Grid Factor
Sometimes samples are not onA regular square grid.In that case you have theComputer start with each sampleIndividually and look for possiblePairs in a certain direction withA cone of tolerance.
The cone is in turn broken up intoSteps of distance. Any samplePairs located in the interval areTreated as if they were at a gridPoint(similar to the arbitrary limits weUse for cells in histograms).
Illustrations of Fitting
Semivariogram in X Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Ga
mm
a
X
Semivariogram Y Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Gam
ma
Y
Our Sample Variance is 100Checking for anisotropy indications
They both appear to be leveling out at 100Both appear to have a nugget of about 20Common Cills and Nuggets mean no Zonal Anisoptropy
Checking for indications of different rangeAppear about the same – no geometric anisotropy
Fitting the Model
Semivariogram Y Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Gam
ma
Y
Nugget looks like a readOf 20.
Levels out at 100 Cill = 100 – 20 =80
2/3rds R is about 350 so Range of influence is about 525
Lets Try Another One
Semivariogram in X Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Ga
mm
a
X
Semivariogram Y Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Gam
ma
Y
Variance of samples is 100 againChecking for anisotropy
Appears to have about same nugget at 20Both appear to level off around 100Therefore probably no zonal anisotropy
Checking for Common Range of InfluenceI don’t think so – This must be a geometric anisotropy
Checking Out the Range
Semivariogram in X Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Gam
ma
X
2/3rds R is about 350 again – so range is about 525Nugget = 20 Cill = 80
Check Out the Y Axis
Semivariogram Y Direction
0
20
40
60
80
100
120
0 500 1000
Distance
Ga
mm
a
Y
2/3rd R is about 150 so range Y is 225 Range is a little more than twice as far inThe X direction (or principle axis)Cill is 80 Nugget is 20
Lets Try Another OneSemivariogram in X Direction
01020304050607080
0 500 1000
Distance
Ga
mm
a
X
Semivariogram Y Direction
020406080
100120140160
0 500 1000
Distance
Gam
ma
Y
Sample Variance is still 100 but X is only getting to about 70 and Y about 130
Also X appears to hit Y axis at 10 while in Y it appears to be 30
This is appears to be a Zonal Anisotropy
I’m A Little Unsure About the Range being the Same or Different
Semivariogram in X Direction
01020304050607080
0 100 200 300 400 500 600 700 800 900 1000
Distance
Gam
ma
X
2/3rd R is about 340 so R is about 510 on the X axis
Checking Out the Y Axis
Semivariogram Y Direction
020406080
100120140160
0 100 200 300 400 500 600 700 800 900 1000
Distance
Gam
ma
Y
2/3rds R is about 350 which implies R = 525R= 510 and R= 525 are similar enough that an anisotropy in range is notReally worth modeling.
Trying One More CaseSemivariogram in X Direction
0
20
40
60
80
100
120
0 100 200 300 400 500 600 700 800 900 1000
Distance
Ga
mm
a
X
Semivariogram Y Direction
0
20
40
60
80
100
120
0 100 200 300 400 500 600 700 800 900 1000
Distance
Ga
mm
a
Y
Sample variance is again 100Both directions appear to intersect Y axis around 10 and to level out at 100
Probably no zonal anisotropy
Range is not obviously different but is a little “funky”
When Range is Kinky(The Nested Structure)
Semivariogram in X Direction
0
20
40
60
80
100
120
0 100 200 300 400 500 600 700 800 900 1000
Distance
Ga
mm
a
X
SometimesMineralization may beControlled byProcesses that haveDifferent ranges ofInfluence.
In this case we haveSomething with a Short range andSomething with a longRange.
I’m guessing I have a short range structure at around 100 Range
My Long Range Structure
Semivariogram in X Direction
0
20
40
60
80
100
120
0 100 200 300 400 500 600 700 800 900 1000
Distance
Gam
ma
X
2/3rd R is about 525 so R long is about 787
Making Semivariogram Math Work Out
Isotropic with no nested structures Just use the 3 part model
Geometric Anisotropy (means range varies by direction) Use coordinate transform
If Rx is twice Ry use an isotropic three part model, but double the y component of distance before doing the 3 part model calculation
Handling Zonal Anisotropies and Nested Structures
Handled by adding components For zonal anisotropy add separate models together to
get the total model Nugget*cos(θ) will give variable nugget by direction A normal 3 part model that only counts distance
component in one direction will make cill change. Can have an isotropic or geometric anisotropy to
handle the other component Nested Structures
Just separately compute the long and short range models and then add them up.
As a practical matter – feed the task to a computer and let it calculate the predicted gamma values for the model you figured out.
Mathematical Examples – Computing a raw value of gamma
The following samples are a distance 50 feet apart on an isotropic semivariogram model P1 25 P2 31
Diff is 6 Squared diff. is 36 Half squared diff is 18 Total so far is 18 Number of pairs so far is 1
Continuing the computation
P1 = 25, P3 = 20 Difference is 5 Squared diff is 25 Half squared diff is 12.5 Total to this point is 30.5 Number of pairs so far is 2
P2 = 31, P4 = 38 Difference is 7 Squared diff is 49 Half squared diff is 24.5 Total to this point is 45 Number of pairs so far is 3
Continuing the computation
P3 = 20, P5 = 27 Difference is 7 Squared difference is 49 Half Squared diff is 24.5 Total to this point is 69.5 Number of pairs so far is 4
P4 = 38, P6 = 33 Difference is 5 Squared difference is 25 Half Squared diff is 12.5 Total to this point is 82 Number of pairs so far is 5
Finishing the raw gamma value for pairs 50 feet apart
82 / 5 = 16.4 16.4 would be the value plotted on the
semivariogram Most values plotted in reality will be
based on more than 5 pairs, however the calculation procedure is the same.
Eventually so called sample points on the semivariogram will be replaced with a mathematical model that will be used to compute gamma values where ever they are needed.
Examples of Semivariogram Mathematical Models
Case 1 – An isotropic spherical model with a cill of 80, a nugget of 20 and a range of 500 Let point 1 be X= 0, Y =0 Let point 2 be X= 75 Y =0 ΔX = 75 ΔY = 0 Pythagorean distance is 75 75 >0 but less than 500 so use the second part of
the spherical model
)*2*2
*3(* 3
3
RD
R
DCN )
*2
75
500
75*5.1(*8020
5003
3
Ie – 37.87
More Mathematical Models
An isotropic nested structure Nugget =20 Range 1 =50 Feet Cill 1 =20, Range 2 = 500 Feet Cill 2 = 60
Nested structures are accomplished by simply adding model components
P1 X=0, Y=0 , P2 X=53.03, Y=53.03 ΔX=53.03 ΔY=53.03 Pythagorean Distance = 75 Nugget = 20 Model 1 – 75>50 so model is C+N or 20 Model 2 – 75>0 and 75<500 so use 2 model component
)*2*2
*3(* 3
3
RD
R
DCN
)*2
75
500
75*5.1(*6020
5003
3
13.4
Add components 20+20+13.4 = 53.4
More Models
A geometric anisotropy with Nugget = 20, Cill=80 RangeX=500, Range Y=100
P1 X=0, Y=0 , P2 X=53.03, Y=53.03 Geometric Anisotropy is handled by stretching
the distance in the short axis direction YRange is 1/5th of XRange so ΔY gets multiplied by
5 ΔX = 53.03 ΔY = 265.15 (ie 53.05*5) Pythagorean Distance is 270.4 270.4 is >0 and < 500 so use 2nd part of formula
)*2*2
*3(* 3
3
RD
R
DCN 58.57