Lecture 7 Probability Update 2024 - Introduction to Artificial Intelligence PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document, titled "Lecture 7 Probability", presents a lecture on probability within the broader topic of Artificial Intelligence. It covers fundamental concepts such as random variables, probability distributions, and conditional probabilities. Examples, including weather patterns and traffic predictions, illustrate practical applications of these ideas in various contexts.
Full Transcript
CPCS-335 Introduction to Artificial Intelligence Lecture 7: Probability 1 Outlines Random Variable Probability Distributions Joint & Marginal Distributions /Joint Probability Conditional Distributions / Conditional Probability Probabilistic Inferen...
CPCS-335 Introduction to Artificial Intelligence Lecture 7: Probability 1 Outlines Random Variable Probability Distributions Joint & Marginal Distributions /Joint Probability Conditional Distributions / Conditional Probability Probabilistic Inference Inference by Enumeration (Exercises) Dependence Probability /Independence Probability The Product Rule >Bayes' Rule Random variables A random variable represents an event whose outcome is unknown. i.e. Random variable is some aspect of the world about which we (may) have uncertainty R = Is it raining? T = Is it hot? D = How long will it take to drive to work? We denote Random variables with Capital letters. The range of a random variable is the set of possible values Lowercase letters: values that the random variables can take r ∈ {true, false} or sometimes we write it as {+r, –r} t ∈ {+t, –t} d ∈ [0, ∞) Probability Distributions The probability distribution of a random variable X gives the probability for each value x in its range Associate a probability with each value; sums to 1 Temperature Weather: P(T) P(W) T P W P hot 0.5 sun 0.6 cold 0.5 rain 0.1 fog 0.3 meteor 0.0 Probability Distributions Temperature Weather: P(T) P(W) T P W P hot 0.5 sun 0.6 cold 0.5 rain 0.1 fog 0.3 meteor 0.0 A distribution is a TABLE of probabilities of values A probability (lower case value) is a single number P(W=rain) = 0.1 P(rain)=0.1 Must have: ∀ X P(X) ≥ 0 and ∑X P(X) = 1 Random variables Example: Traffic on freeway 0.25 Random variable: T = whether there’s traffic Outcomes: T in {none, light, heavy} Distribution: P(T=none) = 0.25, P(T=light) = 0.50, P(T=heavy) = 0.25 0.50 0.25 Probabilistic Inference Probabilistic inference: compute a desired probability from other known probabilities (e.g. conditional from joint) We generally compute conditional probabilities P(airport on time | no accidents) = 0.90 These represent the agent’s beliefs given the evidence Probabilities change with new evidence: P(airport on time | no accidents, 5 a.m.) = 0.95 P(airport on time | no accidents, 5 a.m., raining) = 0.80 Observing new evidence causes beliefs to be updated Inference in Ghostbusters A ghost is in the grid somewhere Sensor readings tell how close a square is to the ghost On the ghost: usually red 1 or 2 away: mostly orange 3 or 4 away: typically yellow 5+ away: often green Sensors are noisy, but we know P(Color | Distance) Ghostbusters, Revisited Demo