Professional Documents
Culture Documents
NETWORK
OBJECTIVES
You should be able to do the following:
1. Understand the basic concepts of Bayes’ Theorem
2. Perform Bayesian Analysis using GeNIe
IMAGINE
IT IS YOU!
One day…
Cough
Fever
Sore
throat
Sore
Cough Fever
throat
COVID-19
But then a new symptom
emerges…
Chest
Pain
Now you are
not sure
what is
happening
with you…
You are dealing with
UNCERTAINTY
You believe that you are having a
Covid-19
Sore Chest
Cough Fever
throat Pain
BN… Class
Performance
Assignment Final
Quiz Midterm
Exam
BAYESIAN
NETWORK
• A BN is a special type of diagram
(called a directed graph) together
with an associated set of
probability tables.
• The graph consists of nodes and arcs.
• The nodes represent variables, which
can be discrete or continuous.
• The arcs represent causal
relationships between
variables.
Node
Heart
Disease
Sore Chest
Cough Fever
throat Pain
𝑃 𝐻 = 𝑡𝑟𝑢𝑒, 𝐹 = 𝑡𝑟𝑢𝑒
𝑃 𝐻 = 𝑡𝑟𝑢𝑒 𝐹 = 𝑡𝑟𝑢𝑒 =
𝑃(𝐹 = 𝑡𝑟𝑢𝑒)
𝑃 𝐻∩𝐹
𝑃 𝐻𝐹 = 𝑃 𝐻 ∩ 𝐹 = 𝑃 𝐻 𝐹 𝑃(𝐹)
𝑃(𝐹)
Bayes’ Theorem
P(A l B) can be defined without joint probability
P(A,B) by rearranging the conditional
probability formula as given below
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
𝑃 𝐵 𝐴 𝑃(𝐴)
𝑃 𝐴𝐵 =
𝑃(𝐵)
What if we have 3 variables?
Remember…
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
𝑃 𝐴 ∩ 𝐵 = 𝑃(𝐴, 𝐵) = 𝑃 𝐴 𝐵 𝑃(𝐵)
So…
𝑃 𝐴, 𝐵, 𝐶 = 𝑃(𝐴 ∩ 𝐵 ∩ 𝐶) = 𝑃 𝐴 𝐵, 𝐶 𝑃(𝐵, 𝐶)
= 𝑃 𝐴 𝐵, 𝐶 𝑃 𝐵 𝐶 𝑃(𝐶)
Directed Acyclic Graphs Parent of B
(DAG) A
A Bayesian network is made up of
1. A directed Acyclic Graph
Child of A/ Parent
2. Set of tables for each node of C and D
B
A is called ancestor of D or C
D or C is a descendent of A C D
Child of B
Child of B
A A
B B
C D C D
ACYCLIC CYCLIC
BN EXAMPLE (during
probstat class)
A printer manufacturer obtained the following three types of
printer failure probabilities. Hardware P(H) = 0.3, software
P(S) = 0.6, and other P(O) = 0.1.
Also, P(F | H) = 0.9, P(F | S) = 0.2, and P(F | O) = 0.5.
Types of failure
Failure occurrence
Child
BN EXAMPLE (during
probstat class)
Probabilities
Failure Occurrence
Probabilities
Computer
Failure
Child
BN EXAMPLE
Probabilities: Computer failure (C)
Electricity failure (E) E M C P(C|E,M)
STATE P(E) yes yes Yes 1
Yes 0.1 yes yes No 0
No 0.9 yes no Yes 1
yes no No 0
Computer Malfunction (M)
no yes Yes 0.5
STATE P(M)
no yes No 0.5
Yes 0.2
No 0.8
no no Yes 0
no no No 1
BN EXAMPLE 𝑃 𝐶 = 𝑦𝑒𝑠
= 𝜎𝐸,𝑀 𝑃 𝐶 = 𝑦𝑒𝑠, 𝐸, 𝑀
Computer failure (C) = 𝑃 𝐶 = 𝑦𝑒𝑠 𝐸, 𝑀 𝑃 𝐸 𝑃 𝑀
E M C P(C|E,M)
yes yes Yes 1 P(C = yes l E = no, M = no). P(E
yes yes No 0 = no). P(M = no) +
yes no Yes 1 P(C = yes l E = yes, M = yes).
yes no No 0 P(E = yes). P(M = yes)
P(C = yes l E = yes, M = no).
no yes Yes 0.5
P(E = yes). P(M = no) +
no yes No 0.5 = P(C = yes l E = no, M = yes).
no no Yes 0 P(E = no). P(M = yes) +
no no No 1
BN EXAMPLE
P(C=yes)= 0.5x0.9x0.2 + 1x0.1x0.8 + 0x0.9x0.8 + 1x0.1x0.2 = 0.19