Bayes' theorem
ProvedFamousTheorems.bayesBayes' theorem.
For measurable events under a finite measure ,
The identity inverts a conditional: it converts the probability of the evidence given the hypothesis into the probability of the hypothesis given the evidence. The three ingredients on the right are the likelihood , the prior , and the normalizing evidence — the vocabulary of Bayesian inference, where the theorem is the update rule taking prior to posterior.
It is a two-line consequence of the definition , applied both ways round, but the interpretive weight it carries is out of all proportion to the derivation. The common failure it corrects is base-rate neglect: a test with a false-positive rate applied to a condition affecting in yields a positive result that is wrong about of the time, because the prior dominates.
Bayes' essay was published posthumously in 1763 by Richard Price; Laplace rediscovered and greatly extended the idea, and the modern measure-theoretic framing is Kolmogorov's.
Formalization note. μ[t | s] is the conditional measure ProbabilityTheory.cond, defined as
the restriction to s rescaled by (μ s)⁻¹; the statement is arranged with the inverse on the left
to avoid division in ℝ≥0∞. The result is Mathlib's
ProbabilityTheory.cond_eq_inv_mul_cond_mul.
import Mathlib
namespace FamousTheorems
open MeasureTheory ProbabilityTheory Filter Set
open scoped Topology ENNReal NNReal
theorem bayes {Ω : Type*} {m : MeasurableSpace Ω} {s t : Set Ω}
(hms : MeasurableSet s) (hmt : MeasurableSet t) (μ : Measure Ω) [IsFiniteMeasure μ] :
μ[t | s] = (μ s)⁻¹ * μ[s | t] * μ t := by sorry
end FamousTheorems