The law of total probability
ProvedFamousTheorems.law_of_total_probabilityThe law of total probability. Let be a measurable random variable with values in a finite set , and let be a finite measure. Then
Evaluated on an event , this is .
This formula conditions on the value of and splits into cases. It is used throughout probability, Bayesian inference and Markov chain analysis, and it underlies Bayes' theorem.
Formalization note. Mathlib's ProbabilityTheory.sum_meas_smul_cond_fiber. ProbabilityTheory.cond μ s is the conditional measure . The identity is an equality of measures, with scalar multiplication by . When the conditional measure is , so that term vanishes. carries the discrete -algebra.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
open MeasureTheory
theorem law_of_total_probability {Ω α : Type*} {m : MeasurableSpace Ω} [Fintype α] [MeasurableSpace α] [DiscreteMeasurableSpace α]
{X : Ω → α} (hX : Measurable X) (μ : Measure Ω) [IsFiniteMeasure μ] :
∑ x : α, μ (X ⁻¹' {x}) • ProbabilityTheory.cond μ (X ⁻¹' {x}) = μ := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `ProbabilityTheory.sum_meas_smul_cond_fiber`. Proof here reduces to that Mathlib result.