Documentation

TauCeti.Probability.Distributions.InverseGamma.Basic

The inverse-gamma distribution: measure and density #

The inverse-gamma law with shape a and scale r is the law of X⁻¹ for X ∼ gammaMeasure a r, where r is the Gamma rate. This file defines that pushforward for positive parameters and uses the zero measure otherwise. It derives the density

r ^ a / Gamma a * x ^ (-a - 1) * exp (-r / x)

on the positive half-line, proves its support and boundary behavior, identifies its Radon--Nikodym derivative, and proves parameter measurability.

The density is derived from the pushforward definition. On (0, ∞), inversion is an involution with absolute derivative x⁻²; the one-dimensional change of variables TauCeti.MeasureTheory.map_withDensity_abs_deriv_mul transports the Gamma density through this map.

Main declarations #

References #

Definition and boundary behavior #

The inverse-gamma law with shape a and scale r.

For positive parameters it is the pushforward of gammaMeasure a r by inversion, where r is the rate of the Gamma law. It is the zero measure if either parameter is nonpositive.

Instances For

    At positive parameters the inverse-gamma law is the inversion pushforward of the Gamma law.

    This is not a simp lemma: inverseGammaMeasure a r is the simp-normal form, and unfolding it would shadow every simp lemma stated about the law at positive parameters.

    @[simp]

    If the shape or scale is nonpositive, the inverse-gamma law is the zero measure.

    A valid inverse-gamma law is a probability measure.

    @[simp]

    The inverse-gamma law assigns no mass to the nonpositive half-line.

    An inverse-gamma law is concentrated on the positive half-line, including in the zero-measure invalid-parameter cases.

    Density #

    noncomputable def TauCeti.Probability.inverseGammaPDFReal (a r x : ℝ) :

    The real-valued inverse-gamma density. It vanishes unless both parameters and the sample point are positive.

    Instances For
      noncomputable def TauCeti.Probability.inverseGammaPDF (a r x : ℝ) :

      The inverse-gamma density, valued in ℝ≥0∞.

      Instances For

        The ℝ≥0∞-valued inverse-gamma density is the coercion of the real-valued one.

        @[simp]
        theorem TauCeti.Probability.inverseGammaPDFReal_of_pos {a r x : ℝ} (ha : 0 < a) (hr : 0 < r) (hx : 0 < x) :
        inverseGammaPDFReal a r x = r ^ a / Real.Gamma a * x ^ (-a - 1) * Real.exp (-r / x)

        The real density has its usual formula at valid parameters and a positive point.

        @[simp]

        The inverse-gamma density vanishes at a nonpositive point.

        @[simp]

        The inverse-gamma density vanishes when its parameters are invalid.

        @[simp]
        theorem TauCeti.Probability.inverseGammaPDF_of_pos {a r x : ℝ} (ha : 0 < a) (hr : 0 < r) (hx : 0 < x) :
        inverseGammaPDF a r x = ENNReal.ofReal (r ^ a / Real.Gamma a * x ^ (-a - 1) * Real.exp (-r / x))

        The inverse-gamma density has its usual formula at valid parameters and a positive point.

        @[simp]
        theorem TauCeti.Probability.inverseGammaPDF_of_nonpos {x : ℝ} (hx : x ≤ 0) (a r : ℝ) :

        The inverse-gamma density vanishes at a nonpositive point.

        @[simp]
        theorem TauCeti.Probability.inverseGammaPDF_of_not_pos {a r : ℝ} (h : ¬(0 < a ∧ 0 < r)) (x : ℝ) :

        The inverse-gamma density vanishes when its parameters are invalid.

        The real-valued inverse-gamma density is nonnegative.

        @[simp]

        Converting the inverse-gamma density back to ℝ recovers its real-valued version.

        The real inverse-gamma density is measurable in the sample point.

        The ℝ≥0∞-valued inverse-gamma density is measurable in the sample point.

        The inverse-gamma density is supported on the positive half-line.

        The inverse-gamma density is the Gamma density at the inverse point multiplied by the absolute Jacobian x⁻².

        The density of an inverse-gamma law, including the zero density at invalid parameters.

        @[simp]

        Scaling an inverse-gamma variable by b > 0 multiplies its scale by b. The identity also holds in the zero-measure invalid-parameter cases.

        A random variable with an inverse-gamma law has a density.

        The Radon–Nikodym derivative of an inverse-gamma law against Lebesgue measure.

        Parameter measurability #

        The inverse-gamma family is jointly measurable in its parameters.