Documentation

TauCeti.Probability.Distributions.Gamma.Quantile

The inverse regularized gamma function #

Since the regularized lower incomplete gamma function P(s, ·) is the cumulative distribution function of the Gamma law with shape s and rate 1, its inverse is that law's quantile function. This file defines TauCeti.inverseRegularizedGamma through MeasureTheory.Measure.quantile and specializes the general quantile API to it.

For 0 < s and 0 < u < 1, TauCeti.inverseRegularizedGamma s u is the unique positive x such that P(s, x) = u. It is extended by 0 outside that parameter range.

Main definition #

Main results #

References #

noncomputable def TauCeti.inverseRegularizedGamma (s u : ℝ) :

The inverse P⁻¹(s, u) of the regularized lower incomplete gamma function in its argument.

For positive s this is the quantile of the Gamma law with shape s and rate 1. For nonpositive s it is 0; the quantile itself supplies the value 0 outside 0 < u < 1.

Instances For

    For positive shape, P⁻¹(s, ·) is the quantile function of the Gamma law with shape s and rate 1.

    For positive shape, P⁻¹(s, u) is the infimum of the points at which P(s, ·) reaches u.

    @[simp]

    Outside the valid range of the shape parameter, P⁻¹(s, u) is 0.

    @[simp]

    At levels u ≤ 0, P⁻¹(s, u) is 0.

    @[simp]

    At levels 1 ≤ u, P⁻¹(s, u) is 0.

    P⁻¹(s, u) is 0 whenever s or u lies outside the valid range 0 < s, 0 < u < 1.

    The points at which P(s, ·) reaches a level u ∈ (0, 1) form the closed ray starting at P⁻¹(s, u).

    The Galois characterization of P⁻¹(s, ·): for a level u ∈ (0, 1), P⁻¹(s, u) ≤ x exactly when u ≤ P(s, x).

    theorem TauCeti.inverseRegularizedGamma_pos {s u : ℝ} (hs : 0 < s) (hu : u ∈ Set.Ioo 0 1) :

    P⁻¹(s, u) is positive, for 0 < s and 0 < u < 1.

    P⁻¹(s, u) is nonnegative, for every parameter value.

    @[simp]

    P⁻¹(s, ·) is a right inverse of P(s, ·) on the levels 0 < u < 1.

    theorem TauCeti.inverseRegularizedGamma_eq_iff {s u x : ℝ} (hs : 0 < s) (hu : u ∈ Set.Ioo 0 1) :

    Uniqueness: for 0 < s and 0 < u < 1, the only solution of P(s, x) = u is x = P⁻¹(s, u).

    @[simp]

    P⁻¹(s, ·) is a left inverse of P(s, ·) on the open half-line 0 < x.

    P⁻¹(s, ·) is strictly increasing on the levels 0 < u < 1.

    P⁻¹(s, ·) is continuous on the levels 0 < u < 1.

    P⁻¹(s, u) tends to 0 from above as the level u decreases to 0.

    P⁻¹(s, u) tends to ∞ as the level u increases to 1.

    P⁻¹(s, u) is jointly measurable in the shape parameter and the level, including outside the valid parameter range.

    At shape 1, P⁻¹(1, u) = -log (1 - u): the inverse of the standard exponential cdf.

    The quantile of a Gamma law with positive shape a and rate r is P⁻¹(a, u) / r, where P⁻¹ is the inverse regularized lower incomplete Gamma function. Both sides are 0 outside the levels 0 < u < 1.

    The quantile of a positive-parameter Gamma law tends to the lower support endpoint 0 as the level tends to 0 from above.

    The quantile of a positive-parameter Gamma law tends to infinity as the level tends to 1 from below.