Post on 25-Oct-2021
Bayesian Networks for Reliability and Risk Analysis
Michele Compare
2
Basics
Bayesian Networks: key concepts
Bayesian Networks for Reliability and Risk Analysis
Applications
Enhancements
Probability
Definition: Probability P is a function that maps all events A onto real
numbers and satisfies the following three axioms:
1. If S is the set of all possible outcomes, then ๐(๐) = 1
2. 0 โค ๐(๐ด) โค 1
3. If A and B are mutually exclusive (๐ด โฉ ๐ต = โ ) then
๐(๐ด โช ๐ต) = ๐(๐ด) + ๐(๐ต)
From the three axioms it follows that:
I. ๐(โ ) = 0
II. If ๐ด โ ๐ต, then ๐(๐ด) โค ๐(๐ต)
III. ๐( าง๐ด) = 1 โ ๐(๐ด)
IV. ๐(๐ด โช ๐ต) = ๐(๐ด) + ๐(๐ต) โ ๐(๐ด โฉ ๐ต)
3
Conditional probability
Definition of independence: Two events A and B are independent if
๐(๐ด โฉ ๐ต) = ๐(๐ด)๐(๐ต)
Conditional probability ๐(๐ด|๐ต) of A given that B has occurred is
๐ ๐ด ๐ต =๐(๐ดโฉ๐ต)
๐(๐ต)
Note: If A and B are independent, the probability of A (B) does not
depend on whether B (A) has occurred or not:
๐ ๐ด ๐ต =๐(๐ด โฉ ๐ต)
๐(๐ต)=๐ ๐ด ๐(๐ต)
๐(๐ต)= ๐(๐ด)
4
Law of total probability
If ๐ธ1,โฆ., ๐ธ๐ are mutually exclusive and collectively exhaustive
events, then
๐(๐ด) = ๐(๐ด|๐ธ1)๐(๐ธ1) + โฏ+ ๐(๐ด|๐ธ๐)๐(๐ธ๐)
Most frequent use of this law:
โ Events A and B are mutually exclusive and collectively exhaustive
โ Probabilities ๐(๐ด|๐ต), ๐(๐ด| เดค๐ต), and ๐(๐ต) are known
โ These can be used to compute
๐(๐ด) = ๐(๐ด|๐ต)๐(๐ต) + ๐(๐ด| เดค๐ต)๐( เดค๐ต)
5
Bayesโ rule
Bayesโ rule: ๐ ๐ด ๐ต =๐(๐ต|๐ด)โ๐(๐ด)
๐(๐ต)
It follows from:
โข Definition of conditional probability:
๐ ๐ด ๐ต =๐(๐ดโฉ๐ต)
๐(๐ต); ๐ ๐ต ๐ด =
๐(๐ตโฉ๐ด)
๐(๐ด).
โข Commutative laws: ๐ ๐ต โฉ ๐ด = ๐ ๐ด โฉ ๐ต .
6
Bayesโ rule
Example:
โช The probability of a fire in a certain building is 1/10000 any given day.
โช An alarm goes off whenever there is an actual fire, but also once in
every 200 days for no reason (false alarm).
โช Suppose the alarm goes off. What is the probability that there is a
fire?
Solution:
๐น = ๐น๐๐๐, เดค๐น = ๐๐ ๐๐๐๐, ๐ด = ๐ด๐๐๐๐, าง๐ด = ๐๐ ๐๐๐๐๐
๐ ๐น = 0.0001, ๐( เดค๐น) = 0.9999, ๐(๐ด|๐น) = 1, ๐(๐ด| เดค๐น) = 0.005
Bayes: ๐(๐น|๐ด) =๐(๐ด|๐น)๐ ๐น
๐ ๐ด=
1โ0.0001
0.0051โ 2%
Law of total probability: ๐(๐ด) = ๐(๐ด|๐น)๐(๐น) + ๐(๐ด| เดค๐น) ๐( เดค๐น) = 0.0051
7
Exercise
A test for diagnosing a particular degradation mechanism is known to be
95% accurate.
The test is performed on a component and the result is positive.
Suppose the component comes from a fleet of 100โ000, where 2000
suffer from this degradation.
What is the probability that the component is affected by the considered
degradation mechanism?
8
Solution
T=1 โ test positive; T=0 โ test negative
D= component affected by degradation mechanism
H= healthy component
๐ ๐ = 1 ๐ท = 0.95, ๐ ๐ = 1 ๐ป = 0.05
๐ ๐ = 0 ๐ท = 0.05, ๐ ๐ = 0 ๐ป = 0.95
๐ ๐ท ๐ = 1 =๐ ๐ = 1 ๐ท โ ๐(๐ท)
๐ ๐ = 1 ๐ท โ ๐ ๐ท + ๐ ๐ = 1 ๐ป โ ๐(๐ป)
=0.95 โ 0.02
0.95 โ 0.02 + 0.05 โ 0.98= 0.279
Notice that this definition of test accuracy entails that the probability of
having a positive test is 0.95 only if you already know that the component is
degraded!
9
10
Basics
Bayesian Networks: key concepts
Bayesian Networks for Reliability and Risk Analysis
Applications
Enhancements
Bayesian Networks: what? 11
Bayesian Network (BN): is a directed acyclic graph consisting of:
โข Nodes ๐ = {1,โฆ , ๐}, shown as circles, represent the random events
whose combination can lead to system failure.
โข Directed arcs ๐ธ โ {(๐, ๐)|๐, ๐ โ ๐, ๐ โ ๐} indicate conditional
dependencies among nodes. Specifically, the arc (๐, ๐) โ ๐ธ which connects
node ๐ โ ๐ to node ๐ โ ๐ shows that the event at node ๐ is conditionally
dependent to the event at node ๐.
Bayesian Network are also called Bayesian Belief Networks (BBNs)
Bayesian Network Example
Gas
leakage
Detection
system 1
Detection
System 1
Alarm
Leakage
yes
Leakage
no
0.01 0.99
Leakage DS1:
Activated
DS1:
Not Activated
Yes 0.95 0.05
No 0.05 0.95
Detection
System 1
Detection
System 2
Alarm:
yes
Alarm:
no
Activated Activated 0.99 0.01
Activated Not
Activated
0.95 0.05
Not
Activated
Activated 0.95 0.05
Not
Activated
Not
Activated
0.01 0.99
Leakage DS2:
Activated
DS2:
Not Activated
Yes 0.95 0.05
No 0.05 0.95
Acyclicโฆ what?
A path is a sequence of nodes (๐1, ๐2, โฆ , ๐๐), ๐ > 1 such that
๐๐ , ๐๐+1 โ ๐ธ; ๐ < ๐
BBN acyclic โ there is no path (๐1, ๐2, โฆ , ๐๐), ๐ > 1 such that
๐๐ , ๐๐+1 โ ๐ธ, ๐ < ๐ and ๐1 = ๐๐
13
Gas
leakage
Detection
system 1
Detection
System 1
Alarm
Bayesian Networks, why? 14
Bayesian networks are probabilistic graphical models, which offer a
convenient and efficient way of generating joint distribution of all its events.
โข Convenient: causal relationships between events are easy to model.
โข Efficient: no redundancies in terms of graphical modelling and probability computations.
โข Flexible: capable of handling imprecise information by capturing quantitative and qualitative data.
โMicrosoftโs competitive advantage lies in its expertise in Bayesian Networksโ-- Bill Gates, quoted in LA Times, 1996
Solving Bayesian Networks
The immediate follower nodes of ๐ โ ๐: ๐+๐ = {๐| ๐, ๐ โ ๐ธ}
The immediate predecessor nodes (parent) of ๐ โ ๐: ๐โ๐ = {๐| ๐, ๐ โ ๐ธ}
All nodes can be partitioned into
โข Leaf nodes ๐๐ฟ = {๐ โ ๐|๐โ๐ = โ }
โข Dependent nodes ๐๐ท = ๐ \๐๐ฟ = {๐ โ ๐|๐โ๐ โ โ }
The depth of node ๐ โ ๐ in the network can be calculated recursively by
๐๐ = แ0 ๐โ
๐ = โ
1 + max๐โ ๐โ
๐๐๐ ๐โ
๐ โ โ
15
Solving Bayesian Networks 16
๐ฟ๐ = random variable representing the uncertainty in the state of event at
node ๐ โ ๐.
The realization ๐ of ๐ฟ๐ belongs to the set of states ๐๐ = {0,โฆ , |๐๐|}
๐ฟ = ๐ฟ1, โฆ , ๐ฟ๐ = BN state vector
๐ ๐ฟ =เท
๐=๐
๐ต
๐ ๐ฟ๐ ๐ฟ๐ , ๐ โ ๐โ๐
The BN can be solved by propagating the uncertainty from leaf nodes ๐๐ฟ
to nodes with the largest depth
Computational issues
Factored representation may have exponentially fewer parameters than full
joint ๐ ๐ฟ
If |Si|=2 for every i, the number of parameters reduces from 25 โ 1 = 31
to 1+1+2+4+2=10
E B
R A
C
Computational issues
Factored representation may have exponentially fewer parameters than full
joint ๐ ๐ฟ
A real case study: Monitoring Intensive-Care Patients
โข 37 variables
โข 509 parameters, instead of 237
PCWP CO
HRBP
HREKG HRSAT
ERRCAUTERHRHISTORY
CATECHOL
SAO2 EXPCO2
ARTCO2
VENTALV
VENTLUNG VENITUBE
DISCONNECT
MINVOLSET
VENTMACHKINKEDTUBEINTUBATIONPULMEMBOLUS
PAP SHUNT
ANAPHYLAXIS
MINOVL
PVSAT
FIO2
PRESS
INSUFFANESTHTPR
LVFAILURE
ERRBLOWOUTPUTSTROEVOLUMELVEDVOLUME
HYPOVOLEMIA
CVP
BPFigure from N. Friedman
Computational issues 19
Theorem: Computing event probabilities in a Bayesian network is NP-hard.
Hardness does not mean it is impossible to perform inference, but
โข There is no general procedure that works efficiently for all networks.
โข For particular families of networks, there are proved efficient procedures.
โข Different algorithms are developed for inferences in Bayesian networks.
There are available software that efficiently perform Bayesian Network inference
through a library of functions for several popular algorithms, among those:
โข GeNIe Modeler: https://www.bayesfusion.com/genie-modeler
โข HUGIN Expert: https://www.hugin.com/
Inference
Assume to collect some observation (evidence) from the system. In this
case the state is said โinstantiatedโ
How would this evidence impact the probabilities of the events?
Consider the following three schemes:
20
A B C Serial connection
A
B C
Diverging connection
A
B C
Converging connection
Serial Connection
โข Evidence on A influences successor nodes
โข Evidence on C influences predecessor nodes
โข Evidence on B makes A and C independent
Example
A: Failure Event (yes/no)
B: Alarm Activation (yes/no)
C: Plant Evacuation (yes/no)
If we have evidence of a Failure Eventโ we change the probability of
Alarm Activation and, then, the probability of having a Plant Evacuation.
If we have evidence of Plant Evacuation โ we change the probability of
Alarm Activation and, then, the probability of having a failure event.
If we know that the alarm is or not activated, we stop the communication
between Failure Event and Plant Evacuation
21
A B C
Diverging Connection 22
A
B C
Diverging connection
โข Evidence on A influences nodes B and C
โข Evidence on C influences A and, then, B
โข Evidence on A stops communication between B and C
Example
A: Failure Event (yes/no)
B: Detection System 1 (activated/not activated)
C: Detection System 2 (activated/not activated)
If we have evidence of the activation of Detection System 1 โ we
change the probability of failure event and, then, the probability of
activation of Detection System 2.
If we know whether the failure event is occurrred, we know the probability
of activation of Detection System 1 and Detection System 2, which do
not influence each other
Converging Connection 23
C
B A
โข Evidence on C influences nodes B and A
โข Evidence on B influences node C,only
โข Evidence on C and B, influences node A
differently from influence of node C only
Example
A: Fuel level in a car (empty/full)
B: Spark plugs (working/failed)
C: Start (Yes/No)
If we have evidence that the car cannot startโ we change the probability
that the fuel level is empty and sparks are failed.
If we have evidence that the car cannot start and that the fuel is fullโ we
change the probability that sparks are failed
d-separation
In a Bayesian Network, two nodes A and B are d-separated if for all
indirected paths between A and B there is a node C such that at least
one of the following conditions holds:
โข The connection A-B is serial or diverging and C is instantiated
โข The connection A-B contains converging structure and neither C nor
any of Cโs successors are instantiated
If events A and B are d-separeted, evidence on A does not influence B
24
Example 25
A C B
D E F
H I J
G
K L
M
Are A and B d-separated?
Example 26
A C B
D E F
H I J
G
K L
M
Are A and B d-separated?
Yes, on
this path
Example 27
A C B
D E F
H I J
G
K L
M
Are A and B d-separated?
d-connected
by this path
Inference on Bayesian Networks 28
Question: assume to collect some observations (evidence) from the system;
how would this evidence impact the probabilities of the events?
The conditional probability of a random event given the evidence is known as a
posteriori belief, useful in case of:
โข Prediction: computing the probability of an outcome event given the
starting condition โ Target is a descendent of the evidence!
โข Diagnosis: computing the probability of disease/fault given symptoms โ
Target is an ancestor of the evidence!
Note: probabilistic inference can propagate and combine evidences from all parts
of the network (the directions of arcs do not limit the directions of the queries)
Computer example 29
Electric failure Malfunction
Computer failure
Use backup power
Restart
P(E)
0.001
P(M)
0.02
E M P(C)
T T 0.95T F 0.94F T 0.29F F 0.001
C P(B)
T 0.80F 0.01
C P(R)T 0.90F 0.05
Examples of inference 30
๐ ๐ต ๐ธ = ๐ ๐ต ๐ถ ๐ ๐ถ ๐ธ + ๐ ๐ต าง๐ถ ๐( าง๐ถ|๐ธ)
๐ ๐ถ ๐ธ = ๐ ๐ถ| เดฅ๐, ๐ธ ๐ เดฅ๐ + ๐ ๐ถ|๐, ๐ธ ๐ ๐
๐ ๐ถ ๐ธ = 0.98 โ 0.94 + 0.02 โ 0.95 = 0.94
๐ ๐ต ๐ธ = ๐ ๐ถ ๐ธ โ 0.8 + ๐( าง๐ถ|๐ธ) โ 0.01
๐ ๐ต ๐ธ = 0.94 โ 0.8 + 0.06 โ 0.01 = 0.75
What it is the probability that the backup power is working given an electrical
failure?
Exercise on inference 31
What it is the probability that the electricity is working given a backup power
failure?
Solution 32
What it is the probability that the electricity is working given a backup power
failure?
๐ ๐ธ ๐ต =๐ ๐ต ๐ธ ๐(๐ธ)
๐(๐ต)
๐ ๐ธ ๐ต =0.75 โ 0.001
0.016= 0.047
๐ ๐ต = ๐ ๐ต ๐ถ ๐ ๐ถ + ๐ ๐ต าง๐ถ ๐( าง๐ถ)
๐ ๐ต = 0.8 โ 0.0077 + 0.01 โ 0.9923 = 0.016
๐ ๐ถ= ๐ ๐ถ ๐ธ,๐ ๐ ๐ธ ๐ ๐+ ๐ ๐ถ ๐ธ, เดฅ๐ ๐ ๐ธ ๐ เดฅ๐+ ๐ ๐ถ เดค๐ธ,๐ ๐ เดค๐ธ ๐ ๐+ ๐ ๐ถ เดค๐ธ, เดฅ๐ ๐ เดค๐ธ ๐ เดฅ๐ = 0.0077
33
Basics
Bayesian Networks: key concepts
Bayesian Network for Reliability and Risk Analysis
Applications
Enhancements
BNs for Risk and Reliability Analysis 34
Scenario modeling and quantification are pursued through:
FAULT TREE ANALYSIS (FTA)
1. Events are binary events
(operating/not-operating);
2. Events are statistically independent;
3. Relationships between events and
causes are represented by logical gates
(e.g., AND and OR for coherent FT);
4. The undesirable event, called Top
Event, is postulated and the possible
ways for the occurrence of this event are
systematically deduced.
BNs for Risk and Reliability Analysis 35
Scenario modeling and quantification are pursued through:
EVENT TREE ANALYSIS (ETA)
1. System evolution following the hazardous
occurrence is divided into discrete events;
2. System evolution starts from an initiating
event;
3. Each event has a finite set of outcomes
(commonly there are two outcomes:
occurring event or not occurring) associated
with the occurrence probabilities;
4. The leafs of the event tree represent the
event scenarios to be analyzed.
Mapping FT into Bayesian Network 36
Reference: Bobbio A.,
Portinale L., Minichino M.,
Ciancamerla E., โImproving
the analysis of dependable
systems by mapping fault
trees into Bayesian
networksโ, Reliability
Engineering and System
Safety 71, pp. 249โ260
(2001) .
Switching
from binary
logic to
probabilistic
logic!
Any event tree with three events ๐๐, ๐๐, and ๐๐ can be represented
by the BN shown below.
Two types of directed arc complete the network:
โช Consequence arcs (shown as dotted lines) connect each event node
to the consequence node. This relationship is deterministic: the
probability table for the consequence node encodes the logical
relationship between the events and the consequences.
โช Causal arcs (shown as solid lines) connect each event node to all
events later in time. For instance, event ๐๐ is a causal factor for event
๐๐, thus it influences the probability of event ๐๐.
37Mapping ET into Bayesian Network
Reference: Bearfield G.,
Marsh W., โGeneralizing
Event Trees Using
Bayesian Networks with
a Case Study of Train
Derailmentโ, Computer
Safety, Reliability, and
Security (2005).
38Mapping ET into Bayesian Network
(alternatives)
Reliability Modeling through BN: example
(Look whoโs back!)
The generation system fails when the delivered power is under 60KVA
39
Reliability Modeling through BN: example
(Look whoโs back!)40
Line 1Line 2
Line 3
Reliability Modeling through BN: example
(Look whoโs back!)41
Line 1Line 2
Line 3
Reliability Modeling through BN: example
(Look whoโs back!)42
Line 1Line 2
Line 3
Reliability Modeling through BN: example
(Look whoโs back!)43
Line 1Line 2
Line 3
Reliability Modeling through BN: example
(Look whoโs back!)44
Line 1Line 2
Line 3
Advantages of BN model
Multi-state modeling
Advantages of BN model
Multi-state modeling
Extension of concepts of AND/OR gates
Failure probabilities
Information sources
โข Information provided by AND/OR gates in BT.
โข Statistical analyses / Simulations.
โข Expert elicitation.
47
48
Basics
Bayesian Networks: key concepts
Bayesian Network for Reliability and Risk Analysis
Applications
Enhancements
BN applications
โข Medical diagnosis
โข Genetic pedigree analysis
โข Speech recognition (HMMs)
โข Gene sequence/expression analysis
โข Microsoft Answer Wizards, (printer) troubleshooters
โข โฆ
BNs applications to Risk and Reliability
Engineering50
BNs have been applied to different contexts in Reliability and
Risk Engineering
โข Risk & Vulnerability analysis
A. Misuri, N. Khakzad, G. Reniers, V. Cozzani, A Bayesian
network methodology for optimal security management of critical
infrastructures, Reliability Engineering and System Safety 000
(2018) 1โ14
BNs applications to Risk and Reliability
Engineering51
BNs have been applied to different contexts in Reliability and
Risk Engineering
โข Risk & Vulnerability analysis
โข Human Reliability Analysis
K. Zwirglmaier, D. Straub, K.M. Groth, Capturing cognitive causal
paths in human reliability analysis with Bayesian network
models, Reliability Engineering and System Safety 158 (2017)
117โ129
BNs applications to Risk and Reliability
Engineering52
BNs have been applied to different contexts in Reliability and
Risk Engineering
โข Risk & Vulnerability analysis
โข Human Reliability Analysis
โข Risk assessment of complex systems considering multiple objectives
(e.g., availability, safety, etc.)
BNs applications to Risk and Reliability
Engineering53
BNs have been applied to different contexts in Reliability and
Risk Engineering
โข Risk & Vulnerability analysis
โข Human Reliability Analysis
โข Risk assessment of complex systems considering multiple objectives (e.g.,
availability, safety, etc.)
โข Risk modeling of process plants
B. Ale, C. van Gulijk, A. Hanea, D. Hanea, P. Hudson, P.-H.
Lin, S. Sillem, Towards BBN based risk modelling of process
plants, Safety Science, 69, pp. 48-56, 2014.
BNs applications to Risk and Reliability
Engineering54
BNs have been applied to different contexts in Reliability and
Risk Engineering
โข Risk & Vulnerability analysis
โข Human Reliability Analysis
โข Risk assessment of complex systems considering multiple objectives (e.g.,
availability, safety, etc.)
โข Risk modeling of process plants
โข โฆ
55
Basics
Bayesian Networks: key concepts
Bayesian Network for Reliability and Risk Analysis
Applications
Enhancements
BNs for Decisions: Influence Diagrams
Influence Diagrams 56
Influence Diagrams (IDs) extend BNs to support decision makers to identify the optimal decision policy
Wellโฆ
niceโฆ but
now?
From Bayesian Networks to Influence
Diagrams
It is possible to apply actions on nodes ๐๐ด โ ๐ โ the probability
distribution of follower nodes is modified ๐(๐ฟ๐) โ ๐(๐ฟ๐๐ )
Nodes ๐๐ด are usually indicated by squares (instead of circles)
The set of alternative actions at node ๐ โ ๐๐ด is ๐ด๐ = {1, โฆ , |๐ด๐|}.
57
What if I
improve the
reliability of B?
From Bayesian Networks to Influence
Diagrams
It is possible to apply actions on nodes ๐๐ด โ ๐ โ the probability
distribution of follower nodes is modified ๐(๐ฟ๐) โ ๐(๐ฟ๐๐ )
Nodes ๐๐ด are usually indicated by squares (instead of circles)
The set of alternative actions at node ๐ โ ๐๐ด is ๐ด๐ = {1, โฆ , |๐ด๐|}.
58
โฆOk. The situation
changes, but how can
I decide whether to
take the action?
From Bayesian Networks to Influence
Diagrams
It is possible also to consider a utility node
โข All decision problems rely on preferences, i.e., the ordering of
alternatives based on their relative utilityโ utility is a measure of
preference
โข Utility function maps on the set of real numbers the outcomes of a
decision process, which can concern both objective quantities
(material usage, factory output, financial gain, etc.) and quantities with
no obvious numerical measure (e.g., health state, customer
satisfaction, etc.)
โข Utility functions are obtained from a decision maker through utility
elicitation (subjective)
โข Utility is determined up to a linear transformation: a decision maker
preference over different alternatives is invariant to multiplying the
utility by a non-negative number and adding a constant โ utility has
neither a meaningful zero point, nor a meaningful scale
59
From Bayesian Networks to Influence
Diagrams60
Utility node: gain 100 if
node C ok, loose 10000
if failed.
Result: Expected Utility
Action node: in this
case two alternatives
(i.e., Improve, Do
Nothing)
Action Node changes
the failure probabilityImprove Do Nothing
Ok 0.99 0.947
Failed 0.01 0.053
Ok, Iโll select
the portfolio
maximizing
the utility
Application of Influence Diagrams: Value of
Information61
VOI for node i is the expected difference in expected utility (EU)
for the two situations:
โข Node i is observed,
โข Node i is unobserved.
Rougly speaking: VOI is the price that one would be willing to
pay in order to gain access to perfect information
Application of Influence Diagrams: Value of
Information62
๐ธ๐๐ = max๐
๐ ๐
๐๐ ๐๐ ๐,๐ ๐ = max๐
0.93 โ โ10 + 0.07 โ 0; 0.93 โ 100 + 0.07 โ โ1000 = 23
Expected monetary value: The maximum utility if choosing without knowing the value of node C
๐ธ๐๐๐ผ =
๐ ๐
๐๐ ๐max๐(๐ ๐,๐ ๐) = 0.93 โ 100 + 0.07 โ 0 = 93
๐๐๐ผ = ๐ธ๐๐๐ผ โ ๐ธ๐๐=70
The expected value given perfect information of node C
C: Probability of failure in the
next maintenance interval
The value of having a prognostic system!