The law of total variance (Eve's law)
ProvedFamousTheorems.law_of_total_varianceThe law of total variance (Eve's law). Let be a square-integrable random variable and a sub--algebra. Then
The variance splits into the unexplained part, the expected conditional variance, and the explained part, the variance of the conditional mean. This decomposition underlies analysis of variance (ANOVA), Rao–Blackwellization and the bias–variance tradeoff.
Formalization note. Mathlib's ProbabilityTheory.integral_condVar_add_variance_condExp. The ambient -algebra is m₀ and the sub--algebra is m ≤ m₀. condVar m X μ is the conditional variance, μ[X | m] is the conditional expectation, variance is the variance, and MemLp X 2 μ is square-integrability. The measure is a probability measure.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
open MeasureTheory ProbabilityTheory
theorem law_of_total_variance {Ω : Type*} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : @Measure Ω m₀} (hm : m ≤ m₀)
[IsProbabilityMeasure μ] (hX : MemLp X 2 μ) :
∫ ω, condVar m X μ ω ∂μ + variance (μ[X | m]) μ = variance X μ := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `ProbabilityTheory.integral_condVar_add_variance_condExp`. Proof here reduces to that Mathlib result.