Mathlib.Probability.CondVar
23 declarations. Mathlib docs · Source
Conditional variance
This file defines the variance of a real-valued random variable conditional to a sigma-algebra.
TODO
Define the Lebesgue conditional variance. See GibbsMeasure for a definition of the Lebesgue conditional expectation.
def ProbabilityTheory.condVar E1 #
{Ω : Type u_1} → {m₀ : MeasurableSpace Ω} → MeasurableSpace Ω → (Ω → ℝ) → MeasureTheory.Measure Ω → Ω → ℝ
Conditional variance of a real-valued random variable. It is defined as 0 if any one of the
following conditions is true:
mis not a sub-σ-algebra ofm₀,μis not σ-finite with respect tom,X - μ[X | m]is not square-integrable.
def ProbabilityTheory.«termVar[_;_|_]» E1 #
Lean.ParserDescr
Conditional variance of a real-valued random variable. It is defined as 0 if any one of the
following conditions is true:
mis not a sub-σ-algebra ofm₀,μis not σ-finite with respect tom,X - μ[X | m]is not square-integrable.
def ProbabilityTheory.«termVar[_|_]» E1 #
Lean.ParserDescr
Conditional variance of a real-valued random variable. It is defined as 0 if any one of the
following conditions is true:
mis not a sub-σ-algebra ofm₀,volumeis not σ-finite with respect tom,X - 𝔼[X | m]is not square-integrable.
theorem ProbabilityTheory.condVar_of_not_le E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
¬m ≤ m₀ → ProbabilityTheory.condVar m X μ = 0
theorem ProbabilityTheory.condVar_of_not_sigmaFinite E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {hm : m ≤ m₀} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
¬MeasureTheory.SigmaFinite (μ.trim hm) → ProbabilityTheory.condVar m X μ = 0
theorem ProbabilityTheory.condVar_of_sigmaFinite E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {hm : m ≤ m₀} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω}
[inst : MeasureTheory.SigmaFinite (μ.trim hm)],
ProbabilityTheory.condVar m X μ =
if MeasureTheory.Integrable (fun ω ↦ (X ω - μ[X | m] ω) ^ 2) μ then
if MeasureTheory.StronglyMeasurable fun ω ↦ (X ω - μ[X | m] ω) ^ 2 then fun ω ↦ (X ω - μ[X | m] ω) ^ 2
else MeasureTheory.AEStronglyMeasurable.mk ↑↑(MeasureTheory.condExpL1 hm μ fun ω ↦ (X ω - μ[X | m] ω) ^ 2) ⋯
else 0
theorem ProbabilityTheory.condVar_of_stronglyMeasurable E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {hm : m ≤ m₀} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω}
[MeasureTheory.SigmaFinite (μ.trim hm)],
MeasureTheory.StronglyMeasurable X →
MeasureTheory.Integrable ((X - μ[X | m]) ^ 2) μ → ProbabilityTheory.condVar m X μ = fun ω ↦ (X ω - μ[X | m] ω) ^ 2
theorem ProbabilityTheory.condVar_of_not_integrable E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
¬MeasureTheory.Integrable (fun ω ↦ (X ω - μ[X | m] ω) ^ 2) μ → ProbabilityTheory.condVar m X μ = 0
theorem ProbabilityTheory.condVar_zero E0 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω}, ProbabilityTheory.condVar m 0 μ = 0
theorem ProbabilityTheory.condVar_const E0 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω},
m ≤ m₀ → ∀ (c : ℝ), ProbabilityTheory.condVar m (fun x ↦ c) μ = 0
theorem ProbabilityTheory.stronglyMeasurable_condVar E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
MeasureTheory.StronglyMeasurable (ProbabilityTheory.condVar m X μ)
theorem ProbabilityTheory.condVar_congr_ae E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X Y : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
X =ᵐ[μ] Y → ProbabilityTheory.condVar m X μ =ᵐ[μ] ProbabilityTheory.condVar m Y μ
theorem ProbabilityTheory.condVar_of_aestronglyMeasurable E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {hm : m ≤ m₀} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω}
[hμm : MeasureTheory.SigmaFinite (μ.trim hm)],
MeasureTheory.AEStronglyMeasurable X μ →
MeasureTheory.Integrable ((X - μ[X | m]) ^ 2) μ → ProbabilityTheory.condVar m X μ =ᵐ[μ] (X - μ[X | m]) ^ 2
theorem ProbabilityTheory.integrable_condVar E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
MeasureTheory.Integrable (ProbabilityTheory.condVar m X μ) μ
theorem ProbabilityTheory.setIntegral_condVar E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {hm : m ≤ m₀} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω} {s : Set Ω}
[MeasureTheory.SigmaFinite (μ.trim hm)],
MeasureTheory.Integrable ((X - μ[X | m]) ^ 2) μ →
MeasurableSet s → ∫ (ω : Ω) in s, ProbabilityTheory.condVar m X μ ω ∂μ = ∫ (ω : Ω) in s, (X ω - μ[X | m] ω) ^ 2 ∂μ
The integral of the conditional variance Var[X | m] over an m-measurable set is equal to
the integral of (X - μ[X | m]) ^ 2 on that set.
theorem ProbabilityTheory.condVar_ae_eq_condExp_sq_sub_sq_condExp E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
m ≤ m₀ →
∀ [MeasureTheory.IsFiniteMeasure μ],
MeasureTheory.MemLp X 2 μ → ProbabilityTheory.condVar m X μ =ᵐ[μ] μ[X ^ 2 | m] - μ[X | m] ^ 2
theorem ProbabilityTheory.condVar_ae_le_condExp_sq E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
m ≤ m₀ →
∀ [MeasureTheory.IsFiniteMeasure μ], MeasureTheory.MemLp X 2 μ → ProbabilityTheory.condVar m X μ ≤ᵐ[μ] μ[X ^ 2 | m]
theorem ProbabilityTheory.integral_condVar_add_variance_condExp E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω},
m ≤ m₀ →
∀ [MeasureTheory.IsProbabilityMeasure μ],
MeasureTheory.MemLp X 2 μ →
∫ (x : Ω), ProbabilityTheory.condVar m X μ x ∂μ + ProbabilityTheory.variance μ[X | m] μ =
ProbabilityTheory.variance X μ
Law of total variance
theorem ProbabilityTheory.condVar_bot' E1 #
∀ {Ω : Type u_1} {m₀ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [NeZero μ] (X : Ω → ℝ),
ProbabilityTheory.condVar ⊥ X μ = fun x ↦ ⨍ (ω : Ω), (X ω - ⨍ (ω' : Ω), X ω' ∂μ) ^ 2 ∂μ
theorem ProbabilityTheory.condVar_bot_ae_eq E0 #
∀ {Ω : Type u_1} {m₀ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} (X : Ω → ℝ),
ProbabilityTheory.condVar ⊥ X μ =ᵐ[μ] fun x ↦ ⨍ (ω : Ω), (X ω - ⨍ (ω' : Ω), X ω' ∂μ) ^ 2 ∂μ
theorem ProbabilityTheory.condVar_bot E0 #
∀ {Ω : Type u_1} {m₀ : MeasurableSpace Ω} {X : Ω → ℝ} {μ : MeasureTheory.Measure Ω}
[MeasureTheory.IsProbabilityMeasure μ],
AEMeasurable X μ → ProbabilityTheory.condVar ⊥ X μ = fun _ω ↦ ProbabilityTheory.variance X μ
theorem ProbabilityTheory.condVar_smul E1 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} (c : ℝ) (X : Ω → ℝ),
ProbabilityTheory.condVar m (c • X) μ =ᵐ[μ] c ^ 2 • ProbabilityTheory.condVar m X μ
theorem ProbabilityTheory.condVar_neg E0 #
∀ {Ω : Type u_1} {m₀ m : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} (X : Ω → ℝ),
ProbabilityTheory.condVar m (-X) μ =ᵐ[μ] ProbabilityTheory.condVar m X μ