The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V20. Probability

Mathlib.Probability.Moments.SubGaussian

81 declarations. Mathlib docs · Source

Sub-Gaussian random variables

This presentation of sub-Gaussian random variables is inspired by section 2.5 of [vershynin2018high]. Let X be a random variable. Consider the following five properties, in which Kᵢ are positive reals,

  • (i) for all t ≥ 0, ℙ(|X| ≥ t) ≤ 2 * exp(-t^2 / K₁^2),
  • (ii) for all p : ℕ with 1 ≤ p, 𝔼[|X|^p]^(1/p) ≤ K₂ sqrt(p),
  • (iii) for all |t| ≤ 1/K₃, 𝔼[exp (t^2 * X^2)] ≤ exp (K₃^2 * t^2),
  • (iv) 𝔼[exp(X^2 / K₄)] ≤ 2,
  • (v) for all t : ℝ, 𝔼[exp (t * X)] ≤ exp (K₅ * t^2 / 2).

Properties (i) to (iv) are equivalent, in the sense that there exists a constant C such that if X satisfies one of those properties with constant K, then it satisfies any other one with constant at most CK.

If 𝔼[X] = 0 then properties (i)-(iv) are equivalent to (v) in that same sense. Property (v) implies that X has expectation zero.

The name sub-Gaussian is used by various authors to refer to any one of (i)-(v). We will say that a random variable has sub-Gaussian moment-generating function (mgf) with constant K₅ to mean that property (v) holds with that constant. The function exp (K₅ * t^2 / 2) which appears in property (v) is the mgf of a Gaussian with variance K₅. That property (v) is the most convenient one to work with if one wants to prove concentration inequalities using Chernoff's method.

TODO: implement definitions for (i)-(iv) when it makes sense. For example the maximal constant K₄ such that (iv) is true is an Orlicz norm. Prove relations between those properties.

Conditionally sub-Gaussian random variables and kernels

A related notion to sub-Gaussian random variables is that of conditionally sub-Gaussian random variables. A random variable X is conditionally sub-Gaussian in the sense of (v) with respect to a sigma-algebra m and a measure μ if for all t : ℝ, exp (t * X) is μ-integrable and the conditional mgf of X conditioned on m is almost surely bounded by exp (c * t^2 / 2) for some constant c.

As in other parts of Mathlib's probability library (notably the independence and conditional independence definitions), we express both sub-Gaussian and conditionally sub-Gaussian properties as special cases of a notion of sub-Gaussianity with respect to a kernel and a measure.

Main definitions

  • Kernel.HasSubgaussianMGF: a random variable X has a sub-Gaussian moment-generating function with parameter c with respect to a kernel κ and a measure ν if for ν-almost all ω', for all t : ℝ, the moment-generating function of X with respect to κ ω' is bounded by exp (c * t ^ 2 / 2).
  • HasCondSubgaussianMGF: a random variable X has a conditionally sub-Gaussian moment-generating function with parameter c with respect to a sigma-algebra m and a measure μ if for all t : ℝ, exp (t * X) is μ-integrable and the moment-generating function of X conditioned on m is almost surely bounded by exp (c * t ^ 2 / 2) for all t : ℝ. The actual definition uses Kernel.HasSubgaussianMGF: HasCondSubgaussianMGF is defined as sub-Gaussian with respect to the conditional expectation kernel for m and the restriction of μ to the sigma-algebra m.
  • HasSubgaussianMGF: a random variable X has a sub-Gaussian moment-generating function with parameter c with respect to a measure μ if for all t : ℝ, exp (t * X) is μ-integrable and the moment-generating function of X is bounded by exp (c * t ^ 2 / 2) for all t : ℝ. This is equivalent to Kernel.HasSubgaussianMGF with a constant kernel. See HasSubgaussianMGF_iff_kernel.

Main statements

  • measure_sum_ge_le_of_iIndepFun: Hoeffding's inequality for sums of independent sub-Gaussian random variables.
  • hasSubgaussianMGF_of_mem_Icc_of_integral_eq_zero: Hoeffding's lemma for random variables with expectation zero.
  • measure_sum_ge_le_of_HasCondSubgaussianMGF: the Azuma-Hoeffding inequality for sub-Gaussian random variables.

Implementation notes

Definition of Kernel.HasSubgaussianMGF

The definition of sub-Gaussian with respect to a kernel and a measure is the following:

structure Kernel.HasSubgaussianMGF (X : Ω → ℝ) (c : ℝ≥0)
    (κ : Kernel Ω' Ω) (ν : Measure Ω' := by volume_tac) : Prop where
  integrable_exp_mul : ∀ t, Integrable (fun ω ↦ exp (t * X ω)) (κ ∘ₘ ν)
  mgf_le : ∀ᵐ ω' ∂ν, ∀ t, mgf X (κ ω') t ≤ exp (c * t ^ 2 / 2)

An interesting point is that the integrability condition is not integrability of exp (t * X) with respect to κ ω' for ν-almost all ω', but integrability with respect to κ ∘ₘ ν. This is a stronger condition, as the weaker one did not allow to prove interesting results about the sum of two sub-Gaussian random variables.

For the conditional case, that integrability condition reduces to integrability of exp (t * X) with respect to μ.

Definition of HasCondSubgaussianMGF

We define HasCondSubgaussianMGF as a special case of Kernel.HasSubgaussianMGF with the conditional expectation kernel for m, condExpKernel μ m, and the restriction of μ to m, μ.trim hm (where hm states that m is a sub-sigma-algebra). Note that condExpKernel μ m ∘ₘ μ.trim hm = μ. The definition is equivalent to the two conditions

  • for all t, exp (t * X) is μ-integrable,
  • for μ.trim hm-almost all ω, for all t, the mgf with respect to the conditional distribution condExpKernel μ m ω is bounded by exp (c * t ^ 2 / 2).

For any t, we can write the mgf of X with respect to the conditional expectation kernel as a conditional expectation, (μ.trim hm)-almost surely: mgf X (condExpKernel μ m ·) t =ᵐ[μ.trim hm] μ[fun ω' ↦ exp (t * X ω') | m].

References

  • [R. Vershynin, High-dimensional probability: An introduction with applications in data science][vershynin2018high]

Sub-Gaussian with respect to a kernel and a measure

Conditionally sub-Gaussian moment-generating function

Sub-Gaussian moment-generating function

theorem ProbabilityTheory.HasCondSubgaussianMGF.congr_simp E1 #

∀ {Ω : Type u_1} (m m_1 : MeasurableSpace Ω) (e_m : m = m_1) {mΩ : MeasurableSpace Ω} (hm : m ≤ mΩ)
  [inst : StandardBorelSpace Ω] (X X_1 : Ω → ℝ),
  X = X_1 →
    ∀ (c c_1 : NNReal),
      c = c_1 →
        ∀ (μ μ_1 : MeasureTheory.Measure Ω) (e_μ : μ = μ_1) [inst_1 : MeasureTheory.IsFiniteMeasure μ],
          ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ = ProbabilityTheory.HasCondSubgaussianMGF m_1 ⋯ X_1 c_1 μ_1

structure ProbabilityTheory.Kernel.HasSubgaussianMGF E3 #

{Ω : Type u_1} →
  {Ω' : Type u_2} →
    {mΩ : MeasurableSpace Ω} →
      {mΩ' : MeasurableSpace Ω'} →
        (Ω → ℝ) →
          NNReal →
            ProbabilityTheory.Kernel Ω' Ω →
              autoParam (MeasureTheory.Measure Ω') ProbabilityTheory.Kernel.HasSubgaussianMGF._auto_1 → Prop

A random variable X has a sub-Gaussian moment-generating function with parameter c with respect to a kernel κ and a measure ν if for ν-almost all ω', for all t : ℝ, the moment-generating function of X with respect to κ ω' is bounded by exp (c * t ^ 2 / 2). This implies in particular that X has expectation 0.

ctor ProbabilityTheory.Kernel.HasSubgaussianMGF.mk E0 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {X : Ω → ℝ} {c : NNReal}
  {κ : ProbabilityTheory.Kernel Ω' Ω}
  {ν : autoParam (MeasureTheory.Measure Ω') ProbabilityTheory.Kernel.HasSubgaussianMGF._auto_1},
  (∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) (ν.bind ⇑κ)) →
    (∀ᵐ (ω' : Ω') ∂ν, ∀ (t : ℝ), ProbabilityTheory.mgf X (κ ω') t ≤ Real.exp (↑c * t ^ 2 / 2)) →
      ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.integrable_exp_mul E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {X : Ω → ℝ} {c : NNReal}
  {κ : ProbabilityTheory.Kernel Ω' Ω}
  {ν : autoParam (MeasureTheory.Measure Ω') ProbabilityTheory.Kernel.HasSubgaussianMGF._auto_1},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) (ν.bind ⇑κ)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.mgf_le E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {X : Ω → ℝ} {c : NNReal}
  {κ : ProbabilityTheory.Kernel Ω' Ω}
  {ν : autoParam (MeasureTheory.Measure Ω') ProbabilityTheory.Kernel.HasSubgaussianMGF._auto_1},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ᵐ (ω' : Ω') ∂ν, ∀ (t : ℝ), ProbabilityTheory.mgf X (κ ω') t ≤ Real.exp (↑c * t ^ 2 / 2)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.aestronglyMeasurable E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν → MeasureTheory.AEStronglyMeasurable X (ν.bind ⇑κ)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_integrable_exp_mul E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ (t : ℝ), ∀ᵐ (ω' : Ω') ∂ν, MeasureTheory.Integrable (fun y ↦ Real.exp (t * X y)) (κ ω')

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_aestronglyMeasurable E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν → ∀ᵐ (ω' : Ω') ∂ν, MeasureTheory.AEStronglyMeasurable X (κ ω')

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_forall_integrable_exp_mul E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ᵐ (ω' : Ω') ∂ν, ∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) (κ ω')

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_forall_memLp_exp_mul E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ (p : NNReal), ∀ᵐ (ω' : Ω') ∂ν, ∀ (t : ℝ), MeasureTheory.MemLp (fun ω ↦ Real.exp (t * X ω)) (↑p) (κ ω')

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.memLp_exp_mul E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ (t : ℝ) (p : NNReal), MeasureTheory.MemLp (fun ω ↦ Real.exp (t * X ω)) (↑p) (ν.bind ⇑κ)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.cgf_le E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ᵐ (ω' : Ω') ∂ν, ∀ (t : ℝ), ProbabilityTheory.cgf X (κ ω') t ≤ ↑c * t ^ 2 / 2

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.isFiniteMeasure E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν → ∀ᵐ (ω' : Ω') ∂ν, MeasureTheory.IsFiniteMeasure (κ ω')

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_univ_le_one E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν → ∀ᵐ (ω' : Ω') ∂ν, (κ ω') Set.univ ≤ 1

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.of_rat E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  (∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) (ν.bind ⇑κ)) →
    (∀ (q : ℚ), ∀ᵐ (ω' : Ω') ∂ν, ProbabilityTheory.mgf X (κ ω') ↑q ≤ Real.exp (↑c * ↑q ^ 2 / 2)) →
      ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.fun_zero E0 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} [MeasureTheory.IsFiniteMeasure ν] [ProbabilityTheory.IsZeroOrMarkovKernel κ],
  ProbabilityTheory.Kernel.HasSubgaussianMGF (fun x ↦ 0) 0 κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.zero E0 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} [MeasureTheory.IsFiniteMeasure ν] [ProbabilityTheory.IsZeroOrMarkovKernel κ],
  ProbabilityTheory.Kernel.HasSubgaussianMGF 0 0 κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.zero_kernel E0 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {X : Ω → ℝ} {c : NNReal}, ProbabilityTheory.Kernel.HasSubgaussianMGF X c 0 ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.zero_measure E0 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {κ : ProbabilityTheory.Kernel Ω' Ω}
  {X : Ω → ℝ} {c : NNReal}, ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ 0

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.neg E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν → ProbabilityTheory.Kernel.HasSubgaussianMGF (-X) c κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.congr E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal} {Y : Ω → ℝ},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    X =ᵐ[ν.bind ⇑κ] Y → ProbabilityTheory.Kernel.HasSubgaussianMGF Y c κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF_congr E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal} {Y : Ω → ℝ},
  X =ᵐ[ν.bind ⇑κ] Y →
    (ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν ↔ ProbabilityTheory.Kernel.HasSubgaussianMGF Y c κ ν)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.of_map E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {κ : ProbabilityTheory.Kernel Ω' Ω''} {Y : Ω'' → Ω}
  {X : Ω → ℝ},
  Measurable Y →
    ProbabilityTheory.Kernel.HasSubgaussianMGF X c (κ.map Y) ν →
      ProbabilityTheory.Kernel.HasSubgaussianMGF (X ∘ Y) c κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.id_map_iff E0 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  Measurable X →
    (ProbabilityTheory.Kernel.HasSubgaussianMGF id c (κ.map X) ν ↔ ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.const_mul E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ (r : ℝ), ProbabilityTheory.Kernel.HasSubgaussianMGF (fun ω ↦ r * X ω) (NNReal.mk (r ^ 2) ⋯ * c) κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_ge_le_exp_add E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ (ε : ℝ), ∀ᵐ (ω' : Ω') ∂ν, ∀ (t : ℝ), 0 ≤ t → (κ ω').real {ω | ε ≤ X ω} ≤ Real.exp (-t * ε + ↑c * t ^ 2 / 2)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_ge_le E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ∀ {ε : ℝ}, 0 ≤ ε → ∀ᵐ (ω' : Ω') ∂ν, (κ ω').real {ω | ε ≤ X ω} ≤ Real.exp (-ε ^ 2 / (2 * ↑c))

Chernoff bound on the right tail of a sub-Gaussian random variable.

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_pos_eq_zero_of_hasSubGaussianMGF_zero E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X 0 κ ν → ∀ᵐ (ω' : Ω') ∂ν, (κ ω') {ω | 0 < X ω} = 0

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_eq_zero_of_hasSubgaussianMGF_zero E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X 0 κ ν → ∀ᵐ (ω' : Ω') ∂ν, X =ᵐ[κ ω'] 0

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_eq_zero_of_hasSubgaussianMGF_zero_of_measurable E2 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ},
  Measurable X → ProbabilityTheory.Kernel.HasSubgaussianMGF X 0 κ ν → X =ᵐ[ν.bind ⇑κ] 0

Auxiliary lemma for ae_eq_zero_of_hasSubgaussianMGF_zero'.

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_eq_zero_of_hasSubgaussianMGF_zero' E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X 0 κ ν → X =ᵐ[ν.bind ⇑κ] 0

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.add E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X Y : Ω → ℝ} {cX cY : NNReal},
  ProbabilityTheory.Kernel.HasSubgaussianMGF X cX κ ν →
    ProbabilityTheory.Kernel.HasSubgaussianMGF Y cY κ ν →
      ProbabilityTheory.Kernel.HasSubgaussianMGF (fun ω ↦ X ω + Y ω) ((NNReal.sqrt cX + NNReal.sqrt cY) ^ 2) κ ν

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.prodMkLeft_compProd E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {Y : Ω'' → ℝ} {cY : NNReal}
  {η : ProbabilityTheory.Kernel Ω Ω''},
  ProbabilityTheory.Kernel.HasSubgaussianMGF Y cY η (ν.bind ⇑κ) →
    ProbabilityTheory.Kernel.HasSubgaussianMGF Y cY (ProbabilityTheory.Kernel.prodMkLeft Ω' η) (ν.compProd κ)

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.integrable_exp_add_compProd E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''}
  {Y : Ω'' → ℝ} {cY : NNReal} [MeasureTheory.SFinite ν] {η : ProbabilityTheory.Kernel (Ω' × Ω) Ω''}
  [ProbabilityTheory.IsZeroOrMarkovKernel η],
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ProbabilityTheory.Kernel.HasSubgaussianMGF Y cY η (ν.compProd κ) →
      ∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * (X ω.1 + Y ω.2))) (ν.bind ⇑(κ.compProd η))

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.add_compProd E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''}
  {Y : Ω'' → ℝ} {cY : NNReal} [MeasureTheory.SFinite ν] {η : ProbabilityTheory.Kernel (Ω' × Ω) Ω''}
  [ProbabilityTheory.IsZeroOrMarkovKernel η],
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ProbabilityTheory.Kernel.HasSubgaussianMGF Y cY η (ν.compProd κ) →
      ProbabilityTheory.Kernel.HasSubgaussianMGF (fun p ↦ X p.1 + Y p.2) (c + cY) (κ.compProd η) ν

For ν : Measure Ω', κ : Kernel Ω' Ω and η : (Ω' × Ω) Ω'', if a random variable X : Ω → ℝ has a sub-Gaussian mgf with respect to κ and ν and another random variable Y : Ω'' → ℝ has a sub-Gaussian mgf with respect to η and ν ⊗ₘ κ : Measure (Ω' × Ω), then X + Y (random variable on the measurable space Ω × Ω'') has a sub-Gaussian mgf with respect to κ ⊗ₖ η : Kernel Ω' (Ω × Ω'') and ν.

theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.add_comp E1 #

∀ {Ω : Type u_1} {Ω' : Type u_2} {mΩ : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'}
  {κ : ProbabilityTheory.Kernel Ω' Ω} {X : Ω → ℝ} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''}
  {Y : Ω'' → ℝ} {cY : NNReal} [MeasureTheory.SFinite ν] {η : ProbabilityTheory.Kernel Ω Ω''}
  [ProbabilityTheory.IsZeroOrMarkovKernel η],
  ProbabilityTheory.Kernel.HasSubgaussianMGF X c κ ν →
    ProbabilityTheory.Kernel.HasSubgaussianMGF Y cY η (ν.bind ⇑κ) →
      ProbabilityTheory.Kernel.HasSubgaussianMGF (fun p ↦ X p.1 + Y p.2) (c + cY)
        (κ.compProd (ProbabilityTheory.Kernel.prodMkLeft Ω' η)) ν

For ν : Measure Ω', κ : Kernel Ω' Ω and η : Ω Ω'', if a random variable X : Ω → ℝ has a sub-Gaussian mgf with respect to κ and ν and another random variable Y : Ω'' → ℝ has a sub-Gaussian mgf with respect to η and κ ∘ₘ ν : Measure Ω, then X + Y (random variable on the measurable space Ω × Ω'') has a sub-Gaussian mgf with respect to κ ⊗ₖ prodMkLeft Ω' η : Kernel Ω' (Ω × Ω'') and ν.

def ProbabilityTheory.HasCondSubgaussianMGF E3 #

{Ω : Type u_1} →
  (m : MeasurableSpace Ω) →
    {mΩ : MeasurableSpace Ω} →
      m ≤ mΩ →
        [StandardBorelSpace Ω] →
          (Ω → ℝ) →
            NNReal →
              (μ : autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasCondSubgaussianMGF._auto_1) →
                [MeasureTheory.IsFiniteMeasure μ] → Prop

A random variable X has a conditionally sub-Gaussian moment-generating function with parameter c with respect to a sigma-algebra m and a measure μ if for all t : ℝ, exp (t * X) is μ-integrable and the moment-generating function of X conditioned on m is almost surely bounded by exp (c * t ^ 2 / 2) for all t : ℝ. This implies in particular that X has expectation 0.

The actual definition uses Kernel.HasSubgaussianMGF: HasCondSubgaussianMGF is defined as sub-Gaussian with respect to the conditional expectation kernel for m and the restriction of μ to the sigma-algebra m.

theorem ProbabilityTheory.HasCondSubgaussianMGF.mgf_le E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ →
    ∀ᵐ (ω' : Ω) ∂μ.trim hm,
      ∀ (t : ℝ), ProbabilityTheory.mgf X ((ProbabilityTheory.condExpKernel μ m) ω') t ≤ Real.exp (↑c * t ^ 2 / 2)

theorem ProbabilityTheory.HasCondSubgaussianMGF.cgf_le E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ →
    ∀ᵐ (ω' : Ω) ∂μ.trim hm,
      ∀ (t : ℝ), ProbabilityTheory.cgf X ((ProbabilityTheory.condExpKernel μ m) ω') t ≤ ↑c * t ^ 2 / 2

theorem ProbabilityTheory.HasCondSubgaussianMGF.ae_trim_condExp_le E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ →
    ∀ (t : ℝ), ∀ᵐ (ω' : Ω) ∂μ.trim hm, μ[fun ω ↦ Real.exp (t * X ω) | m] ω' ≤ Real.exp (↑c * t ^ 2 / 2)

theorem ProbabilityTheory.HasCondSubgaussianMGF.ae_condExp_le E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ →
    ∀ (t : ℝ), ∀ᵐ (ω' : Ω) ∂μ, μ[fun ω ↦ Real.exp (t * X ω) | m] ω' ≤ Real.exp (↑c * t ^ 2 / 2)

theorem ProbabilityTheory.HasCondSubgaussianMGF.fun_zero E0 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ], ProbabilityTheory.HasCondSubgaussianMGF m hm (fun x ↦ 0) 0 μ

theorem ProbabilityTheory.HasCondSubgaussianMGF.zero E0 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ], ProbabilityTheory.HasCondSubgaussianMGF m hm 0 0 μ

theorem ProbabilityTheory.HasCondSubgaussianMGF.memLp_exp_mul E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ →
    ∀ (t : ℝ) (p : NNReal), MeasureTheory.MemLp (fun ω ↦ Real.exp (t * X ω)) (↑p) μ

theorem ProbabilityTheory.HasCondSubgaussianMGF.integrable_exp_mul E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {hm : m ≤ mΩ} [inst : StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω}
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasCondSubgaussianMGF m hm X c μ →
    ∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) μ

structure ProbabilityTheory.HasSubgaussianMGF E3 #

{Ω : Type u_1} →
  {mΩ : MeasurableSpace Ω} →
    (Ω → ℝ) → NNReal → autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasSubgaussianMGF._auto_1 → Prop

A random variable X has a sub-Gaussian moment-generating function with parameter c with respect to a measure μ if for all t : ℝ, exp (t * X) is μ-integrable and the moment-generating function of X is bounded by exp (c * t ^ 2 / 2) for all t : ℝ. This implies in particular that X has expectation 0.

This is equivalent to Kernel.HasSubgaussianMGF X c (Kernel.const Unit μ) (Measure.dirac ()), as proved in HasSubgaussianMGF_iff_kernel. Properties about sub-Gaussian moment-generating functions should be proved first for Kernel.HasSubgaussianMGF when possible.

ctor ProbabilityTheory.HasSubgaussianMGF.mk E0 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {X : Ω → ℝ} {c : NNReal}
  {μ : autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasSubgaussianMGF._auto_1},
  (∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) μ) →
    (∀ (t : ℝ), ProbabilityTheory.mgf X μ t ≤ Real.exp (↑c * t ^ 2 / 2)) → ProbabilityTheory.HasSubgaussianMGF X c μ

theorem ProbabilityTheory.HasSubgaussianMGF.integrable_exp_mul E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {X : Ω → ℝ} {c : NNReal}
  {μ : autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasSubgaussianMGF._auto_1},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ∀ (t : ℝ), MeasureTheory.Integrable (fun ω ↦ Real.exp (t * X ω)) μ

theorem ProbabilityTheory.HasSubgaussianMGF.mgf_le E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {X : Ω → ℝ} {c : NNReal}
  {μ : autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasSubgaussianMGF._auto_1},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ∀ (t : ℝ), ProbabilityTheory.mgf X μ t ≤ Real.exp (↑c * t ^ 2 / 2)

theorem ProbabilityTheory.HasSubgaussianMGF_iff_kernel E3 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ ↔
    ProbabilityTheory.Kernel.HasSubgaussianMGF X c (ProbabilityTheory.Kernel.const Unit μ)
      (MeasureTheory.Measure.dirac ())

theorem ProbabilityTheory.HasSubgaussianMGF.aestronglyMeasurable E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → MeasureTheory.AEStronglyMeasurable X μ

theorem ProbabilityTheory.HasSubgaussianMGF.aemeasurable E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → AEMeasurable X μ

theorem ProbabilityTheory.HasSubgaussianMGF.congr E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ∀ {Y : Ω → ℝ}, X =ᵐ[μ] Y → ProbabilityTheory.HasSubgaussianMGF Y c μ

theorem ProbabilityTheory.HasSubgaussianMGF.memLp_exp_mul E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ →
    ∀ (t : ℝ) (p : NNReal), MeasureTheory.MemLp (fun ω ↦ Real.exp (t * X ω)) (↑p) μ

theorem ProbabilityTheory.HasSubgaussianMGF.cgf_le E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ∀ (t : ℝ), ProbabilityTheory.cgf X μ t ≤ ↑c * t ^ 2 / 2

theorem ProbabilityTheory.HasSubgaussianMGF.fun_zero E0 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsZeroOrProbabilityMeasure μ],
  ProbabilityTheory.HasSubgaussianMGF (fun x ↦ 0) 0 μ

theorem ProbabilityTheory.HasSubgaussianMGF.zero E0 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsZeroOrProbabilityMeasure μ],
  ProbabilityTheory.HasSubgaussianMGF 0 0 μ

theorem ProbabilityTheory.HasSubgaussianMGF.neg E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ProbabilityTheory.HasSubgaussianMGF (-X) c μ

theorem ProbabilityTheory.HasSubgaussianMGF.of_map E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {c : NNReal} {Ω' : Type u_2} {mΩ' : MeasurableSpace Ω'}
  {μ : MeasureTheory.Measure Ω'} {Y : Ω' → Ω} {X : Ω → ℝ},
  AEMeasurable Y μ →
    ProbabilityTheory.HasSubgaussianMGF X c (MeasureTheory.Measure.map Y μ) →
      ProbabilityTheory.HasSubgaussianMGF (X ∘ Y) c μ

theorem ProbabilityTheory.HasSubgaussianMGF.id_map_iff E0 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  AEMeasurable X μ →
    (ProbabilityTheory.HasSubgaussianMGF id c (MeasureTheory.Measure.map X μ) ↔
      ProbabilityTheory.HasSubgaussianMGF X c μ)

theorem ProbabilityTheory.HasSubgaussianMGF.congr_identDistrib E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal} {Ω' : Type u_2}
  {mΩ' : MeasurableSpace Ω'} {μ' : MeasureTheory.Measure Ω'} {Y : Ω' → ℝ},
  ProbabilityTheory.HasSubgaussianMGF X c μ →
    ProbabilityTheory.IdentDistrib X Y μ μ' → ProbabilityTheory.HasSubgaussianMGF Y c μ'

theorem ProbabilityTheory.HasSubgaussianMGF.trim E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal} (hm : m ≤ mΩ),
  Measurable X → ProbabilityTheory.HasSubgaussianMGF X c μ → ProbabilityTheory.HasSubgaussianMGF X c (μ.trim hm)

theorem ProbabilityTheory.HasSubgaussianMGF.const_mul E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ →
    ∀ (r : ℝ), ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ r * X ω) (⟨r ^ 2, ⋯⟩ * c) μ

theorem ProbabilityTheory.HasSubgaussianMGF.integrableExpSet_eq_univ E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ProbabilityTheory.integrableExpSet X μ = Set.univ

theorem ProbabilityTheory.HasSubgaussianMGF.memLp E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ∀ (p : NNReal), MeasureTheory.MemLp X (↑p) μ

theorem ProbabilityTheory.HasSubgaussianMGF.integrable E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → MeasureTheory.Integrable X μ

theorem ProbabilityTheory.HasSubgaussianMGF.measure_ge_le E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} {c : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X c μ → ∀ {ε : ℝ}, 0 ≤ ε → μ.real {ω | ε ≤ X ω} ≤ Real.exp (-ε ^ 2 / (2 * ↑c))

Chernoff bound on the right tail of a sub-Gaussian random variable.

theorem ProbabilityTheory.HasSubgaussianMGF.ae_eq_zero_of_hasSubgaussianMGF_zero E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ},
  ProbabilityTheory.HasSubgaussianMGF X 0 μ → X =ᵐ[μ] 0

theorem ProbabilityTheory.HasSubgaussianMGF.add E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X Y : Ω → ℝ} {cX cY : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X cX μ →
    ProbabilityTheory.HasSubgaussianMGF Y cY μ →
      ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ X ω + Y ω) ((NNReal.sqrt cX + NNReal.sqrt cY) ^ 2) μ

theorem ProbabilityTheory.HasSubgaussianMGF.add_of_indepFun E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X Y : Ω → ℝ} {cX cY : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X cX μ →
    ProbabilityTheory.HasSubgaussianMGF Y cY μ →
      ProbabilityTheory.IndepFun X Y μ → ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ X ω + Y ω) (cX + cY) μ

theorem ProbabilityTheory.HasSubgaussianMGF.sub_of_indepFun E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X Y : Ω → ℝ} {cX cY : NNReal},
  ProbabilityTheory.HasSubgaussianMGF X cX μ →
    ProbabilityTheory.HasSubgaussianMGF Y cY μ →
      ProbabilityTheory.IndepFun X Y μ → ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ X ω - Y ω) (cX + cY) μ

theorem ProbabilityTheory.HasSubgaussianMGF.sum_of_iIndepFun E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {ι : Type u_2} {X : ι → Ω → ℝ},
  ProbabilityTheory.iIndepFun X μ →
    ∀ {c : ι → NNReal} {s : Finset ι},
      (∀ i ∈ s, ProbabilityTheory.HasSubgaussianMGF (X i) (c i) μ) →
        ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ ∑ i ∈ s, X i ω) (∑ i ∈ s, c i) μ

theorem ProbabilityTheory.HasSubgaussianMGF.measure_sum_ge_le_of_iIndepFun E3 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {ι : Type u_2} {X : ι → Ω → ℝ},
  ProbabilityTheory.iIndepFun X μ →
    ∀ {c : ι → NNReal} {s : Finset ι},
      (∀ i ∈ s, ProbabilityTheory.HasSubgaussianMGF (X i) (c i) μ) →
        ∀ {ε : ℝ}, 0 ≤ ε → μ.real {ω | ε ≤ ∑ i ∈ s, X i ω} ≤ Real.exp (-ε ^ 2 / (2 * ↑(∑ i ∈ s, c i)))

Hoeffding inequality for sub-Gaussian random variables.

theorem ProbabilityTheory.HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun E2 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : ℕ → Ω → ℝ},
  ProbabilityTheory.iIndepFun X μ →
    ∀ {c : NNReal} {n : ℕ},
      (∀ i < n, ProbabilityTheory.HasSubgaussianMGF (X i) c μ) →
        ∀ {ε : ℝ}, 0 ≤ ε → μ.real {ω | ε ≤ ∑ i ∈ Finset.range n, X i ω} ≤ Real.exp (-ε ^ 2 / (2 * ↑n * ↑c))

Hoeffding inequality for sub-Gaussian random variables.

theorem ProbabilityTheory.HasSubgaussianMGF.measureReal_le_le_exp E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X Y : Ω → ℝ} {cX cY : NNReal},
  ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ X ω - ∫ (x : Ω), X x ∂μ) cX μ →
    ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ Y ω - ∫ (x : Ω), Y x ∂μ) cY μ →
      ProbabilityTheory.IndepFun X Y μ →
        ∫ (x : Ω), Y x ∂μ ≤ ∫ (x : Ω), X x ∂μ →
          μ.real {ω | X ω ≤ Y ω} ≤ Real.exp (-(∫ (x : Ω), Y x ∂μ - ∫ (x : Ω), X x ∂μ) ^ 2 / (2 * (↑cX + ↑cY)))

For X, Y two independent sub-Gaussian random variables such that μ[X] ≥ μ[Y], the probability that X ≤ Y is bounded by an exponential decay term.

theorem ProbabilityTheory.mgf_le_of_mem_Icc_of_integral_eq_zero E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ}
  [MeasureTheory.IsProbabilityMeasure μ] {a b t : ℝ},
  AEMeasurable X μ →
    (∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b) →
      ∫ (x : Ω), X x ∂μ = 0 → 0 < t → ProbabilityTheory.mgf X μ t ≤ Real.exp ((↑‖b - a‖₊ / 2) ^ 2 * t ^ 2 / 2)

theorem ProbabilityTheory.hasSubgaussianMGF_of_mem_Icc_of_integral_eq_zero E3 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ}
  [MeasureTheory.IsProbabilityMeasure μ] {a b : ℝ},
  AEMeasurable X μ →
    (∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b) →
      ∫ (x : Ω), X x ∂μ = 0 → ProbabilityTheory.HasSubgaussianMGF X ((‖b - a‖₊ / 2) ^ 2) μ

Hoeffding's lemma: with respect to a probability measure μ, if X is a random variable that has expectation zero and is almost surely in Set.Icc a b for some a ≤ b, then X has a sub-Gaussian moment-generating function with parameter ((b - a) / 2) ^ 2.

theorem ProbabilityTheory.hasSubgaussianMGF_of_mem_Icc E2 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ}
  [MeasureTheory.IsProbabilityMeasure μ] {a b : ℝ},
  AEMeasurable X μ →
    (∀ᵐ (ω : Ω) ∂μ, X ω ∈ Set.Icc a b) →
      ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ X ω - ∫ (x : Ω), X x ∂μ) ((‖b - a‖₊ / 2) ^ 2) μ

A corollary of Hoeffding's lemma for bounded random variables.

theorem ProbabilityTheory.HasSubgaussianMGF.add_of_hasCondSubgaussianMGF E1 #

∀ {Ω : Type u_1} {m mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω → ℝ} [inst : StandardBorelSpace Ω]
  [inst_1 : MeasureTheory.IsFiniteMeasure μ] {Y : Ω → ℝ} {cX cY : NNReal} (hm : m ≤ mΩ),
  ProbabilityTheory.HasSubgaussianMGF X cX (μ.trim hm) →
    ProbabilityTheory.HasCondSubgaussianMGF m hm Y cY μ → ProbabilityTheory.HasSubgaussianMGF (X + Y) (cX + cY) μ

If X is sub-Gaussian with parameter cX with respect to the restriction of μ to a sub-sigma-algebra m and Y is conditionally sub-Gaussian with parameter cY with respect to m and μ then X + Y is sub-Gaussian with parameter cX + cY with respect to μ.

HasSubgaussianMGF X cX (μ.trim hm) can be obtained from HasSubgaussianMGF X cX μ if X is m-measurable. See HasSubgaussianMGF.trim.

theorem ProbabilityTheory.HasSubgaussianMGF.sum_of_hasCondSubgaussianMGF E1 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [inst : StandardBorelSpace Ω] {Y : ℕ → Ω → ℝ}
  {cY : ℕ → NNReal} {ℱ : MeasureTheory.Filtration ℕ mΩ} [inst_1 : MeasureTheory.IsZeroOrProbabilityMeasure μ],
  MeasureTheory.StronglyAdapted ℱ Y →
    ProbabilityTheory.HasSubgaussianMGF (Y 0) (cY 0) μ →
      ∀ (n : ℕ),
        (∀ i < n - 1, ProbabilityTheory.HasCondSubgaussianMGF (↑ℱ i) ⋯ (Y (i + 1)) (cY (i + 1)) μ) →
          ProbabilityTheory.HasSubgaussianMGF (fun ω ↦ ∑ i ∈ Finset.range n, Y i ω) (∑ i ∈ Finset.range n, cY i) μ

Let Y be a random process strongly adapted to a filtration ℱ, such that for all i : ℕ, Y i is conditionally sub-Gaussian with parameter cY i with respect to ℱ (i - 1). In particular, n ↦ ∑ i ∈ range n, Y i is a martingale. Then the sum ∑ i ∈ range n, Y i is sub-Gaussian with parameter ∑ i ∈ range n, cY i.

theorem ProbabilityTheory.measure_sum_ge_le_of_hasCondSubgaussianMGF E2 #

∀ {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [inst : StandardBorelSpace Ω] {Y : ℕ → Ω → ℝ}
  {cY : ℕ → NNReal} {ℱ : MeasureTheory.Filtration ℕ mΩ} [inst_1 : MeasureTheory.IsZeroOrProbabilityMeasure μ],
  MeasureTheory.StronglyAdapted ℱ Y →
    ProbabilityTheory.HasSubgaussianMGF (Y 0) (cY 0) μ →
      ∀ (n : ℕ),
        (∀ i < n - 1, ProbabilityTheory.HasCondSubgaussianMGF (↑ℱ i) ⋯ (Y (i + 1)) (cY (i + 1)) μ) →
          ∀ {ε : ℝ},
            0 ≤ ε →
              μ.real {ω | ε ≤ ∑ i ∈ Finset.range n, Y i ω} ≤ Real.exp (-ε ^ 2 / (2 * ↑(∑ i ∈ Finset.range n, cY i)))

Azuma-Hoeffding inequality for sub-Gaussian random variables.