580 likes | 590 Views
This lecture delves into probabilistic modeling and inference in AI, essential for representing uncertainty in real-world scenarios. Starting with basic probability theory and extending to more complex probabilistic models, the course emphasizes the need for accurate knowledge representation. The content covers topics such as conditional probabilities, evidence reasoning, and factored representations of probability models. With examples and quizzes, Fei Fang guides students through understanding fundamental concepts and applications of probabilistic reasoning in problem-solving.
E N D
Artificial Intelligence: Representation and Problem SolvingProbabilistic Reasoning (1): Probability Model 15-381 / 681 Instructors: Fei Fang (This Lecture) and Dave Touretzky feifang@cmu.edu Wean Hall 4126
Recap • What we have learned so far… • Search & Satisfiability in discrete space • Basic optimization in continuous and discrete space • Deterministic / Symbolic Reasoning • All focusing on deterministic settings! • Known environment • Full observability • Deterministic change Fei Fang
This section • Reason about uncertainty • Signature of real-world scenarios • Will it rain tomorrow? https://www.flickr.com/photos/blackplastic/4520500953 Fei Fang
This section • Reason about uncertainty • Signature of real-world scenarios • Partial observability • Is it raining in DC now? Fei Fang
This section • Reason about uncertainty • Signature of real-world scenarios • Partial observability • Sometimes, introduce uncertainty to the model to abstract how the world really works https://en.wikipedia.org/wiki/Universe https://pixabay.com/en/atom-science-research-physics-1013638/ Fei Fang
This section • Reason about uncertainty • Signature of real-world scenarios • Partial observability • Sometimes, introduce uncertainty to the model to abstract how the world really works • Need probabilistic models for knowledge representation & reasoning • Provide a way of summarizing the uncertainty that comes from our laziness and ignorance Fei Fang
Outline • Probability Model and Probabilistic Inference • Chain Rule, Independence, Bayes’ Rule Fei Fang
Probability Statement • The probability that it is raining in DC right now given it is not raining in Pittsburgh is • Actual situation is either raining () or not raining () • Probability statement are made w.r.t. knowledge state, not the real world • What is the knowledge state in this statement? Fei Fang
Quiz 1 • Antoine Gombaud (1607-1684) • What is the probability of winning? • A: • B: • C: • D: I will roll a die four times; I win if I get a 1 Fei Fang
From Gambling to Probability Theory • There is no math for probability at the time, how did he find out? • Gombaud invented a new scam: • However, he kept losing because • Gombaud wrote to Pascal and Fermat, who subsequently created probability theory I will roll two dice 24 times; I win if I get a double 1 Fei Fang
Basic Probability Notation • Sample space : set of all possible worlds (exclusive and exhaustive) • A probability model associates a probability with each possible world • Event or proposition : a set of possible worlds • Unconditional / prior probabilities: Degree of belief in the proposition in the absence of any other information • Exercise: describe Quiz 1 using these terms I will roll a die four times; I win if I get a 1 Fei Fang
Basic Probability Notation • Evidence: information that has been revealed • Conditional / posterior probabilities: Degree of belief in the proposition given some evidence • : Probability of given evidence • Exercise: describe the following problem using these terms • Is the statement still valid after observing first dice shows ? I roll two dice one by one, the first die shows 1. What is the probability that I get a double 1? Fei Fang
Basic Probability Notation • Evidence: information that has been revealed • Conditional / posterior probabilities: Degree of belief in the proposition given some evidence • : Probability of given evidence • Why? Rule out worlds where is not true I roll two dice one by one, the first die shows 1. What is the probability that I get a double 1? Fei Fang
Quiz 2 • Bag 1: two gold coins. Bag 2: two pennies. Bag 3: one of each. • Bag is chosen at random, and one coin from it is selected at random; the coin is gold • What is the probability that the other coin is gold given the observation? • A: 1/6 • B: 1/3 • C: 2/3 • D: 1/2 Fei Fang
Basic Rules • Negation relationship • Inclusion-exclusion principle Sample space Fei Fang
Basic Rules • Product rule • Sum rule • If ’s are mutually exclusive and exhaustive Fei Fang
Probability Model with Factored Representation • A random variable • Domain of : values can take • Finite or infinite; Discrete or continuous • Probability distribution • Assign probability for each value if discrete domain • Probability density function (pdf) if continuous domain I will roll a die; I win if I get a 1 Fei Fang
Probability Model with Factored Representation • Random variables , each has a domain • Joint probability distribution • Assign a probability for each value tuple if discrete domain • Probability density function (pdf) if continuous domain I will roll a die four times; I win if I get a 1 Fei Fang
Probability Model with Factored Representation • A possible world is defined to be an assignment of values to all the random variables under consideration • A probability model is completely determined by the full joint probability distribution – the joint distribution of all the random variables under consideration Fei Fang
Joint Probability Distribution .05 .2 0 .1 .1 0 .1 0 0 .1 .05 .1 .1 0 .1 0 Fei Fang
Probabilistic Inference • Probabilistic inference: Compute probability of a query variable (or variable set) taking on a value (or set of values) given some evidence on a subset of variables • No evidence: Marginal probability • With evidence: Posterior / Conditional probability May be none Fei Fang
Compute Marginal Probability .05 .2 0 .1 .1 0 .1 0 0 .1 .05 .1 .1 0 .1 0 Fei Fang
Marginal Probability Distribution • Marginal probability distribution of one variable • If there are only two random variables • If there are random variables If we compute for all , written as Fei Fang
Marginal Probability Distribution • Marginal distribution of a subset of variables • Called “marginalization” • Is it required that ? Fei Fang
Marginal Probability Distribution .05 .2 0 .1 .1 0 .1 0 0 .1 .05 .1 .1 0 .1 0 Fei Fang
Compute Conditional Probability • Scale the joint probability according to marginal probability .05 .2 0 .1 .1 0 .1 0 0 .1 .05 .1 .1 0 .1 0 Fei Fang
Conditional Probability Distribution • Conditional probability distribution: the joint distribution of given the value of the other variable Note: This is not matrix division! It represents a set of equations! Fei Fang
Conditional Probability Distribution • Conditional probability distribution of a subset of variables given evidence for a subset of variables • Is it required that ? • If , then read from joint probability table • If , then need to compute Fei Fang
Revisit Quiz 2 • Bag 1: two gold coins. Bag 2: two pennies. Bag 3: one of each. • Bag is chosen at random, and one coin from it is selected at random; the coin is gold • Define random variables • : type of selected coin • : type of the other coin in the same bag of the selected coin • Domain: A B C D E F Fei Fang
Revisit Quiz 2 • What is the probability that the other coin is gold given the observation? A B C D E F Fei Fang
Outline • Probability Model and Probabilistic Inference • Chain Rule, Independence, Bayes’ Rule Fei Fang
Chain Rule • Factorization using chain rule Note: This is not matrix multiplication! It represents a set of equations! Fei Fang
Independence • Definition: proposition and are independent iff • or • or I will roll a die tomorrow; What is the probability of getting a 1 and there is no rain? I will roll two dice one by one; What is the probability of first getting a 1 and then getting a 6? Fei Fang
Independence • Definition: Random variable and are independent iff • or • or • Random variables are independent iff Fei Fang
Quiz 1 revisited • Antoine Gombaud (1607-1684) • What is the probability of winning? I will roll a die four times; I win if I get a 1 Fei Fang
Conditional Independence • Definition: and are conditionally independent given iff • Once the value of is known, knowing doesn’t tell anything more about • Equivalent definition: • In a sense, the dependence between and “dissolves” once the knowledge about is made available Fei Fang
Bayes’ Rule • Recall product rule • Bayes’ Rule Fei Fang
Bayes’ Rule Fei Fang
Monty Hall Problem • Behind one door is a car; behind the other two are goats. Which door has the car is randomly assigned. You pick a door. Then announcer randomly opens another door that has a goat behind it and asks you whether you want to switch before he opens the door you pick. Should you stay with your choice or switch? Steve Selvin Fei Fang
Monty Hall Problem • Stay or switch? Random variables : which door has the car Domain Now you picked a door, say door Announcer observes your selection, and then randomly opens a door with a goat behind it Random variable : which door is opened by the announcer Domain If announcer opens door , you want to know Fei Fang
Monty Hall Problem : which door has the car : which door is opened Fei Fang
Quiz 3 • In Monty Hall problem, if there are five doors, what is the probability of winning when switching to another door? • A: • B: • C: • D: Behind one door is a car; behind the other four are goats. Which door has the car is randomly assigned. You pick a door. Then announcer randomly opens another door that has a goat behind it and asks you whether you want to switch before he opens the door you pick. Fei Fang
Summary • Probability Model • Random variable, Domains • Joint probability distribution • Probabilistic Inference • Use full joint probability distribution as the “knowledge base” • Compute • Marginal probability • Conditional probability • Chain Rule, Independence, Bayes’ Rule • Challenge? • Full joint distribution is hard to estimate and too big to represent explicitly Fei Fang
Acknowledgment • Some slides are borrowed from previous slides made by Tai Sing Lee Fei Fang
Backup Slides Fei Fang
Outline • Basics in probability theory Fei Fang
Concepts and Definitions • The sample space is a finite set of elements representing possible outcomes that are mutually exclusive • For each outcome , there is a probability measure • A probability distribution assigns a non-negative real probability to each element, such that (which means the sample space is exhaustive) Sample space Fei Fang
Concepts and Definitions • An event is a subset • If each element has equal probability, the distribution is uniform: Sample space Fei Fang
Concepts and Definitions • Joint probability: probability of event 𝐴 and event 𝐵 occurring together • Probability of a union of disjoint events • if and are disjoint events Sample space Fei Fang
The Sum Rule and Marginal Probability • The sum rule • if s are mutually exclusive and exhaustive events Sample space Fei Fang