Uncertainty. Russell & Norvig Chapter 13.

Similar documents
n How to represent uncertainty in knowledge? n Which action to choose under uncertainty? q Assume the car does not have a flat tire

Uncertainty. Chapter 13

Artificial Intelligence

Uncertainty. Outline

Where are we in CS 440?

Artificial Intelligence Uncertainty

Probabilistic Robotics

Where are we in CS 440?

Uncertainty. 22c:145 Artificial Intelligence. Problem of Logic Agents. Foundations of Probability. Axioms of Probability

Uncertainty. Introduction to Artificial Intelligence CS 151 Lecture 2 April 1, CS151, Spring 2004

Web-Mining Agents Data Mining

Pengju XJTU 2016

Lecture 10: Introduction to reasoning under uncertainty. Uncertainty

Uncertainty. Chapter 13

ARTIFICIAL INTELLIGENCE. Uncertainty: probabilistic reasoning

Quantifying uncertainty & Bayesian networks

CS 561: Artificial Intelligence

COMP9414/ 9814/ 3411: Artificial Intelligence. 14. Uncertainty. Russell & Norvig, Chapter 13. UNSW c AIMA, 2004, Alan Blair, 2012

Quantifying Uncertainty & Probabilistic Reasoning. Abdulla AlKhenji Khaled AlEmadi Mohammed AlAnsari

An AI-ish view of Probability, Conditional Probability & Bayes Theorem

10/18/2017. An AI-ish view of Probability, Conditional Probability & Bayes Theorem. Making decisions under uncertainty.

Uncertainty. Chapter 13, Sections 1 6

Probabilistic Reasoning

Uncertain Knowledge and Reasoning

Uncertainty (Chapter 13, Russell & Norvig) Introduction to Artificial Intelligence CS 150 Lecture 14

Probabilistic Reasoning

Uncertainty. Outline. Probability Syntax and Semantics Inference Independence and Bayes Rule. AIMA2e Chapter 13

Resolution or modus ponens are exact there is no possibility of mistake if the rules are followed exactly.

Uncertainty. Chapter 13. Chapter 13 1

UNCERTAINTY. In which we see what an agent should do when not all is crystal-clear.

Outline. Uncertainty. Methods for handling uncertainty. Uncertainty. Making decisions under uncertainty. Probability. Uncertainty

Uncertainty (Chapter 13, Russell & Norvig)

Uncertainty. Logic and Uncertainty. Russell & Norvig. Readings: Chapter 13. One problem with logical-agent approaches: C:145 Artificial

Mathematics. ( : Focus on free Education) (Chapter 16) (Probability) (Class XI) Exercise 16.2

Probability. CS 3793/5233 Artificial Intelligence Probability 1

Consider an experiment that may have different outcomes. We are interested to know what is the probability of a particular set of outcomes.

Bayesian networks. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018

Uncertainty and Bayesian Networks

Deep Learning for Computer Vision

Probabilistic Reasoning. (Mostly using Bayesian Networks)

Ch.6 Uncertain Knowledge. Logic and Uncertainty. Representation. One problem with logical approaches: Department of Computer Science

Chapter 13 Quantifying Uncertainty

STAT 430/510 Probability

What is Probability? Probability. Sample Spaces and Events. Simple Event

Lecture Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 11: Uncertainty. Uncertainty.

COMP9414: Artificial Intelligence Reasoning Under Uncertainty

Course Introduction. Probabilistic Modelling and Reasoning. Relationships between courses. Dealing with Uncertainty. Chris Williams.

First Digit Tally Marks Final Count

Pengju

SDS 321: Introduction to Probability and Statistics

Probabilistic Reasoning Systems

Lecture 3 - Axioms of Probability

Probabilistic Reasoning. Kee-Eung Kim KAIST Computer Science

Basic Probability and Decisions


Probabilistic Models

Objectives. Probabilistic Reasoning Systems. Outline. Independence. Conditional independence. Conditional independence II.

Bayes Rule for probability

PROBABILISTIC REASONING SYSTEMS

Probabilistic Representation and Reasoning

Stochastic Methods. 5.0 Introduction 5.1 The Elements of Counting 5.2 Elements of Probability Theory

CSC Discrete Math I, Spring Discrete Probability

P (A B) P ((B C) A) P (B A) = P (B A) + P (C A) P (A) = P (B A) + P (C A) = Q(A) + Q(B).

Probabilistic models

Probability theory: elements

Mean, Median and Mode. Lecture 3 - Axioms of Probability. Where do they come from? Graphically. We start with a set of 21 numbers, Sta102 / BME102

Discrete Probability and State Estimation

CS 361: Probability & Statistics

Uncertainty. CmpE 540 Principles of Artificial Intelligence Pınar Yolum Uncertainty. Sources of Uncertainty

Bayesian Reasoning. Adapted from slides by Tim Finin and Marie desjardins.

Fusion in simple models

Basic Statistics for SGPE Students Part II: Probability theory 1

Brief Intro. to Bayesian Networks. Extracted and modified from four lectures in Intro to AI, Spring 2008 Paul S. Rosenbloom

Probability deals with modeling of random phenomena (phenomena or experiments whose outcomes may vary)

Uncertainty in the World. Representing Uncertainty. Uncertainty in the World and our Models. Uncertainty

Probabilistic representation and reasoning

Lecture Notes 1 Basic Probability. Elements of Probability. Conditional probability. Sequential Calculation of Probability

14 PROBABILISTIC REASONING

Discrete Probability and State Estimation

Lecture 1 : The Mathematical Theory of Probability

Lecture 9: Naive Bayes, SVM, Kernels. Saravanan Thirumuruganathan

CS 188: Artificial Intelligence Fall 2009

General Info. Grading

Conditional probability

Probability & Random Variables

Directed Graphical Models

Reasoning with Uncertainty. Chapter 13

2. Conditional Probability

Computer Science CPSC 322. Lecture 18 Marginalization, Conditioning

COS 424: Interacting with Data. Lecturer: Dave Blei Lecture #2 Scribe: Ellen Kim February 7, 2008

Basic Probability and Statistics

CS 188: Artificial Intelligence Fall 2009

Conditional Probability

Conditional Probability

Introduction to Artificial Intelligence. Unit # 11

Machine Learning. CS Spring 2015 a Bayesian Learning (I) Uncertainty

Bayesian networks (1) Lirong Xia

Probabilistic representation and reasoning

Quantitative Methods for Decision Making

CSE 473: Artificial Intelligence

Transcription:

Uncertainty Russell & Norvig Chapter 13 http://toonut.com/wp-content/uploads/2011/12/69wp.jpg

Uncertainty Let A t be the action of leaving for the airport t minutes before your flight Will A t get you there on time? Uncertainty results from: 1. partial observability (road state, other drivers' plans, etc.) 2. noisy sensors (traffic reports) 3. uncertainty in action outcomes (flat tire, etc.) 4. complexity of modeling traffic 5.

Uncertainty Let A t be the action of leaving for the airport t minutes before your flight Will A t get you there on time? A purely logical approach either 1. risks falsehood: A 120 will get me there on time, or 2. leads to conclusions that are too weak for decision making: A 120 will get me there on time if there's no accident and it doesn't rain and my tires remain intact etc. (A 1440 might reasonably be said to get me there on time but I'd have to stay overnight in the airport )

Questions How to represent uncertainty in knowledge? How to perform inference with uncertain knowledge? Which action to choose under uncertainty?

Dealing with uncertainty Implicit Ignore what you are uncertain of when you can Build procedures that are robust to uncertainty Explicit Build a model of the world that describes uncertainty about its state, dynamics, and observations Reason about the effect of actions given the model

Methods for handling uncertainty Default Reasoning: Assume the car does not have a flat tire Assume A120 works unless contradicted by evidence Issues: What assumptions are reasonable? How to handle contradictions? Worst case reasoning (the world behaves according to Murphy s law). Probability Model agent's degree of belief Given the available evidence, A120 will get me there on time with probability 0.95

Probability Probabilities relate propositions to agent's own state of knowledge e.g., P(A 120 no reported accidents) = 0.96 Probabilities of propositions change with new evidence: e.g., P(A 120 no reported accidents, 5 a.m.) = 0.99

Making decisions under uncertainty Suppose I believe the following: P(A 60 gets me there on time ) = 0.001 P(A 90 gets me there on time ) = 0.70 P(A 120 gets me there on time ) = 0.95 P(A 150 gets me there on time ) = 0.99 P(A 1440 gets me there on time ) = 0.9999 Which action to choose? Depends on my preferences for missing flight vs. time spent waiting, etc. Utility theory is used to represent and infer preferences Decision theory = probability theory + utility theory

Axioms of probability For any events A, B in a space of events 0 P(A) 1 P(true) = 1 and P(false) = 0 P(A B) = P(A) + P(B) - P(A B)

Axioms of probability 0 P(ω) 1 P() 1 P(A B) = P(A) + P(B) - P(A B) [inclusion-exclusion principle]

Example You draw a card from a deck of cards (52 cards). What is the probability of each of the following events: A king A face card A spade A face card or a red suit A card

Where do probabilities come from Two camps: Frequentist interpretation Objectivist: probabilities are real Subjective: probabilities are beliefs Bayesian interpretation

Frequentist interpretation Draw a ball from an urn containing n balls of the same size; r are red, the rest black. The probability of the event the ball is red corresponds to the relative frequency with which we expect to draw a red ball P(red) =?

Subjective probabilities There are many situations in which there is no objective frequency interpretation: E.g. the probability that you will get to the airport in time. There are theoretical justifications for subjective probabilities!

The Bayesian viewpoint Probability is "degree-of-belief. To the Bayesian, probability lies subjectively in the mind, and can be different for people with different information In contrast, to the frequentist, probability lies objectively in the external world.

Random Variables A random variable can be thought of as an unknown value that may change every time it is inspected. Suppose that a coin is tossed three times and the sequence of heads and tails is noted. The event space for this experiment is: S={HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}. X - the number of heads in three coin tosses. X assigns each outcome in S a number from the set {0, 1, 2, 3}. Outcome HHH HHT HTH THH HTTTHTTTHTTT X 3 2 2 2 1 1 1 0 We can now ask the question what is the probability for observing a particular value for X (the distribution of X).

Random Variables Boolean random variables e.g., Cavity (do I have a cavity?) Distribution characterized by a number p. Discrete random variables e.g., Weather is one of <sunny,rainy,cloudy,snow> Domain values must be exhaustive and mutually exclusive The (probability) distribution of a random variable X with m values x 1, x 2,, x n is: (p 1, p 2,, p m ) with P(X=x i ) = p i and i p i = 1

Joint Distribution Given n random variables X 1,, X n The joint distribution of these variables is a table in which each entry gives the probability of one combination of values of X 1,,X n Example: Toothache Cavity 0.04 0.06 Cavit y 0.01 0.89 Toothache P(CavityToothache) P(CavityToothache)

It s all in the joint Toothache Toothache Cavity 0.04 0.06 Cavity 0.01 0.89 P(Toothache) = P((Toothache Cavity) v (ToothacheCavity)) = P(Toothache Cavity) + P(ToothacheCavity) = 0.04 + 0.01 = 0.05 We summed over all values of Cavity: marginalization P(Toothache v Cavity) = P((Toothache Cavity) v (ToothacheCavity) v (Toothache Cavity)) = 0.04 + 0.01 + 0.06 = 0.11 These are examples of inference by enumeration

Conditional Probability Definition: P(A B) =P(A B) / P(B) (if P(B) > 0) Read: probability of A given B Example: P(snow) = 0.03 but P(snow winter) = 0.06, P(snow summer) = 1e-4 can also write this as: P(A B) = P(A B) P(B) called the product rule

Example Toothache Toothache Cavity 0.04 0.06 Cavity 0.01 0.89 P(Cavity Toothache) = P(CavityToothache) / P(Toothache) = 0.04/0.05 = 0.8

Independence Events A and B are independent if P(A B) = P(A) which is equivalent to: P(A B) = P(A) P(B) Example: the outcomes of rolling two dice are independent.

Bayes Rule P(A B) = P(A B) P(B) = P(B A) P(A) P(A B) P(B) P(B A) = P(A) Image from: http://commons.wikimedia.org/wiki/file:thomas_bayes.gif

Bayes Rule Some types of data are easier to collect than others. P(disease symptom) P(symptom disease) P(A B) P(B) P(B A) = P(A) Image from: http://commons.wikimedia.org/wiki/file:thomas_bayes.gif

Example Given: P(Cavity) = 0.1 P(Toothache) = 0.05 P(Cavity Toothache) = 0.8 Using Bayes rule: P(Toothache Cavity) = (0.8x0.05)/0.1 = 0.4 Toothache Cavity 0.04 0.06 Cavity 0.01 0.89 Toothache

The Monty Hall Problem Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? source: http://en.wikipedia.org/wiki/monty_hall_problem

Solution P(C2 O3) = P(O3 C2)P(C2)/P(O3) = = 1 * 1/3 / 1/2 = 2/3 P(C1 O3) = P(O3 C1)P(C1)/P(O3) = 1/2*1/3 / 1/2 = 1/3 Your pick Host opens Should you pick this one instead?

Solution

Solution P(C2 O3) = P(O3 C2)P(C2)/P(O3) = = 1 * 1/3 / 1/2 = 2/3 P(O3) = P(O3 C1)P(C1) + P(O3 C2)P(C2) + P(O3 C3)P(C3) = = 1/2*1/3 + 1*1/3 + 0*1/3 = 1/2

Probabilities in the wumpus world There is no safe choice at this point! But are there squares that are less likely to contain a pit?

Probabilities in the wumpus world There is no safe choice at this point! But are there squares that are less likely to contain a pit?

It s all in the joint but The naïve representation runs into problems. Example: Patients in a hospital are described by attributes such as: Background: age, gender, history of diseases, Symptoms: fever, blood pressure, headache, Diseases: pneumonia, heart attack, A probability distribution needs to assign a number to each combination of values of these attributes Size of table is exponential in number of attributes

Bayesian Networks Provide an efficient representation that relies on independence relations between variables.

Product rule P(A B C) = P(A B,C) P(B C) P(C)

Bayesian Networks Burglary P(B) 0.001 Earthquake P(E) 0.002 B E P(A ) Alarm T T F F T F T F 0.95 0.94 0.29 0.001 JohnCalls A T F P(J A) 0.90 0.05 MaryCalls A T F P(M A) 0.70 0.01

Bayesian Networks Burglary P(B) 0.001 Earthquake P(E) 0.002 Alarm B E P(A ) T T F F T F T F 0.95 0.94 0.29 0.001 P(X 1,X 2,,X n ) = i=1,,n P(X i Parents(X i )) JohnCalls A T F P(J A) 0.90 0.05 MaryCalls A T F P(M A) 0.70 0.01

Calculate probability that alarm sounds, john calls, mary calls, no burglary, no earthquake P(j m a b e ) = P(j a) P(m a) P(a b e ) P(b) P(e) = 0.9 * 0.7 * 0.001 * 0.999 * 0.998 = 0.00062