Documentation

Mathlib.Probability.Distributions.Gaussian

Gaussian distributions over ℝ #

We define a Gaussian measure over the reals.

Main definitions #

Main results #

noncomputable def ProbabilityTheory.gaussianPDFReal (μ : ℝ) (v : NNReal) (x : ℝ) :

Probability density function of the gaussian distribution with mean μ and variance v.

Equations
Instances For
    theorem ProbabilityTheory.gaussianPDFReal_def (μ : ℝ) (v : NNReal) :
    gaussianPDFReal μ v = fun (x : ℝ) => (√(2 * Real.pi * ↑v))⁻¹ * Real.exp (-(x - μ) ^ 2 / (2 * ↑v))
    theorem ProbabilityTheory.gaussianPDFReal_pos (μ : ℝ) (v : NNReal) (x : ℝ) (hv : v ≠ 0) :

    The gaussian pdf is positive when the variance is not zero.

    The gaussian pdf is nonnegative.

    The gaussian pdf is measurable.

    The gaussian distribution pdf integrates to 1 when the variance is not zero.

    The gaussian distribution pdf integrates to 1 when the variance is not zero.

    theorem ProbabilityTheory.gaussianPDFReal_sub {μ : ℝ} {v : NNReal} (x y : ℝ) :
    gaussianPDFReal μ v (x - y) = gaussianPDFReal (μ + y) v x
    theorem ProbabilityTheory.gaussianPDFReal_add {μ : ℝ} {v : NNReal} (x y : ℝ) :
    gaussianPDFReal μ v (x + y) = gaussianPDFReal (μ - y) v x
    theorem ProbabilityTheory.gaussianPDFReal_inv_mul {μ : ℝ} {v : NNReal} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :
    gaussianPDFReal μ v (c⁻¹ * x) = |c| * gaussianPDFReal (c * μ) (⟨c ^ 2, ⋯⟩ * v) x
    theorem ProbabilityTheory.gaussianPDFReal_mul {μ : ℝ} {v : NNReal} {c : ℝ} (hc : c ≠ 0) (x : ℝ) :
    gaussianPDFReal μ v (c * x) = |c⁻¹| * gaussianPDFReal (c⁻¹ * μ) (⟨(c ^ 2)⁻¹, ⋯⟩ * v) x
    noncomputable def ProbabilityTheory.gaussianPDF (μ : ℝ) (v : NNReal) (x : ℝ) :

    The pdf of a Gaussian distribution on ℝ with mean μ and variance v.

    Equations
    Instances For
      theorem ProbabilityTheory.gaussianPDF_pos (μ : ℝ) {v : NNReal} (hv : v ≠ 0) (x : ℝ) :
      0 < gaussianPDF μ v x
      @[simp]
      theorem ProbabilityTheory.lintegral_gaussianPDF_eq_one (μ : ℝ) {v : NNReal} (h : v ≠ 0) :
      ∫⁻ (x : ℝ), gaussianPDF μ v x = 1

      A Gaussian distribution on ℝ with mean μ and variance v.

      Equations
      Instances For
        theorem ProbabilityTheory.gaussianReal_apply (μ : ℝ) {v : NNReal} (hv : v ≠ 0) (s : Set ℝ) :
        (gaussianReal μ v) s = ∫⁻ (x : ℝ) in s, gaussianPDF μ v x
        theorem MeasurableEmbedding.gaussianReal_comap_apply {μ : ℝ} {v : NNReal} (hv : v ≠ 0) {f : ℝ → ℝ} (hf : MeasurableEmbedding f) {f' : ℝ → ℝ} (h_deriv : ∀ (x : ℝ), HasDerivAt f (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :
        theorem MeasurableEquiv.gaussianReal_map_symm_apply {μ : ℝ} {v : NNReal} (hv : v ≠ 0) (f : ℝ ≃ᵐ ℝ) {f' : ℝ → ℝ} (h_deriv : ∀ (x : ℝ), HasDerivAt (⇑f) (f' x) x) {s : Set ℝ} (hs : MeasurableSet s) :

        The map of a Gaussian distribution by addition of a constant is a Gaussian.

        The map of a Gaussian distribution by addition of a constant is a Gaussian.

        theorem ProbabilityTheory.gaussianReal_map_const_mul {μ : ℝ} {v : NNReal} (c : ℝ) :
        MeasureTheory.Measure.map (fun (x : ℝ) => c * x) (gaussianReal μ v) = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

        The map of a Gaussian distribution by multiplication by a constant is a Gaussian.

        theorem ProbabilityTheory.gaussianReal_map_mul_const {μ : ℝ} {v : NNReal} (c : ℝ) :
        MeasureTheory.Measure.map (fun (x : ℝ) => x * c) (gaussianReal μ v) = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

        The map of a Gaussian distribution by multiplication by a constant is a Gaussian.

        If X is a real random variable with Gaussian law with mean μ and variance v, then X + y has Gaussian law with mean μ + y and variance v.

        If X is a real random variable with Gaussian law with mean μ and variance v, then y + X has Gaussian law with mean μ + y and variance v.

        theorem ProbabilityTheory.gaussianReal_const_mul {μ : ℝ} {v : NNReal} {Ω : Type} [MeasureTheory.MeasureSpace Ω] {X : Ω → ℝ} (hX : MeasureTheory.Measure.map X MeasureTheory.volume = gaussianReal μ v) (c : ℝ) :
        MeasureTheory.Measure.map (fun (ω : Ω) => c * X ω) MeasureTheory.volume = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

        If X is a real random variable with Gaussian law with mean μ and variance v, then c * X has Gaussian law with mean c * μ and variance c^2 * v.

        theorem ProbabilityTheory.gaussianReal_mul_const {μ : ℝ} {v : NNReal} {Ω : Type} [MeasureTheory.MeasureSpace Ω] {X : Ω → ℝ} (hX : MeasureTheory.Measure.map X MeasureTheory.volume = gaussianReal μ v) (c : ℝ) :
        MeasureTheory.Measure.map (fun (ω : Ω) => X ω * c) MeasureTheory.volume = gaussianReal (c * μ) (⟨c ^ 2, ⋯⟩ * v)

        If X is a real random variable with Gaussian law with mean μ and variance v, then X * c has Gaussian law with mean c * μ and variance c^2 * v.

        theorem ProbabilityTheory.mgf_gaussianReal {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {p : MeasureTheory.Measure Ω} {μ : ℝ} {v : NNReal} {X : Ω → ℝ} (hX : MeasureTheory.Measure.map X p = gaussianReal μ v) (t : ℝ) :
        mgf X p t = Real.exp (μ * t + ↑v * t ^ 2 / 2)
        theorem ProbabilityTheory.cgf_gaussianReal {Ω : Type u_1} {mΩ : MeasurableSpace Ω} {p : MeasureTheory.Measure Ω} {μ : ℝ} {v : NNReal} {X : Ω → ℝ} (hX : MeasureTheory.Measure.map X p = gaussianReal μ v) (t : ℝ) :
        cgf X p t = μ * t + ↑v * t ^ 2 / 2