Lecture 11
Probability and inductive logic
Johannes Korbmacher Lecture slides
Logical methods for AI
Probability and inductive logic
Lecture 11
What you’ll be able to do
Next-token prediction
- Each continuation has a probability.
- The inference is probable, not certain.
Weighted truth-tables
Enable JavaScript to edit the probabilities and calculate with this table.
Probabilities
Examples:
- Uniform, 14 each: Pr(SUN ∨ ¬RAIN) = 34
- Sun certain, 12 on each sunny model: Pr(SUN ∨ ¬RAIN) = 1
Conditioning
EVEN = D₂ ∨ D₄ ∨ D₆, TWO = D₂
Enable JavaScript to edit the probabilities and calculate with this table.
Conditional probability
Examples: Pr(TWO | EVEN)
- Fair die: 13
- Six loaded to 12: 17
Independence
Examples: Pr(RAIN | SUN) and Pr(RAIN)
- Uniform: 12 = 12, independent
- Dependent: 13 < 38, sun lowers rain
Probability laws
- Every weighted truth-table obeys them.
- Finitely many variables: the converse holds.
- Laws follow without a table, even in FOL.
Negation
Pr(¬A) = 1 − Pr(A)
Disjunction
Pr(A ∨ B) = Pr(A) + Pr(B) − Pr(A ∧ B)
Bayes’ rule
Turns Pr(E | C) into Pr(C | E):
- Prior (glossary, opens in a new tab) Pr(C): before the evidence
- Likelihood (glossary, opens in a new tab) Pr(E | C): the evidence, if C
- Posterior (glossary, opens in a new tab) Pr(C | E): after the evidence
- Total probability (glossary, opens in a new tab) gives the denominator:
Measures of support
- Increase of firmness: d(C, E) = Pr(C | E) − Pr(C)
- Log probability ratio: r(C, E) = log(Pr(C | E)Pr(C))
- Log-likelihood ratio: l(C, E) = log(Pr(E | C)Pr(E | ¬C))
- Ratio above 1: log > 0, support
- Ratio 1: log(1) = 0, irrelevance
- Ratio below 1: log < 0, counter-evidence
Comparing the measures
Enable JavaScript to edit the probabilities and calculate with this table.
Spam filters
- Markers: Unknown, Urgent, Exclamation, Money
- Rule: (Urgent ∧ Money) → SPAM
- Jim’s birthday wishes: spam!
Naive Bayes classifiers
- Score each class: score(K) = Pr(K) × ∏i = 1n Pr(Lᵢ | K)
- Normalize: Pr(SPAM | E) = score(SPAM)score(SPAM) + score(¬SPAM)
A spam filter
Enable JavaScript to edit the probabilities and calculate with this table.
Logical inductive support
Confirmation by consequence
Example:
- TWO ⊨ EVEN
- Pr(TWO | EVEN) = Pr(TWO)Pr(EVEN) ≥ Pr(TWO)
- Fair die: from 16 to 13
Enumerative induction
Example: 100 marbles, each white with chance 12
- 70 drawn, all white
- Prior: Pr(∀x White(x)) = 2−100
- Posterior: Pr(∀x White(x) | E) = 2−30
- A huge increase, and still tiny.
Use ← / →, Page Up / Page Down, or Space to navigate. While you work in an app, only Page Up / Page Down change the slide. Press F for full screen and Esc to exit. Each slide has a shareable URL.
What is on the slidesText of every slide
The text of every slide, in order. Drawings are described in words, and interactive apps are named; the textbook chapter has each of them in full.