Bayesian inference is a disciplined way to revise uncertainty. It combines what was believed before observing data with how likely that data is under competing explanations.
The three ingredients
The prior represents belief before the new observation. The likelihood scores how compatible the observation is with each hypothesis. The posterior is the updated belief after multiplying prior and likelihood and normalizing across alternatives.
A diagnostic-test example
A highly accurate test can still produce a modest probability of disease when the disease is rare. The base rate belongs in the prior; sensitivity and false-positive rate belong in the likelihood. Ignoring the prior is the source of many intuitive mistakes.
Modeling choices matter
Bayesian arithmetic is exact only relative to the stated model. Poor priors, dependent observations treated as independent, or an incomplete set of hypotheses can mislead. Report assumptions and perform sensitivity checks instead of treating one posterior number as timeless truth.
Continue with the book
Explore the full treatment, worked examples, and exercises in The AI Algorithms Compendium.
Adapted from The AI Algorithms Compendium, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
