Bayesian Belief Network
Bayesian Belief Network
Bayesian Belief Network
Network
Bayesian Network
2
Motivation
We want a representation and
reasoning system that is based on
conditional independence
Compact yet expressive representation
Efficient reasoning procedures
Bayesian Networks are such a Thomas Bayes
representation
Named after Thomas Bayes (ca. 1702 –
1761)
Term coined in 1985 by Judea Pearl (1936
– )
Their invention changed the focus on AI
from logic to probability!
Judea Pearl
Bayesian Network
Bayesian belief network is a useful way
to represent probabilistic models and
visualize them.
General form:
models
Examples of 3-way Bayesian
Networks
A B C Absolute Independence:
p(A,B,C) = p(A) p(B) p(C)
Examples of 3-way Bayesian Networks
Conditionally independent
effects:
A
B and C are conditionally
independent given A
B C
Independent Clauses:
A B
“Explaining away” effect:
C
A and B are independent but become
dependent once C is known!!
(we’ll come back to this later)
Examples of 3-way Bayesian
Networks
A B C Markov dependence:
p(A,B,C) = p(C|B) p(B|A)p(A)
Consider an example
P(C)
Windy Cloudy 0.002
P(W)
W C P(R)
0.001
Rains T T 0.95
T F 0.95
F T 0.29
F F 0.001
Wet R P(W)
grass T 0.90 Take R P(0)
off
F 0.05 from T 0.91
work F 0.00
1
Find the probability of having a wet grass?
………………………………….
P(~W⋀~C)
(2)
= 0.95*0.001*0.002+ 0.29*(1-
0.001)*0.002+0.95*0.001*(1-0.002)+0.001*(1-
0.001)*(1-0.002) = 0.00252
P(R)= 0.00252
…………………………………. (3)
P(W⋀C)+P(~R/~W,C)* P(~W ⋀C)+
P(~R)= P(~R/W,C) *
………………….
* P(~W⋀~C)
(4)
= (1-0.95)*0.001*0.002+ (1-0.29)*(1-
0.001)*0.002+(1-0.95)*0.001*(1-
0.002)+(1- 0.001)*(1-0.001)*(1-0.002) =
0.9974
P(~R) = 0.9974
Sub. Eq.3 and 5 in Eq.1
= 0.0521
The Alarm Example
You have a new burglar alarm installed
It is reliable in detecting burglary, but responds to minor
earthquakes
Two neighbors (John, and Mary) promise to call you at work
when they hear the alarm
John always calls when hears an alarm, but confuses alarm
Given evidence about who has and hasn’t called, estimate the
probability of a burglary
The Alarm Example
Represent problem using 5 binary variables:
B = a burglary occurs at your house
E = an earthquake occurs at your house
A = the alarm goes off
J = John calls to report the alarm
M = Mary calls to report the alarm
What is P(B | M, J) ?
P(j m a b e) = P (j | a) P (m | a) P
(a | b, e) P (b) P (e)
= 0.90*0.70*0.001*0.999*0.998
= 0.00062
Sol. 2.
= 0.00252
* P(~b⋀~e)
P(~a) = P(~a/b,e) * P(b⋀e)+P(~a/~b,e)* P(~b ⋀e)+
Similarly,
Fill in conditional
probability tables (CPTs)
One for each node
entries, where is the number of
parents
Where do these
probabilities come from?
Expert knowledge
From data (relative frequency
estimates)
Or a combination of both
The Bayesian network
First you choose the variables. In this case, all are Boolean:
Tampering is true when the alarm has been tampered with
building
Report is true if the sensor reports that lots of people are
A B C
Independence
True False
True False
Explaining Away
Earth doesn’t care whether your
house is currently being burgled
While you are on vacation, one of
your neighbors calls and tells you
your home’s burglar alarm is
ringing.
But now suppose you learn that
there was a medium-sized
earthquake in your neighborhood.
Oh, whew! Probably not a burglar
after all.