Documentation

TauCeti.Probability.Distributions.Gaussian.Cdf

The cumulative distribution function of a real Gaussian law #

This file computes ProbabilityTheory.cdf (gaussianReal m v) in closed form. For a nonzero variance the answer is (1 + erf ((x - m) / √(2 * v))) / 2, and at the singular boundary v = 0 the law is a Dirac mass, with the step-function cdf.

These are the Gaussian entries of the closed-form cdf target of TauCetiRoadmap/StandardDistributions/README.md, Layer 2.

The computation goes through the interval integral of gaussianPDFReal, which is an affine change of variables away from the integral defining TauCeti.Real.erf; the improper integral over Set.Iic x is then the limit of those interval integrals, using TauCeti.Real.tendsto_erf_atBot for the contribution at -∞.

Main declarations #

theorem TauCeti.Probability.intervalIntegral_gaussianPDFReal (m : ℝ) {v : NNReal} (a b : ℝ) :
∫ (t : ℝ) in a..b, ProbabilityTheory.gaussianPDFReal m v t = (Real.erf ((b - m) / √(2 * ↑v)) - Real.erf ((a - m) / √(2 * ↑v))) / 2

On an interval, the Gaussian density integrates to the difference of two error-function values. Both sides vanish at zero variance; otherwise the affine change of variables t ↦ (t - m) / √(2 * v) turns the integral into the one defining TauCeti.Real.erf.

theorem TauCeti.Probability.integral_Iic_gaussianPDFReal (m : ℝ) {v : NNReal} (hv : v ≠ 0) (x : ℝ) :
∫ (t : ℝ) in Set.Iic x, ProbabilityTheory.gaussianPDFReal m v t = (1 + Real.erf ((x - m) / √(2 * ↑v))) / 2

Over a left half-line, the Gaussian density integrates to (1 + erf ((x - m) / √(2 * v))) / 2.

theorem TauCeti.Probability.cdf_gaussianReal_eq (m : ℝ) {v : NNReal} (hv : v ≠ 0) (x : ℝ) :

The cumulative distribution function of a Gaussian law with nonzero variance.

The cumulative distribution function of the standard Gaussian law.

A Gaussian cumulative distribution function of nonzero variance is the standard one at the standardized argument: P(X ≤ x) = Φ ((x - m) / √v) for X ∼ N(m, v).

At positive variance, the open interval with extended bounds l < r has positive Gaussian mass.

At positive variance, the Gaussian mass up to an extended bound is strictly increasing in the bound.

At the singular boundary v = 0 the Gaussian law is a Dirac mass, and its cumulative distribution function is the corresponding step function.

The standard Gaussian cumulative distribution function is symmetric about zero: Φ (-x) = 1 - Φ x.

@[simp]

A Gaussian law with nonzero variance has its mean as median: its cumulative distribution function takes the value 1 / 2 at the mean.

The cumulative distribution function of a Gaussian law with nonzero variance is positive.

The cumulative distribution function of a Gaussian law with nonzero variance is less than one.

The cumulative distribution function of a Gaussian law with nonzero variance is strictly increasing.

The cumulative distribution function of a Gaussian law with nonzero variance has the Gaussian density as its derivative.

theorem TauCeti.Probability.measureReal_gaussianReal_pos (m : ℝ) {v : NNReal} (hv : v ≠ 0) {l r : EReal} {s : Set ℝ} (hlr : l < r) (hs₁ : Real.toEReal ⁻¹' Set.Ioo l r ⊆ s) :

At positive variance, every set containing the open interval with extended bounds l < r has positive Gaussian mass.

theorem TauCeti.Probability.measureReal_gaussianReal_eq_cdf_zero_one (m : ℝ) {v : NNReal} (hv : v ≠ 0) {l r : ℝ} {s : Set ℝ} (hlr : l ≤ r) (hs₁ : Set.Ioo l r ⊆ s) (hs₂ : s ⊆ Set.Icc l r) :

At positive variance, the Gaussian mass of a set between the open and the closed interval with finite bounds l ≤ r is a difference of standard Gaussian cdf values.

At positive variance, the Gaussian mass up to an extended bound e, as a function of the mean, has derivative minus the Gaussian density at e.

theorem TauCeti.Probability.hasDerivAt_measureReal_gaussianReal {v : NNReal} (hv : v ≠ 0) {l r : EReal} {s : Set ℝ} (hlr : l ≤ r) (hs₁ : Real.toEReal ⁻¹' Set.Ioo l r ⊆ s) (hs₂ : s ⊆ Real.toEReal ⁻¹' Set.Icc l r) (μ : ℝ) :

At positive variance, the Gaussian mass of a set between the open and the closed interval with extended bounds l ≤ r, as a function of the mean, has derivative the difference of the Gaussian densities at the two bounds.

The upper tail of a Gaussian law with nonzero variance is half the complementary error function.

The upper tail of a Gaussian law with nonzero variance is a value of the standard Gaussian cumulative distribution function: P(X > x) = Φ ((m - x) / √v) for X ∼ N(m, v).

Over a right half-line, a Gaussian density of nonzero variance integrates to a value of the standard Gaussian cumulative distribution function: ∫ t in Ioi x, N(m, v)(t) = Φ ((m - x) / √v).

A lower bound for the upper tail of a Gaussian law: beyond a point s to the right of the mean, the interval (s, s + t] alone carries mass at least its length t times the density at its right end (for t < 0 the left side is nonpositive and the bound is trivial).

The absolute value of a standard Gaussian exceeds s ≥ 0 with probability at least the standard Gaussian density at s + 1.

theorem TauCeti.Probability.measureReal_le_of_hasLaw_gaussianReal {Ω : Type u_1} [MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} {X : Ω → ℝ} (m : ℝ) {v : NNReal} (hv : v ≠ 0) (hX : ProbabilityTheory.HasLaw X (ProbabilityTheory.gaussianReal m v) P) (x : ℝ) :
P.real {ω : Ω | X ω ≤ x} = (1 + Real.erf ((x - m) / √(2 * ↑v))) / 2

A random variable with a Gaussian law of nonzero variance has the error-function cumulative distribution function.