Skip to content
— CH. 1 · INTRODUCTION —

Bayesian inference

~8 min read · Ch. 1 of 8
8 sections
  • Bayesian inference begins with a single, disarming idea: your beliefs are probabilities, and every new piece of evidence should change them. The method takes its name from Thomas Bayes, an 18th-century English minister who died in 1761, leaving behind an essay that would quietly reshape how scientists, doctors, engineers, and courts think about uncertainty. Pierre-Simon Laplace, working decades later, formalized what we now call Bayes' theorem and applied it to problems in celestial mechanics, medical statistics, and jurisprudence. The theorem sat on the margins of mainstream science for generations before exploding back into relevance in the 1980s. What drove that revival, how the method actually works, and why a courtroom in the United Kingdom once grappled with whether to teach a jury the formula, are the questions this documentary sets out to answer.

  • Bayes' theorem rests on a deceptively compact relationship between three quantities: a prior probability, a likelihood, and a posterior probability. The prior is what you believed before seeing any evidence. The likelihood measures how well the observed evidence fits a given hypothesis. The posterior is what you believe after combining both, and it becomes the new prior when fresh evidence arrives. This cycle of updating is the engine of Bayesian inference. The rule can be stated plainly: the posterior is proportional to the likelihood multiplied by the prior. The marginal likelihood, sometimes called the model evidence, normalizes the result so that all competing hypotheses still add up to one. One property of the theorem carries a sharp warning. If you assign a hypothesis a prior probability of exactly zero, no amount of evidence can ever raise it above zero. Statistician Ian Hacking pointed out that traditional Dutch book arguments did not actually require Bayesian updating; they left open the possibility that other updating rules could avoid the same pitfalls. Richard C. Jeffrey later developed an updating rule for cases where the evidence itself is uncertain, a framework discussed under the name probability kinematics.

  • A principle sometimes called Cromwell's rule captures the hard edge of the theorem: if a prior probability is set to exactly zero or exactly one, it can never be moved by evidence. This is not a flaw but a logical consequence, and it counsels against certainty before data. When prior probabilities are less extreme, Bayesian inference has better news. Under conditions first rigorously worked out by Joseph L. Doob in 1948, the Bernstein-von Mises theorem guarantees that as the number of observations grows, the posterior distribution converges to a Gaussian centered on the true value, regardless of where you started. David A. Freedman extended this work in research papers published in 1963 and 1965. His 1963 paper confirmed convergence for finite probability spaces. His 1965 paper demonstrated that for a countably infinite probability space, a dense subset of priors fails to converge at all. Freedman and Persi Diaconis continued to probe these infinite cases through the 1980s and 1990s, and the practical lesson remains: for large but finite systems, convergence may be very slow, and the initial choice of prior can matter for a long time.

  • A bowl of cookies clarifies the abstract machinery. Two bowls sit on a table: bowl one holds 10 chocolate chip and 30 plain cookies, bowl two holds 20 of each. Fred picks a bowl at random and draws a plain cookie. Bayesian inference asks: given the plain cookie, how likely is it that Fred reached into bowl one? Intuition says more than half, because bowl one is heavier in plain cookies. Bayes' theorem makes that precise. Since each bowl was equally likely before the draw, and a plain cookie is more probable from bowl one, the calculation returns a posterior probability of 0.6 for bowl one. An archaeological example runs the same logic over a longer time span. A site believed to be medieval, ranging from the 11th through the 16th century, yields pottery fragments that are either glazed or decorated. If inhabited early, 1% of pottery would be glazed and 50% decorated; if late, 81% glazed and 5% decorated. As each new fragment is unearthed, the archaeologist's belief shifts. A simulation of 50 fragments, anchored to an assumed true occupation date of around 1420, produced a posterior giving the site about a 63% chance of 14th-century occupation and about 36% for the 15th century, with practically no probability for the 11th or 12th centuries.

  • Bayesian prediction differs from frequentist prediction in a consequential way. Rather than fixing a single best-guess parameter and plugging it into a formula, the Bayesian approach integrates over all possible parameter values, weighted by the posterior. The result is the posterior predictive distribution, a full spread of possible outcomes rather than a point. Frequentist methods sometimes correct for parameter uncertainty in special cases, the Student's t-distribution being the classic example for normally distributed data with unknown mean and variance. Bayesian methods, by contrast, can always determine this predictive spread exactly, or to any desired level of precision using numerical methods. Abraham Wald gave decision theory a landmark result: every unique Bayesian procedure is admissible, and every admissible statistical procedure is either a Bayesian one or a limit of Bayesian procedures. This placed Bayesian methods at the core of frequentist inference tasks such as parameter estimation, hypothesis testing, and confidence intervals, even for practitioners who did not think of themselves as Bayesians.

  • In the United Kingdom, a case called R v Adams tested whether Bayes' theorem belonged in a criminal courtroom. A defense expert explained the theorem to the jury. The jury convicted, and the case went to appeal on the grounds that no mechanism had been provided for jurors who declined to use the formula. The Court of Appeal upheld the conviction but issued a pointed opinion: introducing Bayes' theorem, or any similar method, into a criminal trial plunges the jury into inappropriate and unnecessary realms of theory and complexity, deflecting them from their proper task. The controversy surfaces a real tension. Bayes applied to a criminal trial requires a prior probability of guilt. One suggestion in the literature is that if a thousand people could plausibly have committed a crime, the prior should be set at 1/1000. A scholar named Gardner-Medwin argued that the jury's criterion should not be the probability of guilt but the probability that the observed evidence could have arisen if the defendant were innocent, a framing closer to the frequentist concept of a p-value. He proposed that conviction should require believing both that the evidence fits a guilty defendant and that it could not have arisen from an innocent one. The practical suggestion that emerged from these debates is that Bayes' theorem might be more accessible to jurors when expressed as betting odds rather than probabilities, since odds are a more familiar language.

  • Bayesian methods spent much of the 20th century on the sidelines because the computations were intractable for all but the simplest models. The 1980s changed that. The discovery of Markov chain Monte Carlo methods removed most of the computational barriers, enabling Bayesian analysis of models whose posterior distributions had no closed-form solution. Gibbs sampling and the broader family of Metropolis-Hastings schemes are named examples of these simulation-based techniques. Probabilistic programming languages emerged as a practical layer on top of these methods, letting practitioners build Bayesian models while leaving the numerical inference to automated tools. The connection between Bayesian methods and machine learning deepened steadily, and spam filtering became an early, widely noticed application. Filters built on Bayesian inference, including CRM114, DSPAM, Bogofilter, SpamAssassin, SpamBayes, and XEAMS, learned to distinguish unwanted messages by treating the probability that a message is spam as a hypothesis to be updated on each word. Pattern recognition work using these techniques dates back to the late 1950s.

  • Cosmology adopted Bayesian methods for a task with no frequentist alternative: fitting the six base parameters of the Lambda-CDM model to data from the cosmic microwave background. The Planck 2018 CMB dataset is a cited example of this approach in practice. The software package cobaya sets up these cosmological runs, interfacing with Boltzmann codes that compute predicted CMB anisotropies for any trial set of parameters, and driving MCMC or nested samplers to explore the posterior. The same machinery applies to extended theories of cosmology, including models with early dark energy or modified gravity, where Bayesian model comparison can weigh the evidence for a non-standard model against the baseline Lambda-CDM. In biology and medicine, Bayesian methods power differential gene expression analysis and a cancer-risk framework called CIRI, the Continuous Individualized Risk Index, which incorporates serial measurements to update a patient-specific model built from prior clinical knowledge. In astrophysics, the method has been used to characterize the atmosphere of the exoplanet k2-18b. The phylogenetics community adopted Bayesian inference because it allows simultaneous estimation of many demographic and evolutionary parameters, a task that would be far more cumbersome by other means. Thomas Bayes wrote his foundational essay on the binomial distribution's success rate, now called Proposition 9 of his work; the application domains that proposition eventually licensed now span from the subatomic to the cosmological.

Common questions

What is Bayesian inference and how does it work?

Bayesian inference is a method of statistical inference that uses Bayes' theorem to calculate the probability of a hypothesis given prior evidence, then updates that probability as new information arrives. It starts with a prior probability, multiplies it by a likelihood derived from observed data, and produces a posterior probability. The posterior then serves as the prior for the next round of evidence.

Who invented Bayesian inference and when?

The method is named after Thomas Bayes (1701-1761), who proved that probabilistic limits could be placed on an unknown event. Pierre-Simon Laplace (1749-1827) independently introduced what is now called Bayes' theorem and applied it to problems in celestial mechanics, medical statistics, reliability, and jurisprudence.

What is Cromwell's rule in Bayesian inference?

Cromwell's rule states that if a prior probability is set to exactly zero or exactly one, no amount of evidence can ever change it. It is a direct logical consequence of Bayes' theorem, and it warns against assigning absolute certainty or impossibility to any hypothesis before data is observed.

When did Bayesian methods become widely used in practice?

Bayesian methods experienced dramatic growth in research and applications in the 1980s, mostly attributed to the discovery of Markov chain Monte Carlo methods, which removed many of the previous computational barriers. Interest further expanded with the rise of machine learning and complex nonstandard applications.

How is Bayesian inference used in spam filtering?

Bayesian inference is used to estimate the probability that an email is spam by treating each word as evidence that updates the hypothesis. Applications built on this approach include CRM114, DSPAM, Bogofilter, SpamAssassin, SpamBayes, Mozilla, and XEAMS. Bayesian pattern recognition techniques of this kind date to the late 1950s.

Was Bayesian inference used in a criminal trial in the United Kingdom?

Yes. In the case R v Adams, a defense expert witness explained Bayes' theorem to a jury in the United Kingdom. The Court of Appeal upheld the resulting conviction but stated that introducing Bayes' theorem into a criminal trial plunges the jury into inappropriate and unnecessary realms of theory and complexity, deflecting them from their proper task.

All sources

59 references cited across the entry

  1. 1webBayesian Models of CognitionThomas Griffiths — July 24, 2024
  2. 2journalSlightly More Realistic Personal ProbabilityIan Hacking — December 1967
  3. 4journalOn the geometry of Bayesian inferenceMiguel de Carvalho et al. — 2019
  4. 5journalGibbs sampler and coordinate ascent variational inference: A set-theoretical reviewSe Yoon Lee — 2021
  5. 6bookFoundations of the Theory of ProbabilityA.N. Kolmogorov — Chelsea Publishing Company — 1933
  6. 7bookProbability based on Radon measuresTue Tjur — Chichester Eng.; New York : Wiley — 1980
  7. 8journalImproper priors and improper posteriorsGunnar Taraldsen et al. — 2021-07-24
  8. 9bookMonte Carlo Statistical MethodsChristian P. Robert et al. — Springer — 2004
  9. 10journalOn the asymptotic behavior of Bayes' estimates in the discrete caseDA Freedman — 1963
  10. 11journalOn the asymptotic behavior of Bayes estimates in the discrete case IIDA Freedman — 1965
  11. 12journalConditioning, likelihood, and coherence: A review of some foundational conceptsJames Robins et al. — 2000
  12. 13bookPitman's measure of closeness: A comparison of statistical estimatorsPranab K. Sen et al. — SIAM — 1993
  13. 14bookHandbook of StatisticsNidhan Choudhuri et al. — 2005-01-01
  14. 18journalAdmissible Bayes Character of T2-, R2-, and Other Fully Invariant Tests for Multivariate Normal ProblemsKiefer, J. — 1965
  15. 19journalInvariant Proper Bayes Tests for Exponential FamiliesSchwartz, R. — 1969
  16. 21bookTesting Statistical HypothesesLehmann, Erich — 1986
  17. 22bookAsymptotic Methods in Statistical Decision TheoryLucien Le Cam — Springer-Verlag — 1986
  18. 23bookTheoretical StatisticsD. R. Cox et al. — Chapman and Hall — 1974
  19. 24journalA review of information criterion rulesP. Stoica et al. — 2004
  20. 25journalThe maximum a posteriori probability rule for atom column detection from HAADF STEM imagesJ. Fatermans et al. — 2019
  21. 26journalProbabilistic ProgrammingDaniel Roy — 2015
  22. 28journalWhen did Bayesian inference become "Bayesian"?Stephen E. Fienberg — 2006-03-01
  23. 29bookBayesian Computation with R, Second editionJim Albert — Springer — 2009
  24. 30journalA Philosophical Treatise of Universal InductionSamuel Rathmanner et al. — 2011
  25. 31journalOn Universal Prediction and Bayesian ConfirmationMarcus Hutter et al. — 2007
  26. 32citeseerxRaymond J. Solomonoff 1926-2009Peter Gács et al. — 2 December 2010
  27. 33webCIRI
  28. 34journalDynamic Risk Profiling Using Serial Tumor Biomarkers for Personalized Outcome PredictionDavid M. Kurtz et al. — 2019-07-25
  29. 35arxivBayesian Methods in CosmologyRoberto Trotta — 2017
  30. 36journalModern Bayesian Sampling Methods for Cosmological Inference: A Comparative StudyDenitsa Staicova — 2025
  31. 37journalNew Constraints on DMS and DMDS in the Atmosphere of K2-18 b from JWST MIRINikku Madhusudhan et al. — 2025
  32. 38journalPlanck 2018 resultsN. Aghanim et al. — 2020
  33. 39journalA general Bayesian framework for foreground modelling and chromaticity correction for global 21 cm experimentsDominic Anstey et al. — 2021
  34. 40journalCosmological parameters from CMB and other data: A Monte Carlo approachAntony Lewis et al. — 2002
  35. 43arxivThe Cosmic Linear Anisotropy Solving System (CLASS) I: OverviewJulien Lesgourgues — 2011
  36. 44journalEarly dark energy does not restore cosmological concordanceJ. Colin Hill et al. — 2020
  37. 45journalBayes in the sky: Bayesian inference and model selection in cosmologyRoberto Trotta — 2008
  38. 47bookCritical RationalismDavid Miller — Open Court — 1994
  39. 48journalStochastic scheduling subject to breakdown-repeat breakdowns with incomplete informationX.Q. Cai et al. — 2009
  40. 49journalBeyond simple linear mixing models: process-based isotope partitioning of ecological processesKiona Ogle et al. — 2014-01-01
  41. 50journalInsights into plant water uptake from xylem-water isotope measurements in two tropical catchments with contrasting moisture conditionsJaivime Evaristo et al. — 2016-01-01
  42. 51journalComparison of Parameter Estimation Methods in Stochastic Chemical Kinetic Models: Examples in Systems BiologyAnkur Gupta et al. — April 2014
  43. 52journalDetection of trend changes in time series using Bayesian inferenceN. Schütz et al. — 2011
  44. 53journalThomas Bayes's Bayesian InferenceStephen Stigler — 1982
  45. 54bookThe History of StatisticsStephen M. Stigler — Harvard University Press — 1986
  46. 55journalWhen did Bayesian Inference Become 'Bayesian'?Stephen E. Fienberg — 2006
  47. 56bookHandbook of statisticsJosé-Miguel Bernardo — 2005
  48. 57journalA Conversation with James O. BergerR. L. Wolpert — 2004
  49. 58bookPattern Recognition and Machine LearningC. M. Bishop — Springer — 2007
  50. 59journalA Bayesian mathematical statistics primerJosé M. Bernardo — 2006