The standard normal distribution function and the probit #
The standard normal distribution function Φ is the cdf of mathlib's gaussianReal 0 1, and
everything about it here is an instance of a general fact about cdfs from
Linglib/Core/Probability/CDF.lean. A nondegenerate Gaussian has no atoms, charges every nonempty
open set, and is invariant under negation when centred, so Φ is continuous, strictly monotone and
satisfies Φ (-x) = 1 - Φ x. It is therefore an order isomorphism from ℝ onto (0, 1), and the
probit is its inverse, extended by 0 outside (0, 1) as Real.log is extended outside (0, ∞).
Main definitions #
ProbabilityTheory.normalCDF: the standard normal distribution functionΦ.ProbabilityTheory.probit: the standard normal quantile functionΦ⁻¹.
Main results #
ProbabilityTheory.cdf_gaussianReal_eq: standardization,cdf (gaussianReal μ v) x = Φ ((x - μ) / √v).ProbabilityTheory.gaussianReal_real_Ioi: the upper tail of a Gaussian isΦ ((μ - x) / √v).ProbabilityTheory.probit_one_sub:Φ⁻¹ (1 - p) = -Φ⁻¹ p, for every realp.ProbabilityTheory.gaussianPDFReal_div_gaussianPDFReal: the ratio of two Gaussian densities of a common variance is the exponential of an affine function.ProbabilityTheory.map_pi_gaussianReal_sum_mul,variance_pi_gaussianReal_sum_mul,covariance_pi_gaussianReal_sum_mul: a linear combination of independent Gaussians is Gaussian, with the variance and covariances read off the coefficients.
Implementation notes #
Mathlib states the atomlessness of a Gaussian as a lemma with hypothesis v ≠ 0. The instances here
take [NeZero v] instead, so that they fire for the standard normal gaussianReal 0 1.
[UPSTREAM] candidates for Mathlib/Probability/Distributions/Gaussian/Real.lean, and the linear
combination lemmas for
Mathlib/Probability/Distributions/Gaussian/HasGaussianLaw/Independence.lean.
A nondegenerate Gaussian charges every nonempty open set.
The standard normal distribution function #
The standard normal distribution function Φ, the cdf of gaussianReal 0 1.
Equations
- ProbabilityTheory.normalCDF x = ↑(ProbabilityTheory.cdf (ProbabilityTheory.gaussianReal 0 1)) x
Instances For
The reflection formula Φ (-x) = 1 - Φ x.
Standardization #
The cdf of a nondegenerate Gaussian is Φ at the standard score.
The upper tail of a nondegenerate Gaussian X ~ N(μ, v) is P(X > x) = Φ ((μ - x) / √v).
The probit #
The probit, the quantile function Φ⁻¹ of the standard normal, equal to the inverse of
normalCDF on (0, 1) and to 0 elsewhere. The extension by 0 makes probit_one_sub hold for
every real argument.
Equations
- ProbabilityTheory.probit p = if hp : p ∈ Set.Ioo 0 1 then (ProbabilityTheory.cdfOrderIso (ProbabilityTheory.gaussianReal 0 1)).symm ⟨p, hp⟩ else 0
Instances For
The probit is odd about 1 / 2. Outside (0, 1) both sides are the junk value 0.
Densities #
The ratio of two Gaussian densities of a common nonzero variance is the exponential of an affine function, zero midway between the means.
Linear combinations of independent Gaussians #
A linear combination of independent Gaussians is Gaussian.
The variance of a linear combination of independent Gaussians.
The covariance of two linear combinations of independent Gaussians.