Docsity

Probability and Conditional Independence in Bayesian Networks - Prof. Dana S. Nau, Study notes of Computer Science

Partial preview of the text

Download Probability and Conditional Independence in Bayesian Networks - Prof. Dana S. Nau and more Study notes Computer Science in PDF only on Docsity!

Last update: November 18, 2008

Uncertainty

CMSC 421: Chapter 13

Motivation

Let action At = leave for airport t minutes before flight Will At get me there on time?

Problems:

  1. partial observability (road state, other drivers’ plans, etc.)
  2. noisy sensors (radio traffic reports)
  3. uncertainty in action outcomes (flat tire, etc.)
  4. immense complexity of modelling and predicting traffic

Hence a purely logical approach either

  1. risks falsehood: “A 25 will get me there on time” or 2) leads to conclusions that are too weak for decision making: “A 25 will get me there on time if there’s no accident on the bridge and it doesn’t rain and my tires remain intact etc etc.”

Outline

♦ Probability

♦ Syntax and Semantics

♦ Inference

♦ Independence and Bayes’ Rule

Probability

Probabilistic assertions summarize effects of laziness: failure to enumerate exceptions, qualifications, etc. ignorance: lack of relevant facts, initial conditions, etc.

Subjective or Bayesian probability:

Probabilities relate propositions to one’s own state of knowledge e.g., P (A 25 |no reported accidents) = 0. 06

They are not claims of a “probabilistic tendency” in the current situation

They might be learned from past experience of similar situations

Probabilities of propositions change with new evidence: e.g., P (A 25 |no reported accidents, 5 a.m.) = 0. 15

Probability basics

Begin with a set Ω—the sample space e.g., 6 possible rolls of a die. ω ∈ Ω is a sample point/possible world/atomic event

A probability space or probability model is a sample space with an assignment P (ω) for every ω ∈ Ω s.t. 0 ≤ P (ω) ≤ 1

ΣωP (ω) = 1

e.g., P (1) = P (2) = P (3) = P (4) = P (5) = P (6) = 1/ 6.

An event A is any subset of Ω

P (A) = Σ{ω∈A}P (ω)

E.g., P (die roll < 4) = P (1) + P (2) + P (3) = 1/6 + 1/6 + 1/6 = 1/ 2

Random variables

A random variable is a function from sample points to some range, e.g., the reals or Booleans e.g., Odd(1) = true.

P induces a probability distribution for any random variable X:

P (X = xi) = Σ{ω:X(ω) = xi}P (ω)

e.g., P (Odd = true) = P (1) + P (3) + P (5) = 1/6 + 1/6 + 1/6 = 1/ 2

Note that we don’t write Odd’s argument (the sample point) here.

Why use probability?

The definitions imply that certain logically related events must have related probabilities

E.g., P (a ∨ b) = P (a) + P (b) − P (a ∧ b)

A >B

True A B

de Finetti (1931): an agent who bets according to probabilities that violate these axioms can be forced to bet so as to lose money regardless of outcome.

Syntax for propositions

We’ll use capitalized words for random variables, lower-case words for events

Propositional or Boolean random variables e.g., Cavity (do I have a cavity in one of my teeth?) Cavity = true is a proposition, also written cavity

Discrete random variables (finite or infinite) e.g., W eather is one of 〈sunny, rain, cloudy, snow〉 W eather = rain is a proposition Values must be exhaustive and mutually exclusive

Continuous random variables (bounded or unbounded) e.g., T emp = 21. 6 ; also allow, e.g., T emp < 22. 0.

Arbitrary Boolean combinations of basic propositions

Probabilities of propositions e.g., P (cavity) = 0. 1 and P (W eather = sunny) = 0. 72

Probability for continuous variables

Express probability distributions using parameterized functions, e.g.,

f (x) = U 18, 26 = uniform density between 18 and 26

18 dx 26

Here f is a density; integrates to 1.

P (20 ≤ X ≤ 22) =

∫ (^22) 20 0.^125 dx^ = 0.^25

Gaussian density

P (x) = √ 21 πσ e−(x−μ)

(^2) / 2 σ 2

Conditional probability

Definition of conditional probability:

P (a|b) =

P (a ∧ b) P (b)

if P (b) 6 = 0

Product rule gives an alternative formulation that works even if P (b) = 0: P (a ∧ b) = P (a|b)P (b) = P (b|a)P (a)

A general version holds for whole distributions, e.g.,

P(W eather, Cavity) = P(W eather|Cavity)P(Cavity)

This is not matrix multiplication, it’s a set of 4 × 2 = 8 equations 4 values for W eather × 2 values for Cavity

Chain rule is derived by successive application of product rule: P(X 1 ,... , Xn) = P(X 1 ,... , Xn− 1 ) P(Xn|X 1 ,... , Xn− 1 ) = P(X 1 ,... , Xn− 2 ) P(Xn− 1 |X 1 ,... , Xn− 2 ) P(Xn|X 1 ,... , Xn− 1 ) =...

= Πni = 1P(Xi|X 1 ,... , Xi− 1 )

Inference by enumeration

Start with the joint distribution:

L cavity

toothache

cavity

catch^ L catch

L toothache

catch^ L catch .108. .016.

. .

. .

For any proposition φ, sum the atomic events where it is true:

P (φ) = Σω:ω|=φP (ω)

Inference by enumeration

Start with the joint distribution:

L cavity

toothache

cavity

catch^ L catch

L toothache

catch^ L catch .108. .016.

. .

. .

For any proposition φ, sum the atomic events where it is true:

P (φ) = Σω:ω|=φP (ω)

P (toothache) = 0.108 + 0.012 + 0.016 + 0.064 = 0. 2

P (cavity ∨ toothache) = 0.108 + 0.012 + 0.072 + 0.008 + 0.016 + 0. 064 = 0. 28

Inference by enumeration

Start with the joint distribution:

L cavity

toothache

cavity

catch^ L catch

L toothache

catch^ L catch .108. .016.

. .

. .

Can also compute conditional probabilities:

P (¬cavity|toothache) = P (¬cavity ∧ toothache)/P (toothache)

=

General idea: compute distribution on query variable (e.g., Cavity) by fixing evidence variables (T oothache) and summing over all possible values of hidden variables (Catch)