MathFin
Map / Probability · Gaussian analysis / MathFin.Probability.Gaussian.NormalQuantile

The standard normal quantile function `Φ⁻¹`

MathFin.Probability.Gaussian.NormalQuantileMSC 60E05MSC 62G30 source

Φ⁻¹ is the quantile function of the standard normal law (PhiInv). Mathlib has no inverse of the normal CDF, so the library's Gaussian risk closed forms (Risk/Gaussian.lean) were written in a quantile parameter z with Φ(z) = α. Here the parameter becomes a function of the level.

Because Φ is continuous and strictly increasing, the generalized inverse of Probability/Laws/Quantile.lean is a two-sided inverse: Φ (Φ⁻¹ p) = p on (0, 1) and Φ⁻¹ (Φ x) = x for every x. The quantile of a general Gaussian law then follows from equivariance under the affine map z ↦ m + σ z (quantile_gaussianReal).

Main definitions

  • PhiInv: the standard normal quantile function Φ⁻¹, the generalized inverse of Φ.

Main results

  • continuous_Phi, strictMono_Phi, Phi_mem_Ioo: Φ is continuous, strictly increasing and takes values in (0, 1). Its automation: continuous_Phi and measurable_Phi are fun_prop lemmas, Phi_lt_Phi / Phi_le_Phi are gcongr lemmas, and positivity proves 0 < Φ x (Phi_pos, evalPhi).
  • Phi_PhiInv, PhiInv_Phi: the two inverse identities.
  • PhiInv_one_sub: symmetry, Φ⁻¹(1 − p) = −Φ⁻¹(p).
  • PhiInv_nonneg_iff, PhiInv_pos_iff: Φ⁻¹(p) has the sign of p − 1/2.
  • quantile_gaussianReal: the p-quantile of N(m, σ²) is m + σ Φ⁻¹(p).

References

  • A. J. McNeil, R. Frey and P. Embrechts, Quantitative Risk Management: Concepts, Techniques and Tools [McNeilFreyEmbrechts], Example 2.11

Tags

inverse normal CDF, probit function, Gaussian quantile, normal percentile, value-at-risk quantile, MSC 60E05, MSC 62G30

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

qrm-gaussian-quantile · quantitative_risk_management.json · full statement
Quantile of a Gaussian Law

For p ∈ (0, 1), the p-quantile of N(m, v) is m + √v · Φ⁻¹(p), where Φ⁻¹ is the standard normal quantile function.

Declarations 22

theoremMathFin.cdf_gaussianReal_zero_onesource
↑(cdf (gaussianReal 0 1)) = Phi

The CDF of the standard normal law is Φ.

theoremMathFin.continuous_Phisource
Continuous Phi

Φ is continuous.

theoremMathFin.measurable_Phisource
Measurable Phi

Φ is measurable.

theoremMathFin.strictMono_Phisource
StrictMono Phi

Φ is strictly increasing: its derivative, the normal density, is positive.

theoremMathFin.Phi_mem_Ioosource
∀ (x : ℝ), Phi x ∈ Set.Ioo 0 1

Φ takes values in the open unit interval.

theoremMathFin.Phi_possource
∀ (x : ℝ), 0 < Phi x

Φ is positive. positivity proves it (evalPhi).

theoremMathFin.Phi_lt_Phisource
∀ {x y : ℝ}, x < y → Phi x < Phi y

Φ is strictly increasing, in the form gcongr uses.

theoremMathFin.Phi_le_Phisource
∀ {x y : ℝ}, x ≤ y → Phi x ≤ Phi y

Φ is increasing, in the form gcongr uses.

theoremMathFin.Phi_zerosource
Phi 0 = 1 / 2

Φ(0) = 1/2, by symmetry.

defMathFin.PhiInvsource
ℝ → ℝ

The standard normal quantile function Φ⁻¹.

theoremMathFin.PhiInv_le_iffsource
∀ {p x : ℝ}, p ∈ Set.Ioo 0 1 → (PhiInv p ≤ x ↔ p ≤ Phi x)

The Galois connection for Φ⁻¹: Φ⁻¹(p) ≤ x ↔ p ≤ Φ(x).

theoremMathFin.lt_PhiInv_iffsource
∀ {p x : ℝ}, p ∈ Set.Ioo 0 1 → (x < PhiInv p ↔ Phi x < p)

x < Φ⁻¹(p) ↔ Φ(x) < p.

theoremMathFin.Phi_PhiInvsource
∀ {p : ℝ}, p ∈ Set.Ioo 0 1 → Phi (PhiInv p) = p

Φ ∘ Φ⁻¹ is the identity on (0, 1).

theoremMathFin.PhiInv_Phisource
∀ (x : ℝ), PhiInv (Phi x) = x

Φ⁻¹ ∘ Φ is the identity.

theoremMathFin.strictMonoOn_PhiInvsource
StrictMonoOn PhiInv (Set.Ioo 0 1)

Φ⁻¹ is strictly increasing on (0, 1).

theoremMathFin.PhiInv_one_subsource
∀ {p : ℝ}, p ∈ Set.Ioo 0 1 → PhiInv (1 - p) = -PhiInv p

Symmetry of the normal quantile: Φ⁻¹(1 − p) = −Φ⁻¹(p).

theoremMathFin.PhiInv_halfsource
PhiInv (1 / 2) = 0

The median of the standard normal law is 0.

theoremMathFin.PhiInv_nonneg_iffsource
∀ {p : ℝ}, p ∈ Set.Ioo 0 1 → (0 ≤ PhiInv p ↔ 1 / 2 ≤ p)

Φ⁻¹(p) ≥ 0 exactly when p ≥ 1/2.

theoremMathFin.PhiInv_pos_iffsource
∀ {p : ℝ}, p ∈ Set.Ioo 0 1 → (0 < PhiInv p ↔ 1 / 2 < p)

Φ⁻¹(p) > 0 exactly when p > 1/2.

theoremMathFin.gaussianReal_eq_map_standardsource
∀ (m : ℝ) (v : NNReal), gaussianReal m v = Measure.map (fun z => √↑v * z + m) (gaussianReal 0 1)

Every Gaussian law is an affine image of the standard one: N(m, v) = (z ↦ √v · z + m)_* N(0, 1).

theoremMathFin.quantile_gaussianRealsource
∀ {p : ℝ} (m : ℝ) (v : NNReal), p ∈ Set.Ioo 0 1 → quantile (gaussianReal m v) p = m + √↑v * PhiInv p

The quantile of a Gaussian law: the p-quantile of N(m, v) is m + √v · Φ⁻¹(p).

defMathlib.Meta.Positivity.evalPhisource
Mathlib.Meta.Positivity.PositivityExt

Extension for the positivity tactic: the standard normal CDF Φ is positive.