Lecture Probabilistic Reasoning
Lecture Probabilistic Reasoning
Lecture Probabilistic Reasoning
Philipp Koehn
26 March 2024
● Uncertainty
● Probability
● Inference
uncertainty
● Problems
– partial observability (road state, other drivers’ plans, etc.)
– noisy sensors (WBAL traffic reports)
– uncertainty in action outcomes (flat tire, etc.)
– immense complexity of modelling and predicting traffic
● Probability
Given the available evidence,
A25 will get me there on time with probability 0.04
Mahaviracarya (9th C.), Cardamo (1565) theory of gambling
probability
P (A) = ∑ P (ω)
{ω∈A}
● E.g., P (die roll ≤ 3) = P (1) + P (2) + P (3) = 1/6 + 1/6 + 1/6 = 1/2
● A random variable is a function from sample points to some range, e.g., the reals
or Booleans
e.g., Odd(1) = true.
P (X = xi) = ∑ P (ω)
{ω∶X(ω) = xi }
● E.g., P (Odd = true) = P (1) + P (3) + P (5) = 1/6 + 1/6 + 1/6 = 1/2
● The definitions imply that certain logically related events must have related
probabilities
e−(x−µ)
2 /2σ 2
P (x) = √2πσ
1
inference
P (a ∧ b)
P (a∣b) = if P (b) ≠ 0
P (b)
● Product rule follows from this:
P (a ∧ b) = P (a∣b)P (b) = P (b∣a)P (a)
P (¬cavity ∧ toothache)
P (¬cavity∣toothache) =
P (toothache)
0.016 + 0.064
= = 0.4
0.108 + 0.012 + 0.016 + 0.064
● The terms in the summation are joint entries because Y, E, and H together
exhaust the set of random variables
● Obvious problems
– Worst-case time complexity O(dn) where d is the largest arity
– Space complexity O(dn) to store the joint distribution
– How to find the numbers for O(dn) entries???
independence
● If I have a cavity, the probability that the probe catches in it doesn’t depend on
whether I have a toothache:
(1) P (catch∣toothache, cavity) = P (catch∣cavity)
● Equivalent statements:
P(T oothache∣Catch, Cavity) = P(T oothache∣Cavity)
P(T oothache, Catch∣Cavity) = P(T oothache∣Cavity)P(Catch∣Cavity)
● In most cases, the use of conditional independence reduces the size of the
representation of the joint distribution from exponential in n to linear in n.
bayes rule
● Or in distribution form
P(X∣Y )P(Y )
P(Y ∣X) = = αP(X∣Y )P(Y )
P(X)
● Generally:
P(Cause, Effect1, . . . , Effectn) = P(Cause) ∏ P(Effecti∣Cause)
i
wampus world
● Second term: pits are placed randomly, probability 0.2 per square:
4,4
for n pits.
● Query is P(P1,3∣known, b)
● For nontrivial domains, we must find a way to reduce the joint size