30
PROBABILITY

PROBABILITY. Uncertainty Let action A t = leave for airport t minutes before flight from Logan Airport Will A t get me there on time ? Problems :

Embed Size (px)

Citation preview

Page 1: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

PROBABILITY

Page 2: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Uncertainty

Let action At = leave for airport t minutes before flight from Logan Airport

Will At get me there on time?

Problems:1. Partial observability (road state, other drivers'

plans, etc.).2. Noisy sensors (traffic reports).3. Uncertainty in action outcomes (flat tire, etc.).4. Immense complexity of modeling and

predicting traffic.

Page 3: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Uncertainty

Let action At = leave for airport t minutes before flight from Logan Airport

Will At get me there on time?

A purely logical approach either:1) risks falsehood: “A120 will get me there on

time,” or 2) leads to conclusions that are too weak for

decision making:“A120 will get me there on time if there's no

accident on I-90and it doesn't rain and my tires remain intact,

etc., etc.”

(A1440 might reasonably be said to get me there on time but I'd have to stay overnight in the airport …)

Page 4: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Methods for handling uncertainty Default logic:

Assume my car does not have a flat tire Assume A120 works unless contradicted by evidence Issues: What assumptions are reasonable? How to

handle contradiction?

Probability Model agent's degree of belief Given the available evidence, A120 will get me there on

time with probability 0.4

Page 5: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Probability

Probabilistic assertions summarize effects of laziness: failure to enumerate exceptions, qualifications,

etc. ignorance: lack of relevant facts, initial conditions, etc.

Subjective probability: Probabilities relate propositions to agent's own state

of knowledge e.g., P(A120 | no reported accidents) = 0.6

These are not assertions about the world, but represent belief about the whether the assertion is true.

Probabilities of propositions change with new evidence: e.g., P(A120 | no reported accidents, 5 a.m.) = 0.15

Page 6: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Making decisions under uncertainty

Suppose I believe the following:P(A 135 gets me there on time | ...) = 0.04

P(A 180 gets me there on time | ...) = 0.70

P(A 240 gets me there on time | ...) = 0.95

P(A 1440 gets me there on time | ...) = 0.9999

Which action to choose? Depends on my preferences for missing flight vs.

airport cuisine, etc.

Utility theory is used to represent and infer preferences

Decision theory = utility theory + probability theory

Page 7: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Quick Question

You go to the doctor and are tested for a disease. The test is 98% accurate if you have the disease. 3.6% of the population has the disease while 4% of the population tests positive.

How likely is it you have the disease?

Page 8: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Syntax

Basic element: random variable

Boolean random variables e.g., Cavity (do I have a cavity?)

Discrete random variables e.g., Weather is one of

<sunny,rainy,cloudy,snow> Continuous random variables

represented by probability density functions (PDFs), valued [0,1]

Page 9: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Syntax

Elementary propositions constructed by assignment of a value to a random variable e.g., Weather = sunny, Cavity = false (abbreviated as sunny or cavity)

Complex propositions formed from elementary propositions and standard logical connectives e.g., (Weather = sunny Cavity = false) e.g., (sunny cavity)

Page 10: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Syntax

Atomic event: A complete specification of the state of the world. A complete assignment of values to variables.

E.g., if the world consists of only two Boolean variables Cavity and Toothache, then there are 4 distinct atomic events:

Cavity = false Toothache = falseCavity = false Toothache = trueCavity = true Toothache = falseCavity = true Toothache = true

Atomic events are mutually exclusive and exhaustive

Page 11: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Axioms of probability (Kolmogorov’s Axioms)

For any propositions A, B1. 0 ≤ P(A) ≤ 12. P(true) = 1 and P(false) = 03. P(A B) = P(A) + P(B) - P(A B)

Page 12: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Prove

Page 13: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Prove

(Axiom 3 with )

(by logical equivalence)

Page 14: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Priors

Prior or unconditional probabilities of propositions correspond to belief prior to arrival of any (new) evidence.

e.g., P(cavity) =P(Cavity=true)= 0.1 P(Weather=sunny) = 0.72P(cavity Weather=sunny) = 0.072

Page 15: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Distributions

Probability distribution gives probabilities of all possible values of the random variable. Weather is one of <sunny,rain,cloudy,snow> P(Weather) = <0.72, 0.1, 0.08, 0.1> (Normalized, i.e., sums to 1. Also note the bold

font..)

Page 16: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Joint Probability

Joint probability distribution for a set of random variables:

The entire table sums to 1.

Page 17: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Inference by Enumeration

Page 18: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Inference by Enumeration

Page 19: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Conditional Probability

Conditional or posterior probability Degree of belief of something being true

given knowledge about situation

Page 20: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Inference by Enumeration

=0.4

Page 21: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Conditional Probability

Page 22: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Absolute Independence

If A and B are independent

𝑃 ( h h𝑇𝑜𝑜𝑡 𝑎𝑐 𝑒 , h𝐶𝑎𝑡𝑐 ,𝐶𝑎𝑣𝑖𝑡𝑦 , h𝑊𝑒𝑎𝑡 𝑒𝑟 )=𝑃 ( h h𝑇𝑜𝑜𝑡 𝑎𝑐 𝑒 , h𝐶𝑎𝑡𝑐 ,𝐶𝑎𝑣𝑖𝑡𝑦 )𝑃 ( h𝑊𝑒𝑎𝑡 𝑒𝑟 )

Page 23: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Absolute Independence

Absolute independence powerful but rare For n independent biased coins, O(2n) →O(n)

2*2*2*4=32 entries 2*2*2+4=12 entries

Page 24: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Conditional independence

If I have a cavity, the probability that the probe catches in it doesn't depend on whether I have a toothache: P(catch | toothache, cavity) = P(catch | cavity)

The same independence holds if I haven't got a cavity: P(catch | toothache,cavity) = P(catch | cavity)

Catch is conditionally independent of Toothache given Cavity: P(Catch | Toothache,Cavity) = P(Catch | Cavity)

Equivalent statements:P(Toothache | Catch, Cavity) = P(Toothache | Cavity)P(Toothache, Catch | Cavity) = P(Toothache | Cavity) P(Catch | Cavity)

Page 25: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Bayes' Rule

Product rule

Divide both sides by

Bayes' rule

or in distribution form

Page 26: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Bayes' Rule

Much easier to calculate/estimate than the part on the left!

Page 27: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Bayes Rule: Example

Let M be meningitis, and S be stiff neck, with

0.00080.1

0.00010.8

P(s)

P(m)m)|P(ss)|P(m

Note: probability of meningitis still very small!

Page 28: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Bayes' Rule and conditional independence

[by Bayes’ Rule]

[by conditional independence]

Page 29: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Naïve Bayes Model

A single cause influences several effects, all of which are conditionally independent

Simplifying assumption! Usually incorrect, but works well in practice.

Page 30: PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :

Summary

Probability is a formalism for uncertain knowledge Basic probability statements include prior probabilities and

conditional probabilities The full joint probability distribution specifies probability of

each complete assignment of values to variables. Usually too large to create and use in its explicit form.

Absolute independence between subsets of random variables allows the full joint distribution to be factored into smaller joint distributions. Absolute independent rarely occurs in practice.

Bayes’ rule allows unknown probabilities to be computed from known conditional probabilities. Applying Bayes’ rule with many variables runs into the same

scaling problem as above. Conditional independence, brought about by direct causal

relationships in the domain, may allow the full joint distribution to be factored into smaller, conditional distributions. Naïve Bayes model assumes conditional independence of all effect

variables.