Quantifying Uncertainty
Quantifying Uncertainty
Quantifying Uncertainty
Introduction to Artificial Intelligent
Hamdi Abdurhman, PhD
401892 LECTURE 6 11
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 2
Last Time
• Knowledge-Based Agents
• Wumpus World
• Logic
• Propositional Logic: A very Simple Logic
401892 LECTURE 6 22
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 3
Today
• Acting under Uncertainty
• Basic Probability Notation
• Inference Using Full Joint Distributions
• Independence
• Bayes’ Rule and Its Use
• Naive Bayes Models
• The Wampus World Revisited
401892 LECTURE 6 33
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 4
Introduction to Uncertainty
• Real World Uncertainty:
• Partial observability, nondeterminism, and adversaries.
• Agents may not know current or future states.
• Handling Uncertainty:
• Belief state: Represents possible world states.
• In partially observable environments, agents can't determine their exact state.
• In nondeterministic environments, agents use belief states to account for multiple
possible state transitions.
• Contingency plan: Handles every possible sensor observation.
• In partially observable and nondeterministic environments, the solution to a problem is
no longer a sequence, but rather a conditional plan (sometimes called contingency plan
or a strategy)
401892 LECTURE 6 44
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 5
401892 LECTURE 6 55
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 6
Uncertainty
• Uncertainty is everywhere. Consider the following proposition.
• At: Leaving t minutes before the flight will get me to the airport.
• Problems:
1. Partial observability (road state, other drivers plans, etc.)
2. Noisy sensors (radio traffic reports)
3. Uncertainty in action outcomes (a flat tire, etc.)
4. Immense complexity of modelling and predicting traffic
401892 LECTURE 6 66
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 7
Example -
Automated Taxi
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 8
Rational Decision-Making
• Performance Measure:
• Timeliness, avoiding unproductive waits, avoiding speeding tickets.
• Comparing Plans:
• Plan A90: Maximizes performance measure based on knowledge.
• Plan A180: Increases belief in success but has trade-offs.
• Rational Decision:
• Depends on goal importance and likelihood of achievement.
• Expected to maximize performance based on environmental knowledge.
401892 LECTURE 6 88
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 9
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 10
401892 LECTURE 6 10
10
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 11
Epistemological Commitment
• Ontological commitment
• What a representational language assumes about the nature of reality - logic
& probability theory agree in this, that facts do or do not hold
• Epistemological commitment
• The possible states of knowledge
• For logic, sentences are true/false/unknown
• For probability theory, there's a numerical degree of belief in sentences, between 0
(certainly false) and 1 (certainly true)
401892 LECTURE 6 11
11
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 12
Knowledge representation
Language Main elements (Ontological Assignments
Commitment) (Epistemological Commitment)
Propositional logic Facts T, F, unknown
First-order logic Facts, objects, relations T, F, unknown
Temporal logic Facts, objects, relations, times T, F, unknown
Temporal constraint satisfaction problems Time points Time intervals
Fuzzy logic Set membership Degree of truth
Probability theory Facts Degree of belief
• The first three do not represent uncertainty, while the last three do.
401892 LECTURE 6 12
12
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 13
401892 LECTURE 6 13
13
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 14
Rational Decisions
• Making choices among plans/actions when the probabilities of their
success differ
• This requires additional knowledge of preferences among outcomes
• This is the domain of utility theory: every state has a degree of
utility/usefulness to the agent & the agent will prefer those with higher utility
• Utilities are specific to an agent, to the extent that they can even encompass perverse or
altruistic preferences
401892 LECTURE 6 14
14
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 15
Rational Decisions
• Making choices among plans/actions when the probabilities of their
success differ
• We can combine to get a general
theory of rational decisions: decision theory
• A rational agent chooses actions to yield the highest expected utility
averaged over all possible outcomes of the action
• This is the maximum expected utility (MEU) principle
• Expected = average of the possible outcomes of an action weighted by their probabilities
• Choice of action = the one with highest expected utility
401892 LECTURE 6 15
15
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 16
16
401892 LECTURE 6 16
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 17
401892 LECTURE 6 17
17
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 18
401892 LECTURE 6 18
18
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 19
401892 LECTURE 6 19
19
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 20
Unconditional Probabilities
• Prior Probabilities:
o Also called "unconditional probabilities" or "priors."
o Degree of belief in propositions without additional information.
o When rolling fair dice, if we assume that each die is fair, and the rolls don’t
interfere with each others
o The set of possible worlds
o (1,1), (1, ), (1,3) …( ,1), ( , ), …,(6,5), (6,6)
o P(Dice) = 1/36
401892 LECTURE 6 20
20
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 21
Conditional Probabilities
• Posterior Probabilities:
• Also called "conditional probabilities" or "posteriors."
• The probability of a certain event happening, given the effect of another
event(called evidence).
• For example, the first die may be already showing 5 and we are waiting for
the other die to settle down
• In that case, we are interested in the probability of the other die given the
first one is 5
• Example: P(Dice ∣ Die1=5).
• Notation:
• P(A∣B) is read as "Probability of A given B."
401892 LECTURE 6 21
21
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 22
401892 LECTURE 6 22
22
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 23
401892 LECTURE 6 23
23
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 24
Random Variables
• Factored representation of possible worlds: sets of
pairs
• Variables in probability theory: Random variables
• Domain: the set of possible values a variable can take on
• Names begin with an uppercase letter (e.g., Weather, Die1).
• Function mapping from possible worlds (Ω) to a range of values.
• Example Ranges:
• Weather: {sunny, rain, cloudy, snow} ,Die1: {1, ..., 6}, Odd: {true, false}
• Value Naming Conventions:
• Lowercase for values (e.g., P ( = ) ) to sum over the value of X.
• Boolean variable ranges: {true, false} or {0,1} (Bernoulli distribution).
401892 LECTURE 6 24
24
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 25
401892 LECTURE 6 25
25
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 26
401892 LECTURE 6 26
26
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 27
• For NoonTemp:
401892 LECTURE 6 27
27
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 28
401892 LECTURE 6 28
28
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 29
Distribution Notation
• for distributions on multiple variables
o we use commas between the variables: so P(Weather, Cavity) denotes the
probabilities of all combinations of values of the 2 variables
o for discrete random variables we can use a tabular representation, in this
case yielding a 4x2 table of probabilities this gives the joint probability
distribution of Weather & Cavity
o tabulates the probabilities for all combinations
401892 LECTURE 6 29
29
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 30
Distribution Notation
• for distributions on multiple variables
o the notation also allows mixing variables & values
▪ P(sunny, Cavity) is just a 2-vector of probabilities
o the distribution notation, P, allows compact expressions
▪ for example, here are the product rules for all possible combinations of Weather &
Cavity
▪ P(Weather, Cavity) = P(Weather | Cavity)P(Cavity)
• the distribution notation summarizes what otherwise would be 8 separate equations each of
the form
•
401892 LECTURE 6 30
30
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 31
401892 LECTURE 6 31
31
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 32
401892 LECTURE 6 32
32
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 33
Probability Axioms
• We can derive
o Some additional relationships for degrees belief among logically related propositions,
from axioms (equation 1 and 2) and some algebraic manipulation.
o For example, , the relationship between the probability of a
proposition & its negation
o and also axiom (eq. 5)
o This axiom from the probability of a disjunction is referred to as the inclusion-exclusion
principle
o Equation 1:
o Equation 5:
o Together, equations 1 and 5 are referred to as Kolmogorov’s axioms, in honor of the
Russian mathematician Andrey Kolmogorov, who showed how to build up the rest of
probability theory, including issue related to handling continuous variables.
401892 LECTURE 6 33
33
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 34
401892 LECTURE 6 34
34
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 35
401892 LECTURE 6 35
35
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 36
Figure 2. Agent 1's inconsistent beliefs allow Agent 2 to set up bets to guarantee Agent 1 loses, independent of outcome of a and b
o So, for example, Agent 1's degree of belief in a is 0.4, so will bet "against" it &
pay 6 to Agent 2 if a is the outcome, receive 4 from Agent 2 if it is not, and so
on
401892 LECTURE 6 36
36
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 37
Figure 3. A full joint distribution for the Toothache, Cavity, Catch world.
401892 LECTURE 6 37
37
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 38
o To calculate:
o Cavity toothache holds for 6 possible worlds
o The corresponding sum is = 0.28.
401892 LECTURE 6 38
38
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 39
401892 LECTURE 6 39
39
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 40
401892 LECTURE 6 40
40
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 41
401892 LECTURE 6 41
41
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 42
Normalization Constant
• note that was the denominator
• for calculating both conditional probabilities
• it functions as a normalization constant for the distribution
, ensuring the probabilities add to 1
• in AIMA, this constant is denoted by and we use it to mean a normalizing
constant , where probabilities must add to 1
• since the sum for the distribution must be 1, we can just sum the raw values
obtained and then use 1/sum for
• this may make calculations simpler, and might even allow them when some
probability assessment is not available
401892 LECTURE 6 42
42
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 43
Normalization Constant
• an example of using the normalization constant
• ( | )= ( , )/ ( )
= ( , )
= [P(Cavity, toothache, catch)+P(Cavity, toothache, ¬catch)]
= [ 0.10 , 0.016 + 0.01 , 0.06 ]
= 0.1 , 0.0
= 0.6, 0.
• since the probabilities must add to 1.0, the calculation can be done without knowing , just
normalizing at the end
401892 LECTURE 6 43
43
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 44
Generalization of Inference
• given a query, the generalized version of the process for a conditional
probability distribution is:
• for a single variable X (Cavity in the preceding example), let E be the list of
evidence variables (just Toothache in the example) and e the list of observed
values for them, and Y the unobserved variables (Catch in the example)
• the query: is calculated by summing out over the unobserved
variables
• Equation (9):
401892 LECTURE 6 44
44
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 45
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 46
Independence
401892 LECTURE 6 46
46
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 47
Independence
• consider a new version of our example domain
• now defined in terms of 4 random variables
•
• so has a FJD with
entries
• one way to display it would be as four tables, 1 for each value of
Weather
• how are they related?
• for example:
•
•
401892 LECTURE 6 47
47
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 48
Independence
• in the 4-variable domain
• what is the relationship between
•
• given what we know about relating probabilities (the product rule)
•
401892 LECTURE 6 48
48
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 49
Independence
• from our knowledge of the domain, we can Figure 4. Two examples of factoring a large joint distribution into smaller distributions, using
simplify the full joint distribution, dividing absolute independence. (a) Weather and dental problems are independent. (b) Coin flips are
variables into independent subsets with separate independent.
distributions
• as an example, for the Dentistry-Weather
domain
401892 LECTURE 6 49
49
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 50
Independence
• Absolute independence
• while very powerful for simplifying probability
representation & inference absolute independence is
unfortunately rare
• though, for example, for independent coin tosses
• P( ), the full joint distribution with
entries becomes n single variable
distributions
• and while
• this is an artificial example and the converse is more
likely the case for real domains
• that is, within a large domain like dentistry there are
likely dozens of diseases & hundreds of symptoms, all
interrelated
401892 LECTURE 6 50 50
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 51
• Absolute independence
• while very powerful for simplifying probability representation & inference absolute independence
is unfortunately rare
• though, for example, for independent coin tosses
• P( ), the full joint distribution with entries becomes n single variable
distributions
• and while
• this is an artificial example and the converse is more likely the case for real domains
• that is, within a large domain like dentistry there are likely dozens of diseases & hundreds of
symptoms, all interrelated
401892 LECTURE 6 51
51
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 52
401892 LECTURE 6 52
52
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 53
• This simple equation allows us to update the probability of an event based on new evidence .
401892 LECTURE 6 53
53
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 54
• representing the set of equations, each for specific values of the variables
• & finally, a version indicating conditionalizing on background evidence
e
401892 LECTURE 6 54
54
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 55
Bayes’ Rule
• Bayes' rule
• is the basis of most AI systems of probabilistic inference
• It allows us to compute the single term P(b|a) in terms of three terms: P(a|b),
P(b), and P(a).
• finding diagnostic probability from causal probability
• specifies relationship in causal direction
• describes diagnostic direction
401892 LECTURE 6 55
55
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 56
Bayes’ Rule
• Bayes’ rule: a medical e ample
401892 LECTURE 6 56
56
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 57
401892 LECTURE 6 57
57
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 58
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 59
• (16):
∧ ∧
• substituting into yields the following, reflecting the conditional independence of
Toothache and Catch
• ∧
401892 LECTURE 6 59
59
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 60
Conditional Independence
• the general form of the conditional independence rule
• here are the most general & for the dental diagnosis domain
• (Eq.19):
• conditional independence also allows decomposition
• for the dental problem, algebraically, given (Eq.19), we have
401892 LECTURE 6 60
60
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 61
Conditional Independence
• implications of the conditional independence rule
401892 LECTURE 6 61
61
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 62
Conditional Independence
• summary: conditional independence
• allows scaling up to real problems since the representational complexity can
go from exponential to linear
• is more often applicable than absolute independence assertions
• yields this net gain: the decomposition of large domains into weakly
connected subsets
• is illustrated in a prototypical way by the dental domain: one cause influences
multiple effects, which are conditionally independent, given that cause
401892 LECTURE 6 62
62
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 63
Conditional Independence
• summary: conditional independence
• with multiple effects, which are conditionally independent, given the cause,
the full joint distribution then is rewritten as
401892 LECTURE 6 63
63
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 64
401892 LECTURE 6 64
64
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 65
401892 LECTURE 6 65
65
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 66
Figure 5 [1]. After finding a breeze in both [1,2] and [2,1], the agent is
stuck—there is no safe place to explore. (b) Division of the squares into ,
Known Frontier , and other, for a query about [1,3].
401892 LECTURE 6 66
66
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 67
401892 LECTURE 6 67
67
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 68
401892 LECTURE 6 68
68
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 69
401892 LECTURE 6 69
69
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 70
• that is, we can just sum over the entries in the Full Joint Distribution
but with 12 unknown squares we have terms in the summation,
so the calculation is exponential in the number of squares
• so we'll need to simplify from insight about independence
• we note: not all unknown squares are equally relevant to the query
401892 LECTURE 6 70
70
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 71
401892 LECTURE 6 71
71
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 72
401892 LECTURE 6 72
72
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 73
• since the 1st term now does not depend on other, move the summation inward:
401892 LECTURE 6 73
73
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 74
• so far, we have
401892 LECTURE 6 74
74
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 75
• .
Figure 6. Consistent model for frontier variables, and , showing P(frontier) for each model: (a) three model with = true showing two or three models with
= true showing two or three pits, and (b) two models with = false showing one or two pits [1].
401892 LECTURE 6 75
75
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 76
•.
Figure 6. Consistent model for frontier variables, and , showing P(frontier) for each model: (a) three model with = true showing two or three models with
= true showing two or three pits, and (b) two models with = false showing one or two pits [1].
401892 LECTURE 6 76
76
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 77
• & by a similar calculation, [2,2] can be shown to contain a pit with about 0.86
probability: 0. 6, 0.1
• it is clear to the probabilistic agent where not to go next
401892 LECTURE 6 77
77
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 78
401892 LECTURE 6 78
78
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 79
Reference
• Book: Russell, S., & Norvig, P. (2020). Artificial Intelligence: A Modern
Approach (4th Edition). Pearson
• [1] Russell, S., & Norvig, P. (2020). Artificial Intelligence: A Modern
Approach (4th Edition). Pearson.
401892 LECTURE 6 79
79
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________
Slide 80
Next Class
• Introduction to Machine Learning
401892 LECTURE 6 80
80
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________________________________________________________________________
____________________