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

prob_llm_exampleaon a 0.60.10.01Logicist1t2t3t4t5wesomethe rise againthing of the past
  • 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

prob_weather_spaceΩ={},,,

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
prob_die_spaceΩ{,,,,,}=

Independence

ai_bikin_sun

Examples: Pr(RAIN | SUN) and Pr(RAIN)

  • Uniform: 12 = 12, independent
  • Dependent: 13 < 38, sun lowers rain

Probability laws

prob_lawsPr(A)Pr(A)1-
  • 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)

The interactive example is loading.

Disjunction

Pr(A ∨ B) = Pr(A) + Pr(B) − Pr(A ∧ B)

The interactive example is loading.

Bayes’ rule

ai_doctor

Turns Pr(E | C) into Pr(C | E):

Pr(E) = Pr(E | C) × Pr(C) + Pr(E | ¬C) × Pr(¬C)

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))
logarithm12345−2−1120xy = log(x)y
  • 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

prob_ai_spamdefinitely not SPAM@
prob_ai_non_spamTo: ai@uu.nlFrom: unknown senderDate: October 19, 2025 - 10:52 a.m.Subject: Urgent messageHi ∀I,This is Jim, I've got a new address. Happy Birthday! Thanks again for your input yesterday, you were right on the money.
  • 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

con_ai_detective

Example:

  • TWO ⊨ EVEN
  • Pr(TWO | EVEN) = Pr(TWO)Pr(EVEN) ≥ Pr(TWO)
  • Fair die: from 16 to 13

Enumerative induction

la_ai_inductionThey're all white!!

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.