Theory and example
of Variogram
Irfan Saputra
HRS Jakarta
March 2008
Introduction
The variogram characterizes the spatial continuity of a data set.
The variogram is a quantitative descriptive statistic that can be graphically
represented in a manner which characterizes the spatial continuity (i.e.
roughness) of a data set. A variogram plot example is shown below :
Flowchart
Input Data
Calculate the distances of each pairs
di = (x1 − x2 )2 − ( y1 − y2 )2
Binning the data
max offset - min offset
Δh =
# offset bins - 1
Experimental Variogram
γ (h ) = ∑ (φ − φ ) ,
1 2
i j
2N hij ≈h
Modeled Variogram
Spherical Exponential Gaussian Power
Sample data
Here is sample porosity data from 16 Well ID X Y Porosity
1 2280 890 4
wells with x and y coordinates.
2 1240 1210 1.5
3 1651 1290 5.7
4 2169 1230 2.9
5 2059 1690 10.4
6 1722 1630 16.1
7 891 1820 1.9
8 1385 2060 7.7
9 1682 2020 15.2
10 1885 2050 7.6
11 1991 2310 11.9
12 1694 2420 15.8
13 1023 2310 6.1
14 1305 2750 4.5
15 1705 2620 12.7
Spatial distribution of 16 wells 16 2301 2000 12.4
To compute the variogram and There are n(n-1)/2 unique pairs of
covariance at other offsets, we must observations. For 16 wells, there are
compute the well-to-well offsets. 120 observations.
Distances calculation
Mathematically, we can write the
distances di as: w2
y2 (1240,1210)
di = (x1 − x2 )2 − ( y1 − y2 )2 y1
w 1 d1
(2280,890)
For well 1 and well 2 distances :
x1 x2
d12 = (2280 − 1240 )2 − (890 − 1210 )2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
d12 = 1088 1 0
2 1088 0
3 745 419 0
4 358 929 521 0
5 830 949 571 473 0
6 927 639 347 600 342 0
This calculation is performed on all 7 1672 703 927 1408 1175 852 0
of the well pairs. 8 1473 862 815 1142 769 546 549 0
9 1278 923 731 928 501 392 816 300 0
10 1225 1059 795 868 400 451 1020 500 205 0
11 1449 1332 1075 1095 624 731 1204 656 424 281 0
12 1638 1292 1131 1281 816 790 1002 474 400 416 317 0
13 1896 1121 1198 1575 1207 975 507 440 720 900 968 680 0
14 2100 1541 1500 1748 1301 1195 1018 695 822 909 815 510 523 0
15 1823 1485 1331 1465 995 990 1141 645 600 598 422 200 749 421 0
16 1110 1323 963 781 393 687 1421 918 619 419 438 738 1315 1247 860 0
Distances for each pairs
Well 1 Porosity Well 2 Porosity Distance Well 1 Porosity Well 2 Porosity Distance
1 4.00 1 4.00 0 5 10.40 16 12.40 393
2 1.50 2 1.50 0 5 10.40 10 7.60 400
3 5.70 3 5.70 0 9 15.20 12 15.80 400
4 2.90 4 2.90 0 10 7.60 12 15.80 416
5 10.40 5 10.40 0 2 1.50 3 5.70 419
6 16.10 6 16.10 0 10 7.60 16 12.40 419
7 1.90 7 1.90 0 14 4.50 15 12.70 421
8 7.70 8 7.70 0 11 11.90 15 12.70 422
9 15.20 9 15.20 0 9 15.20 11 11.90 424
10 7.60 10 7.60 0 11 11.90 16 12.40 438
11 11.90 11 11.90 0 8 7.70 13 6.10 440
12 15.80 12 15.80 0 6 16.10 10 7.60 451
13 6.10 13 6.10 0 4 2.90 5 10.40 473
14 4.50 14 4.50 0 8 7.70 12 15.80 474
15 12.70 15 12.70 0 8 7.70 10 7.60 500
16 12.40 16 12.40 0 5 10.40 9 15.20 501
12 15.80 15 12.70 200 7 1.90 13 6.10 507
9 15.20 10 7.60 205 12 15.80 14 4.50 510
10 7.60 11 11.90 281 3 5.70 4 2.90 521
8 7.70 9 15.20 300 13 6.10 14 4.50 523
11 11.90 12 15.80 317 6 16.10 8 7.70 546
5 10.40 6 16.10 342 7 1.90 8 7.70 549
3 5.70 6 16.10 347 3 5.70 5 10.40 571
1 4.00 4 2.90 358 10 7.60 15 12.70 598
6 16.10 9 15.20 392 4 2.90 6 16.10 600
Distances for each pairs
Well 1 Porosity Well 2 Porosity Distance Well 1 Porosity Well 2 Porosity Distance
9 15.20 15 12.70 600 1 4.00 5 10.40 830
9 15.20 16 12.40 619 6 16.10 7 1.90 852
5 10.40 11 11.90 624 15 12.70 16 12.40 860
2 1.50 6 16.10 639 2 1.50 8 7.70 862
8 7.70 15 12.70 645 4 2.90 10 7.60 868
8 7.70 11 11.90 656 10 7.60 13 6.10 900
12 15.80 13 6.10 680 10 7.60 14 4.50 909
6 16.10 16 12.40 687 8 7.70 16 12.40 918
8 7.70 14 4.50 695 2 1.50 9 15.20 923
2 1.50 7 1.90 703 3 5.70 7 1.90 927
9 15.20 13 6.10 720 1 4.00 6 16.10 927
3 5.70 9 15.20 731 4 2.90 9 15.20 928
6 16.10 11 11.90 731 2 1.50 4 2.90 929
12 15.80 16 12.40 738 2 1.50 5 10.40 949
1 4.00 3 5.70 745 3 5.70 16 12.40 963
13 6.10 15 12.70 749 11 11.90 13 6.10 968
5 10.40 8 7.70 769 6 16.10 13 6.10 975
4 2.90 16 12.40 781 6 16.10 15 12.70 990
6 16.10 12 15.80 790 5 10.40 15 12.70 995
3 5.70 10 7.60 795 7 1.90 12 15.80 1002
3 5.70 8 7.70 815 7 1.90 14 4.50 1018
11 11.90 14 4.50 815 7 1.90 10 7.60 1020
7 1.90 9 15.20 816 2 1.50 10 7.60 1059
5 10.40 12 15.80 816 3 5.70 11 11.90 1075
9 15.20 14 4.50 822 1 4.00 2 1.50 1088
Distances for each pairs
Well 1 Porosity Well 2 Porosity Distance Well 1 Porosity Well 2 Porosity Distance
4 2.90 11 11.90 1095 1 4.00 8 7.70 1473
1 4.00 16 12.40 1110 2 1.50 15 12.70 1485
2 1.50 13 6.10 1121 3 5.70 14 4.50 1500
3 5.70 12 15.80 1131 2 1.50 14 4.50 1540
7 1.90 15 12.70 1141 4 2.90 13 6.10 1575
4 2.90 8 7.70 1142 1 4.00 12 15.80 1638
5 10.40 7 1.90 1175 1 4.00 7 1.90 1672
6 16.10 14 4.50 1195 4 2.90 14 4.50 1748
3 5.70 13 6.10 1198 1 4.00 15 12.70 1823
7 1.90 11 11.90 1204 1 4.00 13 6.10 1896
5 10.40 13 6.10 1207 1 4.00 14 4.50 2100
1 4.00 10 7.60 1225
14 4.50 16 12.40 1247
1 4.00 9 15.20 1278
4 2.90 12 15.80 1281
2 1.50 12 15.80 1292
5 10.40 14 4.50 1301
13 6.10 16 12.40 1315
2 1.50 16 12.40 1323
3 5.70 15 12.70 1331
2 1.50 11 11.90 1332
4 2.90 7 1.90 1408
7 1.90 16 12.40 1421
1 4.00 11 11.90 1449
4 2.90 15 12.70 1465
Binning the data
Before computing the variogram, we need Offset # h Δh h-(Δh/2) h+(Δh/2)
to bin the data into separate offset bins for
all wells that are separated by h, where h 1 0.000 0.000 0.000 0.000
defines the offset to the center of the bin,
and all offsets between h-(Dh/2) and 2 233.333 233.333 116.667 350.000
h+(Dh/2) are included.
3 466.667 233.333 350.000 583.333
max offset - min offset 4 700.000 233.333 583.333 816.667
Δh =
# offset bins - 1 5 933.333 233.333 816.667 1050.000
6 1166.667 233.333 1050.000 1283.333
7 1400.000 233.333 1283.333 1516.667
8 1633.333 233.333 1516.667 1750.000
9 1866.667 233.333 1750.000 1983.333
10 2100.000 233.333 1983.333 2216.667
Bins for 10 offset number
Experimental Variogram
After binning the data, we perform
variogram calculations for each offset bin Offset # n Σ(φi − φj)2
Bin
Center
Bin Range γ(h)
using the equation below :
1 16 0.00 0.00 0.00 - 0.00 0.00
γ (h ) = ∑ (φ − φ ) ,
1 2
2 7 297.97 233.33 116.67 - 350.00 21.28
i j
2N hij ≈ h 3 25 702.90 466.67 350.00 - 583.33 14.06
4 26 1205.33 700.00 583.33 - 816.67 23.18
where: h = offset 5 23 1460.50 933.33 816.67 - 1050.00 31.75
6 18 1188.99 1166.67 1050.00 - 1283.33 33.03
7 13 965.23 1400.00 1283.33 - 1516.67 37.12
8 5 165.45 1633.33 1516.67 - 1750.00 16.55
9 2 80.10 1866.67 1750.00 - 1983.33 20.03
10 1 0.25 2100.00 1983.33 - 2216.67 0.13
Range, sill and nugget
1. Range: At some offset distance, the variogram values will stop changing
and reach a “plateau”. The distance at which this occurs is called the range.
2. Sill: The “plateau” value at which the variogram stops changing.
3. Nugget: The discontinuity at the origin. Although this theoretically should
be zero, sampling error and short scale variability can cause it to be non-
zero.
Δh
Modeled Variogram
The four main functions that are used to model variograms are:
⎡ ⎛h⎞ ⎛h⎞ ⎤
3
a) Spherical : γ (h ) = γ 0 + s ⎢1.5⎜ ⎟ − 0.5⎜ ⎟ ⎥ , h ≤ a
⎢⎣ ⎝ a ⎠ ⎝ a ⎠ ⎥⎦
= γ 0 + s , h > a.
⎡ ⎛ h ⎞⎤
( )
b) Exponential : γ h = γ 0 + s ⎢1 − exp⎜ − ⎟⎥
⎣ ⎝ a ⎠⎦
⎡ ⎛ h 2 ⎞⎤
c) Gaussian : γ (h ) = γ 0 + s ⎢1 − exp⎜⎜ − 2 ⎟⎟⎥
⎣ ⎝ a ⎠⎦
d) Power : γ (h ) = γ 0 + s( h n ) ( where n = 1 gives a linear model )
where : h = offset, a = range, s = sill, γ0 = nugget, and n = exponent.
Modeled Variogram
If the experimental variogram never levels out, then the linear model is usually
appropriate. If the experimental variogram levels out, but is "curvy" all the way up,
then the exponential model should be considered. If the experimental variogram
starts out straight, then bends over sharply and levels out, the spherical model is a
good first choice.
40
γ(h) Spherical Exponential Gauss
35
0.00 0.00 0.00 0.00
30
21.28 12.03 7.28 1.85
25
14.06 22.72 13.05 6.85
23.18 30.75 17.62 13.56 20
31.75 34.77 21.24 20.35
15
33.03 35.00 24.10 26.03
10
37.12 35.00 26.37 30.07
5
16.55 35.00 28.17 32.57
0
20.03 35.00 29.59 33.93 0 400 800 1200 1600 2000
0.13 35.00 30.71 34.57 Experimental Variogram Spherical Model Exponential Model Gaussian Model