The law of the unconscious statistician
ProvedFamousTheorems.law_of_unconscious_statisticianThe law of the unconscious statistician. Let be a random variable on a finite measure space with a density with respect to a measure on , and let be -a.e. strongly measurable. Then
The expectation of can be computed from the distribution of without finding the distribution of . This is how expectations are computed in practice, for example .
Formalization note. Mathlib's MeasureTheory.pdf.integral_pdf_smul. HasPDF X P μ says that the law of under has a density with respect to , and pdf X P μ is that density, with values in (converted with toReal). takes values in a real normed space and both sides are Bochner integrals.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
open MeasureTheory
theorem law_of_unconscious_statistician {Ω E F : Type*} [MeasurableSpace E] {m : MeasurableSpace Ω} {P : Measure Ω} {μ : Measure E}
[NormedAddCommGroup F] [NormedSpace ℝ F] [IsFiniteMeasure P] {X : Ω → E} [HasPDF X P μ] {f : E → F}
(hf : AEStronglyMeasurable f μ) :
∫ x, (pdf X P μ x).toReal • f x ∂μ = ∫ ω, f (X ω) ∂P := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `MeasureTheory.pdf.integral_pdf_smul`. Proof here reduces to that Mathlib result.