Documentation

LeanPool.HansonWright.Probability.Concentration.Bernstein

Scalar Bernstein Inequality #

This file contains generic scalar Bernstein CGF-to-tail infrastructure and the classical Bernstein inequality for finite independent sums of centered bounded real random variables.

Main results #

theorem LeanPool.bernstein_one_sided_of_cgf_bound {Ω : Type u_1} [MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {Y : Ω} {v b C t : } (hC : 0 < C) (hv : 0 < v) (hb : 0 < b) (hcgf : ∀ (l : ), |l| (2 * C * b)⁻¹ProbabilityTheory.cgf Y μ l C * l ^ 2 * v) (hint : ∀ (l : ), |l| (2 * C * b)⁻¹MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (l * Y ω)) μ) (ht : 0 t) :
(μ {ω : Ω | t Y ω}).toReal Real.exp (-(1 / (4 * C)) * min (t ^ 2 / v) (t / b))

A one-sided Bernstein tail bound from a local quadratic CGF estimate.

theorem LeanPool.bernstein_two_sided_of_cgf_bound {Ω : Type u_1} [MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {Y : Ω} {v b C t : } (hC : 0 < C) (hv : 0 < v) (hb : 0 < b) (hcgf : ∀ (l : ), |l| (2 * C * b)⁻¹ProbabilityTheory.cgf Y μ l C * l ^ 2 * v) (hint : ∀ (l : ), |l| (2 * C * b)⁻¹MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (l * Y ω)) μ) (ht : 0 t) :
(μ {ω : Ω | t |Y ω|}).toReal 2 * Real.exp (-(1 / (4 * C)) * min (t ^ 2 / v) (t / b))

A two-sided Bernstein tail bound from a local quadratic CGF estimate.

Exact scalar Bernstein CGF and tail infrastructure #

theorem LeanPool.iIndepFun.integrable_exp_mul_finsetSum {Ω : Type u} [MeasurableSpace Ω] {ι : Type u_1} {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : ιΩ} (h_indep : ProbabilityTheory.iIndepFun X μ) (h_meas : ∀ (i : ι), AEMeasurable (X i) μ) {s : Finset ι} {t : } (h_int : is, MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (t * X i ω)) μ) :
MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (t * (∑ is, X i) ω)) μ
theorem LeanPool.bernstein_mgf_le_of_centered_abs_le {Ω : Type u} [MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {X : Ω} {b l : } (hX : AEMeasurable X μ) (hcenter : (ω : Ω), X ω μ = 0) (hbound : ∀ᵐ (ω : Ω) μ, |X ω| b) (hl : 0 l) (hbl : b * l < 3) :

Bernstein MGF bound for one centered, almost surely bounded real random variable.

theorem LeanPool.bernstein_cgf_le_of_centered_abs_le {Ω : Type u} [MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {X : Ω} {b l : } (hX : AEMeasurable X μ) (hcenter : (ω : Ω), X ω μ = 0) (hbound : ∀ᵐ (ω : Ω) μ, |X ω| b) (hl : 0 l) (hbl : b * l < 3) :
ProbabilityTheory.cgf X μ l ProbabilityTheory.variance X μ * l ^ 2 / (2 * (1 - b * l / 3))

Bernstein CGF bound for one centered, almost surely bounded real random variable.

theorem LeanPool.bernstein_cgf_sum_le {Ω : Type u} [MeasurableSpace Ω] {ι : Type u_1} {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] (s : Finset ι) {X : ιΩ} {b v l : } (h_indep : ProbabilityTheory.iIndepFun X μ) (hX : ∀ (i : ι), AEMeasurable (X i) μ) (hcenter : is, (ω : Ω), X i ω μ = 0) (hbound : is, ∀ᵐ (ω : Ω) μ, |X i ω| b) (hvar : is, ProbabilityTheory.variance (X i) μ v) (hl : 0 l) (hbl : b * l < 3) :
ProbabilityTheory.cgf (∑ is, X i) μ l v * l ^ 2 / (2 * (1 - b * l / 3))

The CGF of a finite independent sum satisfies the rational Bernstein bound.

theorem LeanPool.bernstein_one_sided_of_rational_cgf_bound {Ω : Type u} [MeasurableSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {Y : Ω} {v b t : } (hv : 0 < v) (hb : 0 b) (ht : 0 t) (hcgf : ∀ (l : ), 0 lb * l < 3ProbabilityTheory.cgf Y μ l v * l ^ 2 / (2 * (1 - b * l / 3))) (hint : ∀ (l : ), 0 lb * l < 3MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (l * Y ω)) μ) :
(μ {ω : Ω | t Y ω}).toReal Real.exp (-t ^ 2 / (2 * (v + b * t / 3)))

Exact one-sided Bernstein tail bound from a rational Bernstein CGF estimate.

theorem LeanPool.bernstein_inequality_finset {Ω : Type u} [MeasurableSpace Ω] {ι : Type u_1} {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] (s : Finset ι) {X : ιΩ} {b v t : } (hb : 0 b) (hv : 0 < v) (ht : 0 t) (h_indep : ProbabilityTheory.iIndepFun X μ) (hX : ∀ (i : ι), AEMeasurable (X i) μ) (hcenter : is, (ω : Ω), X i ω μ = 0) (hbound : is, ∀ᵐ (ω : Ω) μ, |X i ω| b) (hvar : is, ProbabilityTheory.variance (X i) μ v) :
(μ {ω : Ω | t (∑ is, X i) ω}).toReal Real.exp (-t ^ 2 / (2 * (v + b * t / 3)))

Scalar Bernstein inequality for a finite set of independent centered bounded summands.

theorem LeanPool.bernstein_inequality {Ω : Type u} [MeasurableSpace Ω] {ι : Type u_1} [Fintype ι] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure μ] {X : ιΩ} {b v t : } (hb : 0 b) (hv : 0 < v) (ht : 0 t) (h_indep : ProbabilityTheory.iIndepFun X μ) (hX : ∀ (i : ι), AEMeasurable (X i) μ) (hcenter : ∀ (i : ι), (ω : Ω), X i ω μ = 0) (hbound : ∀ (i : ι), ∀ᵐ (ω : Ω) μ, |X i ω| b) (hvar : i : ι, ProbabilityTheory.variance (X i) μ v) :
(μ {ω : Ω | t (∑ i : ι, X i) ω}).toReal Real.exp (-t ^ 2 / (2 * (v + b * t / 3)))

Convenience [Fintype ι] wrapper for the scalar Bernstein inequality.