Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bayesian Networks – Principles and Application to Modelling water, governance and human development indicators in Developing Countries Jorge López Puga.

Similar presentations


Presentation on theme: "Bayesian Networks – Principles and Application to Modelling water, governance and human development indicators in Developing Countries Jorge López Puga."— Presentation transcript:

1 Bayesian Networks – Principles and Application to Modelling water, governance and human development indicators in Developing Countries Jorge López Puga (jpuga@ual.es) Área de Metodología de las Ciencias del Comportamiento Universidad de Almería www.ual.es/personal/jpuga February 2012

2 Water4Dev – Feb/2012 2 The Content of the Sections 1.What is probability? 2.The Bayes Theorem Deduction of the theorem The Balls problem 3.Introduction to Bayesian Networks Historical background Qualitative and quantitative dimensions Advantages and disadvantages of Bayes nets Software

3 Water4Dev – Feb/2012 3 What is Probability? Etymology ► Measure of authority of a witness in a legal case (Europe) Interpretations of Probability ► Objective probability Aprioristic or classical Frequentist or empirical ► Subjective probability Belief

4 Water4Dev – Feb/2012 4 Objective Probability Classical (Laplace, 1812- 1814) ► A priory ► Aprioristic ► Equiprobability ► Full knowledge about the sample space Frequentist ► Random experiment ► Well defined sample space ► Posterior probability ► Randomness

5 Water4Dev – Feb/2012 5 Subjective Probability It is simply an individual degree of belief which is updated based on experience Probability Axioms ► p(SE) = 1 ► p(…) ≥ 0 ► If two events are mutually exclusive ( A  B = Ø ), then p(A  B) = p(A) + p(B)

6 Water4Dev – Feb/2012 6 Cards Game Let me show you the idea of probability with a cards game Classical vs. Frequentist vs. Subjective

7 Water4Dev – Feb/2012 7 Which is the probability of getting an ace? As you probably know…

8 Water4Dev – Feb/2012 8 Which is the probability of getting an ace? Given that there are 52 cards and 4 aces in a French deck… ► We could say… Aprioristic If we repeated the experience a finite number of times Frequenti st If I subjectively assess that probability Bayesian

9 Water4Dev – Feb/2012 9 Which is the probability of getting an ace? Why is useful a Bayesian interpretation of probability? – Let’s play ► We could say… Probability estimations depends on our state of knowledge (Dixon, 1964)

10 The Bayesian Theorem Getting Evidences and Updating Probabilities

11 Water4Dev – Feb/2012 11 Joint and Conditional Probability Joint probability (Distributions – of variables) ► It represents the likelihood of two events occurring at the same time ► It is the same that the intersection of events ► Notation p(A  B), p(A,B), p(AB) Estimation ► Independent events ► Dependent events

12 Water4Dev – Feb/2012 12 Independent events ► p(AB) = p(A) × p(B) or p(BA) = p(B) × p(A) Example: which is the probability of obtaining two tails (T) after tossing two coins? p(TT) = p(T) × p(T) = 0.5 × 0.5 = 0.25 Dependent events ► Conditional probability and the symbol “|” ► p(AB) = p(A|B) × p(B) or p(BA) = p(B|A) × p(A) Example: which is the probability of suffering from bronchitis (B) and being a smoker (S) at the same time? p(B) = 0.25 p(S|B) = 0.6 p(SB) = p(S|B) × p(B) = 0.6 × 0.25 = 0.15

13 Water4Dev – Feb/2012 13 The Bayes Theorem It is a generalization of the conditional probability applied to the joint probability It is: You can deduce it because: p(AB) = p(A|B) × p(B) - - - - - p(BA) = p(B|A) × p(A) p(A|B) × p(B) = p(B|A) × p(A) p(A|B) = p(B|A) × p(A) / p(B)

14 Water4Dev – Feb/2012 14 Example: which is the probability of a person suffering from bronchitis (B) given s/he smokes (S)? p(B) = 0.25 p(S|B) = 0.6 p(S) = 0.40

15 Water4Dev – Feb/2012 15 The Total Probability Teorem If we use a system based on a mutually excusive set of events  = {A 1, A 2, A 3,…A n } whose probabilities sum to unity, then the probability of an arbitrary event (B) equals to: which means:

16 Water4Dev – Feb/2012 16 If  = {A 1, A 2, A 3,…A n } is a mutually excusive set of events whose probabilities sum to unity, then the Bayes Theorem becomes: Let’s use a typical example to see how it works

17 Water4Dev – Feb/2012 17 The Balls problem Situation: we have got three boxes (B 1, B 2, B 3 ) with the following content of balls: Experiment: extracting a ball, looking at its colour and determining from which box was extracted 30% 60% 10% Box 1 40% 30% Box 2 10% 70% 20% Box 3

18 Water4Dev – Feb/2012 18 Let’s consider that the probability of selecting each box is the same: p(B i ) = 1/3 Imagine someone gives you a white ball, which is the probability that the ball was extracted from box 2? p(B 2 |W) = ???? 30% 60% 10% Box 1 40% 30% Box 2 10% 70% 20% Box 3

19 Water4Dev – Feb/2012 19 p(B 2 |W) = ???? By definition we know that: p(W|B 1 ) = 0.3p(W|B 2 ) = 0.4p(W|B 2 ) = 0.1 But we do not know p(W) 30% 60% 10% Box 1 40% 30% Box 2 10% 70% 20% Box 3

20 Water4Dev – Feb/2012 20 p(B 2 |W) = ???? ► But we can use the total probability theorem to discover the value of p(W): 30% 60% 10% Box 1 40% 30% Box 2 10% 70% 20% Box 3

21 Water4Dev – Feb/2012 21 ► The following table shows changes in beliefs ► Imagine we were given a red ball, what would be the updated probability for each box? Prior Posterio r Prior Posterio r

22 Water4Dev – Feb/2012 22 ► Finally, what would be the probability for each box if we were said that a yellow ball was extracted? But, is there another way to solve this problem? ► Yes, there is ► Using a Bayesian Network ► Let’s use the Balls network Prior Posterio r

23 Bayesian Networks A brief Introduction

24 Water4Dev – Feb/2012 24 Brief Historical Background Late 70’s – early 80’s Artificial intelligence Machine learning and reasoning ► Expert system = Knowledge Base + Inference Engine Diagnostic decision tree, classification tree, flowchart or algorithm (Adapted from Cowell et. al., 1999)

25 Water4Dev – Feb/2012 25 Rule-based expert systems or production systems ► If…then IF headache & temperature THEN influenza IF influenza THEN sneezing IF influenza THEN weakness ► Certainty factor IF headache & fever THEN influenza (certainty 0.7) IF influenza THEN sneezing (certainty 0.9) IF influenza THEN weakness (certainty 0.6) (Example adpted from Cowell et. al., 1999)

26 Water4Dev – Feb/2012 26 What is a Bayesian Network? There are several names for it, among others: Bayes net, belief network, causal network, influence diagram, probabilistic expert system “a set of related uncertainties” (Edwards, 1998) For Xiang (2002): […] it is triad V, G, P where: ► V, is a set of variables ► G, is a directed acyclic graph (DAG) ► P, is a set of probability distributions To make things practical we could say: ► Qualitative dimension ► Quantitative dimension

27 Water4Dev – Feb/2012 27 Qualitative Structure Graph: a set of vertexes (V) and a set of links (L) Directed Acyclic Graph (DAG) The meaning of a connection: A  B The Principle of Conditional Independence Three types of basic connections | Evidence propagation A B C Serial connection Causal-chain model

28 Water4Dev – Feb/2012 28 Divergent connection Diverging connection Common-cause model B AC B AC Convergent connection Converging connection Common-effect model

29 Water4Dev – Feb/2012 A Classical Example Mr. Holmes is working in his office when he receives a phone call from his neighbour Dr. Watson, who tells him that Holmes’ burglar alarm has gone off. Convinced that a burglar has broken into his house, Holmes rushes to his car and heads for home. On his way, he listens to the radio, and in the news it is reported that there has been a small earthquake in the area. Knowing that earthquakes have a tendency to turn burglar alarms on, he returns to his work. 29

30 Water4Dev – Feb/2012 30 Quantitative Structure Probability as a belief (Cox, 1946; Dixon, 1970) Bayes Theorem Each variable (node) in the model is a conditional probability function of others variables Conditional Probability Tables (CPT)

31 Water4Dev – Feb/2012 31 Pros and cons of Bayes nets Qualitative - Quantitative Missing data Non-parametric models Interaction–non-linearity Inference – scenarios Local computations Easy interpretation Hybrid nets Time series Software

32 Water4Dev – Feb/2012 32 Software Netica Application (Norsys Software Corp.) www.norsys.com Hugin (Hugin Exper A/S) www.hugin.com Ergo (Noetic Systems Inc.) www.noeticsystems.com Elvira (Academic development) http://www.ia.uned.es/~elvira Tetrad (CMU, NASA, ONR) http://www.phil.cmu.edu/projects/tetrad/ R MATLAB

33 Water4Dev – Feb/2012 33 Thank you very much for your attention!


Download ppt "Bayesian Networks – Principles and Application to Modelling water, governance and human development indicators in Developing Countries Jorge López Puga."

Similar presentations


Ads by Google