Course Artificial Intelligence Effective Period September 2018 Quantifying
Course : Artificial Intelligence Effective Period : September 2018 Quantifying Uncertainty I Session 9 Prof. Dr. Ir. Widodo Budiharto 2020 1
Outline 1. Acting under Uncertainty 2. Basic Probability Notation 3. Exercise 2
Introduction • Probabilitas suatu kejadian adalah angka yang menunjukkan kemungkinan terjadinya suatu kejadian. Nilainya di antara 0 dan 1. Kejadian yang mempunyai nilai probabilitas 1 adalah kejadian yang pasti terjadi atau sesuatu yang telah terjadi. Probabilitas/Peluang suatu kejadian A terjadi dilambangkan dengan notasi P(A), p(A), atau Pr(A). Sebaliknya, probabilitas [bukan A] atau komplemen A, atau probabilitas suatu kejadian A tidak akan terjadi, adalah 1 -P(A). Sebagai contoh, peluang untuk tidak munculnya mata dadu enam bila sebuah dadu bersisi enam digulirkan adalah 3
Acting Under Uncertainty • Agent may need to handle uncertainty, whether due to partial observability, nondeterminism, or combination of the two Nondeterminism: A system in which the output cannot be predicted because there are multiple possible outcomes for each input. Contrast with deterministic system • The agent’s knowledge can at best provide only a degree of belief in the relevant sentences • Main tool for dealing with degree of belief is probability theory • Probability provides a way of summarizing the uncertainty 4
Acting Under Uncertainty • Uncertainty in logic sentence – Toothache ⇒ Cavity (True? ) – Toothache ⇒ Cavity ∨ Gum. Problem ∨ Abscess. . . • Probability – From the statistical data, 80% of the toothache patients have had cavities “The probability that the patient has a cavity, given that she is a teenager with no toothache, is 0. 1” as follows: P(cavity | ¬toothache ∧ teen)=0. 1 5
Acting Under Uncertainty • Let action At = leave for BINUS t minutes before class – Will At get me there on time? • Problems: – partial observability (road state, other drivers' plans, etc. ) – uncertainty in action outcomes (at tire, etc. ) 6
Acting Under Uncertainty • If we use purely logic to solve that problem, then – A 25 will get the student arrive on time if “there is no accident or traffic jam and it does not rain” • No Rain AND No Accident On Time 7
Acting Under Uncertainty 8
Acting Under Uncertainty • Preferences, as expressed by utilities, are combined with probabilities in the general theory of rational decisions called decision theory – Decision Theory = probability theory + utility theory • Fundamental of decision theory is that an agent is rational if only if it chooses the action that yields the highest expected utility, averaged over all the possible outcomes of the action called maximum expected utility (MEU). 9
Acting Under Uncertainty 10
Basic Probability Notation • In probability theory, the set of all possible worlds is called the sample space. The basic axioms of probability theory say that every possible world has a probability between 0 and 1 and that the total probability of the set of possible worlds is 1. • For example, if we are about to roll two (distinguishable) dice, there are 36 possible worlds to consider: (1, 1), (1, 2), . . . , (6, 6) • The probability for each possible world is as follows: – I. e. the probability of the rolled two dice are 1/36 11
Basic Probability Notation • The propositions is the set of two or more possible worlds • The probability is – I. e P(Total=11) = P((5, 6)) + P((6, 5)) = 1/36 + 1/36 = 1/18 12
Basic Probability Notation • There are two kinds of probabilities: – Unconditional or prior probabilities • Degrees of belief in propositions in the absence of any other information – Conditional or posterior probabilities • There is some evidence (information) to support the probability • If the first dice is 5, then what is the P(Total=11)? 13
Basic Probability Notation • Conditional probabilities – The “|” is pronounced “given” – Example – Product rule 14
Basic Probability Notation • Variables in probability theory are called random variables – Total, Die 1 • Every random variable has a domain – Total = {2, …, 12} – Die 1 = {1, … 6} 15
Conditional Probability Example: Suppose an individual applying to a college determines that he has an 80% chance of being accepted (P(Accepted)), and he knows that dormitory housing will only be provided for 60% of all of the accepted students (P(Dormitory Housing|Accepted)). The chance of the student being accepted and receiving dormitory housing (P Accepted and Dormitory Housing)) is defined by: P(Accepted and Dormitory Housing) = P(Dormitory Housing | Accepted) * P(Accepted) = (0. 60)*(0. 80) = 0. 48. 16
Basic Probability Notation where the bold P indicates that the result is a vector of numbers, and where we assume a predefined ordering sunny, rain, cloudy, snow on the domain of Weather. We say that the P statement defines a probability distribution for the random variable Weather. 17
Basic Probability Notation • For continuous variables, it is not possible to write out the entire distribution as a vector, because there are infinitely many values • The temperature at noon is distributed uniformly between 18 and 26 degrees Celcius – P(Noon. Temp =x) = Uniform[18 C, 26 C](x) – Called probability density function 18
Basic Probability Notation • We need notation for distributions on multiple variables • P(Weather , Cavity) denotes the probabilities of all combinations of the values of Weather and Cavity • This is a 4× 2 table of probabilities called the joint probability distribution of Weather and Cavity 19
References • Stuart Russell, Peter Norvig. 2010. Artificial Intelligence : A Modern Approach. Pearson Education. New Jersey. ISBN: 9780132071482 20
Exercise 21
Exercise Conditional Probability In a group of 100 sports car buyers, 30 bought alarm systems, 20 purchased bucket seats, and 10 purchased an alarm system and bucket seats. If a car buyer chosen at random, bought an alarm system, what is the probability he/she also bought bucket seats? 22
- Slides: 22