Documentation

Mathlib.Probability.Moments.SubGaussian

Sub-Gaussian random variables #

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

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 #

Main statements #

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 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 #

Sub-Gaussian with respect to a kernel and a measure #

structure ProbabilityTheory.Kernel.HasSubgaussianMGF {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} (X : Ω) (c : NNReal) (κ : Kernel Ω' Ω) (ν : MeasureTheory.Measure Ω' := by volume_tac) :

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.

Instances For
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.aestronglyMeasurable {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) :
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_integrable_exp_mul {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) (t : ) :
    ∀ᵐ (ω' : Ω') ν, MeasureTheory.Integrable (fun (y : Ω) => Real.exp (t * X y)) (κ ω')
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_aestronglyMeasurable {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) :
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.ae_forall_integrable_exp_mul {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) :
    ∀ᵐ (ω' : Ω') ν, ∀ (t : ), MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (t * X ω)) (κ ω')
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.memLp_exp_mul {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) (t : ) (p : NNReal) :
    MeasureTheory.MemLp (fun (ω : Ω) => Real.exp (t * X ω)) (↑p) (ν.bind κ)
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.cgf_le {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) :
    ∀ᵐ (ω' : Ω') ν, ∀ (t : ), cgf X (κ ω') t c * t ^ 2 / 2
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.isFiniteMeasure {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) :
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_univ_le_one {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) :
    ∀ᵐ (ω' : Ω') ν, (κ ω') Set.univ 1
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.of_rat {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h_int : ∀ (t : ), MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (t * X ω)) (ν.bind κ)) (h_mgf : ∀ (q : ), ∀ᵐ (ω' : Ω') ν, mgf X (κ ω') q Real.exp (c * q ^ 2 / 2)) :
    @[simp]
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.fun_zero {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} [MeasureTheory.IsFiniteMeasure ν] [IsZeroOrMarkovKernel κ] :
    HasSubgaussianMGF (fun (x : Ω) => 0) 0 κ ν
    @[simp]
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.zero_kernel {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {X : Ω} {c : NNReal} :
    @[simp]
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.zero_measure {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} :
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.congr {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} {Y : Ω} (h : HasSubgaussianMGF X c κ ν) (h' : X =ᵐ[ν.bind κ] Y) :
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF_congr {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} {Y : Ω} (h : X =ᵐ[ν.bind κ] Y) :
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.of_map {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {κ : Kernel Ω' Ω''} {Y : Ω''Ω} {X : Ω} (hY : Measurable Y) (h : HasSubgaussianMGF X c (κ.map Y) ν) :
    HasSubgaussianMGF (X Y) c κ ν
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_ge_le_exp_add {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) (ε : ) :
    ∀ᵐ (ω' : Ω') ν, ∀ (t : ), 0 t((κ ω') {ω : Ω | ε X ω}).toReal Real.exp (-t * ε + c * t ^ 2 / 2)
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.measure_ge_le {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c κ ν) {ε : } ( : 0 ε) :
    ∀ᵐ (ω' : Ω') ν, ((κ ω') {ω : Ω | ε X ω}).toReal Real.exp (-ε ^ 2 / (2 * c))

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

    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.prodMkLeft_compProd {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {Y : Ω''} {cY : NNReal} {η : Kernel Ω Ω''} (h : HasSubgaussianMGF Y cY η (ν.bind κ)) :
    HasSubgaussianMGF Y cY (prodMkLeft Ω' η) (ν.compProd κ)
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.integrable_exp_add_compProd {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {Y : Ω''} {cY : NNReal} [MeasureTheory.SFinite ν] {η : Kernel (Ω' × Ω) Ω''} [IsZeroOrMarkovKernel η] (hX : HasSubgaussianMGF X c κ ν) (hY : HasSubgaussianMGF Y cY η (ν.compProd κ)) (t : ) :
    MeasureTheory.Integrable (fun (ω : Ω × Ω'') => Real.exp (t * (X ω.1 + Y ω.2))) (ν.bind (κ.compProd η))
    theorem ProbabilityTheory.Kernel.HasSubgaussianMGF.add_compProd {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {Y : Ω''} {cY : NNReal} [MeasureTheory.SFinite ν] {η : Kernel (Ω' × Ω) Ω''} [IsZeroOrMarkovKernel η] (hX : HasSubgaussianMGF X c κ ν) (hY : HasSubgaussianMGF Y cY η (ν.compProd κ)) :
    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 {Ω : Type u_1} {Ω' : Type u_2} { : MeasurableSpace Ω} {mΩ' : MeasurableSpace Ω'} {ν : MeasureTheory.Measure Ω'} {κ : Kernel Ω' Ω} {X : Ω} {c : NNReal} {Ω'' : Type u_3} {mΩ'' : MeasurableSpace Ω''} {Y : Ω''} {cY : NNReal} [MeasureTheory.SFinite ν] {η : Kernel Ω Ω''} [IsZeroOrMarkovKernel η] (hX : HasSubgaussianMGF X c κ ν) (hY : HasSubgaussianMGF Y cY η (ν.bind κ)) :
    HasSubgaussianMGF (fun (p : Ω × Ω'') => X p.1 + Y p.2) (c + cY) (κ.compProd (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 ν.

    Conditionally sub-Gaussian moment generating function #

    def ProbabilityTheory.HasCondSubgaussianMGF {Ω : Type u_1} (m : MeasurableSpace Ω) { : MeasurableSpace Ω} (hm : m ) [StandardBorelSpace Ω] (X : Ω) (c : NNReal) (μ : MeasureTheory.Measure Ω := by volume_tac) [MeasureTheory.IsFiniteMeasure μ] :

    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.

    Equations
    Instances For
      theorem ProbabilityTheory.HasCondSubgaussianMGF.mgf_le {Ω : Type u_1} {m : MeasurableSpace Ω} {hm : m } [StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : Ω} {c : NNReal} (h : HasCondSubgaussianMGF m hm X c μ) :
      ∀ᵐ (ω' : Ω) μ.trim hm, ∀ (t : ), mgf X ((condExpKernel μ m) ω') t Real.exp (c * t ^ 2 / 2)
      theorem ProbabilityTheory.HasCondSubgaussianMGF.cgf_le {Ω : Type u_1} {m : MeasurableSpace Ω} {hm : m } [StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : Ω} {c : NNReal} (h : HasCondSubgaussianMGF m hm X c μ) :
      ∀ᵐ (ω' : Ω) μ.trim hm, ∀ (t : ), cgf X ((condExpKernel μ m) ω') t c * t ^ 2 / 2
      theorem ProbabilityTheory.HasCondSubgaussianMGF.ae_trim_condExp_le {Ω : Type u_1} {m : MeasurableSpace Ω} {hm : m } [StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : Ω} {c : NNReal} (h : 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 {Ω : Type u_1} {m : MeasurableSpace Ω} {hm : m } [StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : Ω} {c : NNReal} (h : HasCondSubgaussianMGF m hm X c μ) (t : ) :
      ∀ᵐ (ω' : Ω) μ, μ[fun (ω : Ω) => Real.exp (t * X ω)|m] ω' Real.exp (c * t ^ 2 / 2)
      @[simp]
      theorem ProbabilityTheory.HasCondSubgaussianMGF.memLp_exp_mul {Ω : Type u_1} {m : MeasurableSpace Ω} {hm : m } [StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : Ω} {c : NNReal} (h : HasCondSubgaussianMGF m hm X c μ) (t : ) (p : NNReal) :
      MeasureTheory.MemLp (fun (ω : Ω) => Real.exp (t * X ω)) (↑p) μ
      theorem ProbabilityTheory.HasCondSubgaussianMGF.integrable_exp_mul {Ω : Type u_1} {m : MeasurableSpace Ω} {hm : m } [StandardBorelSpace Ω] {μ : MeasureTheory.Measure Ω} [MeasureTheory.IsFiniteMeasure μ] {X : Ω} {c : NNReal} (h : HasCondSubgaussianMGF m hm X c μ) (t : ) :
      MeasureTheory.Integrable (fun (ω : Ω) => Real.exp (t * X ω)) μ

      Sub-Gaussian moment generating function #

      structure ProbabilityTheory.HasSubgaussianMGF {Ω : Type u_1} { : MeasurableSpace Ω} (X : Ω) (c : NNReal) (μ : MeasureTheory.Measure Ω := by volume_tac) :

      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.

      Instances For
        theorem ProbabilityTheory.HasSubgaussianMGF.congr {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c μ) {Y : Ω} (h' : X =ᵐ[μ] Y) :
        theorem ProbabilityTheory.HasSubgaussianMGF.memLp_exp_mul {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c μ) (t : ) (p : NNReal) :
        MeasureTheory.MemLp (fun (ω : Ω) => Real.exp (t * X ω)) (↑p) μ
        theorem ProbabilityTheory.HasSubgaussianMGF.cgf_le {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c μ) (t : ) :
        cgf X μ t c * t ^ 2 / 2
        theorem ProbabilityTheory.HasSubgaussianMGF.of_map {Ω : Type u_1} { : MeasurableSpace Ω} {c : NNReal} {Ω' : Type u_2} {mΩ' : MeasurableSpace Ω'} {μ : MeasureTheory.Measure Ω'} {Y : Ω'Ω} {X : Ω} (hY : AEMeasurable Y μ) (h : HasSubgaussianMGF X c (MeasureTheory.Measure.map Y μ)) :
        theorem ProbabilityTheory.HasSubgaussianMGF.trim {Ω : Type u_1} {m : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} {c : NNReal} (hm : m ) (hXm : Measurable X) (hX : HasSubgaussianMGF X c μ) :
        theorem ProbabilityTheory.HasSubgaussianMGF.measure_ge_le {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} {c : NNReal} (h : HasSubgaussianMGF X c μ) {ε : } ( : 0 ε) :
        (μ {ω : Ω | ε X ω}).toReal Real.exp (-ε ^ 2 / (2 * c))

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

        theorem ProbabilityTheory.HasSubgaussianMGF.add_of_indepFun {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X Y : Ω} {cX cY : NNReal} (hX : HasSubgaussianMGF X cX μ) (hY : HasSubgaussianMGF Y cY μ) (hindep : IndepFun X Y μ) :
        HasSubgaussianMGF (fun (ω : Ω) => X ω + Y ω) (cX + cY) μ
        theorem ProbabilityTheory.HasSubgaussianMGF.sum_of_iIndepFun {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {ι : Type u_2} {X : ιΩ} (h_indep : iIndepFun X μ) {c : ιNNReal} {s : Finset ι} (h_subG : is, HasSubgaussianMGF (X i) (c i) μ) :
        HasSubgaussianMGF (fun (ω : Ω) => is, X i ω) (∑ is, c i) μ
        theorem ProbabilityTheory.HasSubgaussianMGF.measure_sum_ge_le_of_iIndepFun {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {ι : Type u_2} {X : ιΩ} (h_indep : iIndepFun X μ) {c : ιNNReal} {s : Finset ι} (h_subG : is, HasSubgaussianMGF (X i) (c i) μ) {ε : } ( : 0 ε) :
        (μ {ω : Ω | ε is, X i ω}).toReal Real.exp (-ε ^ 2 / (2 * (∑ is, c i)))

        Hoeffding inequality for sub-Gaussian random variables.

        theorem ProbabilityTheory.HasSubgaussianMGF.measure_sum_range_ge_le_of_iIndepFun {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} (h_indep : iIndepFun X μ) {c : NNReal} {n : } (h_subG : i < n, HasSubgaussianMGF (X i) c μ) {ε : } ( : 0 ε) :
        (μ {ω : Ω | ε iFinset.range n, X i ω}).toReal Real.exp (-ε ^ 2 / (2 * n * c))

        Hoeffding inequality for sub-Gaussian random variables.

        theorem ProbabilityTheory.HasSubgaussianMGF_add_of_HasCondSubgaussianMGF {Ω : Type u_1} {m : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} {X : Ω} [StandardBorelSpace Ω] [MeasureTheory.IsFiniteMeasure μ] {Y : Ω} {cX cY : NNReal} (hm : m ) (hX : HasSubgaussianMGF X cX (μ.trim hm)) (hY : HasCondSubgaussianMGF m hm Y cY μ) :
        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 {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [StandardBorelSpace Ω] {Y : Ω} {cY : NNReal} { : MeasureTheory.Filtration } [MeasureTheory.IsZeroOrProbabilityMeasure μ] (h_adapted : MeasureTheory.Adapted Y) (h0 : HasSubgaussianMGF (Y 0) (cY 0) μ) (n : ) (h_subG : i < n - 1, HasCondSubgaussianMGF ( i) (Y (i + 1)) (cY (i + 1)) μ) :
        HasSubgaussianMGF (fun (ω : Ω) => iFinset.range n, Y i ω) (∑ iFinset.range n, cY i) μ

        Let Y be a random process 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 {Ω : Type u_1} { : MeasurableSpace Ω} {μ : MeasureTheory.Measure Ω} [StandardBorelSpace Ω] {Y : Ω} {cY : NNReal} { : MeasureTheory.Filtration } [MeasureTheory.IsZeroOrProbabilityMeasure μ] (h_adapted : MeasureTheory.Adapted Y) (h0 : HasSubgaussianMGF (Y 0) (cY 0) μ) (n : ) (h_subG : i < n - 1, HasCondSubgaussianMGF ( i) (Y (i + 1)) (cY (i + 1)) μ) {ε : } ( : 0 ε) :
        (μ {ω : Ω | ε iFinset.range n, Y i ω}).toReal Real.exp (-ε ^ 2 / (2 * (∑ iFinset.range n, cY i)))

        Azuma-Hoeffding inequality for sub-Gaussian random variables.