Professional Documents
Culture Documents
Geoff Bohling
Assistant Scientist
Kansas Geological Survey
geoff@kgs.ku.edu
864-2093
http://people.ku.edu/~gbohling/cpe940
Development of Bayes’ Theorem
Terminology:
So . . .
P(A|B)P(B) = P(B|A)P(A)
Rearranging gives simplest statement of Bayes’ theorem:
P ( A B )P (B )
P (B A ) =
P ( A)
P( A) = ∑ P( A Bi )P(Bi )
n
i=1
P ( A Bi )P(Bi ) P ( A Bi )P (Bi )
P (B i A ) = = .
( )
∑ P A B j P (B j )
n
j =1
P( A)
Dolomite Shale
Mean 25.8 85.2
Std. Dev. 18.6 14.9
Count 476 295
Gamma ray distributions for dolomite and shale
0.04
dolomite
0.03
Probability Density
shale
0.02
0.01
0.00
0 20 40 60 80 100 120 140 160
Gamma Ray (API Units)
A: GammaRay > 60
B1: occurrence of dolomite
B2: occurrence of shale
P(B1): prior probability for dolomite based on overall
prevalence ≅ 60% (476 of 771 core samples)
P(B2): prior probability for shale based on overall
prevalence ≅ 40% (295 of 771 core samples)
P(A|B1): probability of GammaRay > 60 in a dolomite =
7% (34 of 476 dolomite samples)
P(A|B2): probability of GammaRay > 60 in a shale = 95%
(280 of 295 shale samples)
P( A) = P( A B1 )P (B1 ) + P( A B2 )P( B2 )
= 0.07 * 0.60 + 0.95 * 0.40 = 0.422
If we measure a gamma ray value greater than 60 at a
certain depth in a well, then the probability that we are
logging a dolomite interval is
f i ( x )P( Bi )
P (B i x ) = .
∑ f j ( x )P (B j )
n
j =1
f1 ( x ) =
1
s1 2π
[
exp − ( x − x1 ) 2 s12
2
]
f 2 (x ) =
1
s 2 2π
[
exp − ( x − x2 ) 2 s22
2
]
0.04
Kernel density estimate
Normal density estimate
0.03
Probability Density
shale
dolomite
0.02
0.01
0.00
q2 f 2 ( x )
p2 ( x ) =
(1 − q2 ) f1 ( x ) + q2 f 2 ( x )
1.0
Posterior Probability for Shale (solid lines)
0.5
0.02
0.4
normal pdf for shale
0.3 normal pdf for
dolomite
0.01
0.2
0.1
0.0 0.00
59.6
0 50 100 150
Gamma Ray (API Units)
Bayes’ rule allocation: Assign observation to class with
highest posterior probability.
sandstone
0.04
0.02
0.4 kernel pdf for shale
0.01
0.2
0.0 0.00
0 50 100 150
Gamma Ray (API Units)
Relationship to Discriminant Analysis