Documentation

TauCeti.Probability.Distributions.Wishart.Nonsingular

The nonsingular Wishart family #

The nonsingular Wishart law TauCeti.Probability.nonsingularWishartMeasure n S is the law on the symmetric-matrix subspace whose density against TauCeti.symmetricLebesgue is (det A) ^ ((n - p - 1) / 2) * exp (-trace (S⁻¹ * A) / 2), normalized by 2 ^ (n p / 2) * (det S) ^ (n / 2) * Γ_p(n / 2) and supported on the positive-definite cone. Its degree n is a real parameter, restricted to p - 1 < n, which in positive dimension is the range where the density is integrable; its scale S is positive definite, since a singular positive-semidefinite scale concentrates the law on a proper subspace, where it has no density at all. Outside those two parameter conditions the definition sets the measure to zero.

The normalization is the one attached to TauCeti.symmetricLebesgue, whose coordinate unit cube has measure one; no other Haar normalization of the symmetric matrices produces the classical Wishart constants.

Dimension zero needs no separate definition: the symmetric space is then a single point, TauCeti.symmetricLebesgue 0 is a Dirac mass, and the empty determinants, trace and normalizing constant leave the density equal to 1, so for -1 < n the law is that Dirac mass.

Main definitions #

Main results #

References #

The density #

noncomputable def TauCeti.Probability.nonsingularWishartPDFReal {p : ℕ} (n : ℝ) (S : Matrix (Fin p) (Fin p) ℝ) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :

The nonsingular Wishart density of degree n and scale S, as a real-valued function of a symmetric matrix: on the positive-definite cone it is (det A) ^ ((n - p - 1) / 2) * exp (-trace (S⁻¹ * A) / 2) divided by the Wishart constant 2 ^ (n p / 2) * (det S) ^ (n / 2) * Γ_p(n / 2), and it vanishes off the cone.

Instances For
    theorem TauCeti.Probability.nonsingularWishartPDFReal_def {p : ℕ} (n : ℝ) (S : Matrix (Fin p) (Fin p) ℝ) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :
    nonsingularWishartPDFReal n S A = if (↑A).PosDef then (↑A).det ^ ((n - ↑p - 1) / 2) * Real.exp (-(S⁻¹ * ↑A).trace / 2) / (2 ^ (n * ↑p / 2) * S.det ^ (n / 2) * multivariateGamma p (n / 2)) else 0

    The defining branch expression of the real-valued Wishart density.

    @[simp]
    theorem TauCeti.Probability.nonsingularWishartPDFReal_of_posDef {p : ℕ} (n : ℝ) (S : Matrix (Fin p) (Fin p) ℝ) {A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))} (hA : (↑A).PosDef) :
    nonsingularWishartPDFReal n S A = (↑A).det ^ ((n - ↑p - 1) / 2) * Real.exp (-(S⁻¹ * ↑A).trace / 2) / (2 ^ (n * ↑p / 2) * S.det ^ (n / 2) * multivariateGamma p (n / 2))

    On the positive-definite cone the Wishart density is its defining formula.

    @[simp]

    Off the positive-definite cone the Wishart density vanishes.

    theorem TauCeti.Probability.nonsingularWishartPDFReal_nonneg {p : ℕ} {n : ℝ} {S : Matrix (Fin p) (Fin p) ℝ} (hS : S.PosDef) (hn : ↑p - 1 < n) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :

    At a valid degree and scale the Wishart density is nonnegative.

    theorem TauCeti.Probability.nonsingularWishartPDFReal_pos_iff {p : ℕ} {n : ℝ} {S : Matrix (Fin p) (Fin p) ℝ} (hS : S.PosDef) (hn : ↑p - 1 < n) {A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))} :

    At a valid degree and scale the Wishart density is positive exactly on the positive-definite cone.

    noncomputable def TauCeti.Probability.nonsingularWishartPDF {p : ℕ} (n : ℝ) (S : Matrix (Fin p) (Fin p) ℝ) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :

    The ℝ≥0∞-valued Wishart density, the one that defines the measure.

    Instances For

      The ℝ≥0∞-valued Wishart density is ENNReal.ofReal of the real-valued one.

      @[simp]
      theorem TauCeti.Probability.nonsingularWishartPDF_of_posDef {p : ℕ} (n : ℝ) (S : Matrix (Fin p) (Fin p) ℝ) {A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))} (hA : (↑A).PosDef) :
      nonsingularWishartPDF n S A = ENNReal.ofReal ((↑A).det ^ ((n - ↑p - 1) / 2) * Real.exp (-(S⁻¹ * ↑A).trace / 2) / (2 ^ (n * ↑p / 2) * S.det ^ (n / 2) * multivariateGamma p (n / 2)))

      On the positive-definite cone the ℝ≥0∞-valued Wishart density is its defining formula.

      @[simp]

      Off the positive-definite cone the ℝ≥0∞-valued Wishart density vanishes.

      theorem TauCeti.Probability.nonsingularWishartPDF_pos_iff {p : ℕ} {n : ℝ} {S : Matrix (Fin p) (Fin p) ℝ} (hS : S.PosDef) (hn : ↑p - 1 < n) {A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))} :

      At a valid degree and scale the ℝ≥0∞-valued Wishart density is positive exactly on the positive-definite cone.

      @[simp]

      The Wishart density is finite.

      theorem TauCeti.Probability.toReal_nonsingularWishartPDF {p : ℕ} {n : ℝ} {S : Matrix (Fin p) (Fin p) ℝ} (hS : S.PosDef) (hn : ↑p - 1 < n) (A : ↥(selfAdjoint.submodule ℝ (Matrix (Fin p) (Fin p) ℝ))) :

      At a valid degree and scale the ℝ≥0∞-valued density carries the real one.

      The real-valued Wishart density is measurable in the point.

      The real-valued Wishart density is measurable jointly in its degree, its scale matrix and the point.

      The Wishart density is measurable in the point.

      The Wishart density is measurable jointly in its degree, its scale matrix and the point.

      The measure #

      The nonsingular Wishart law of real degree n and positive-definite scale S: the density TauCeti.Probability.nonsingularWishartPDF against TauCeti.symmetricLebesgue. Outside the classical parameter range — a scale that is not positive definite, or a degree at most p - 1, which in positive dimension is where the density stops being integrable — the definition sets the measure to zero.

      Instances For

        The defining branch expression of the Wishart law.

        In the classical parameter range the Wishart law is its density against TauCeti.symmetricLebesgue.

        @[simp]

        At a scale that is not positive definite there is no Wishart density to normalize, and the law is zero.

        @[simp]

        At a degree at most p - 1 the Wishart law is zero by definition; in positive dimension this is the range where the density is not integrable.

        @[simp]

        The Wishart law gives no mass to the complement of the positive-definite cone.

        A matrix sampled from the Wishart law is almost surely positive definite.

        @[simp]

        The Wishart law read on the positive-definite cone. Mapping the lift (nonsingularWishartMeasure n S).comap Subtype.val back along the inclusion of the cone returns the law itself, because the cone carries all of its mass. This is the form in which the Cholesky equivalence, which is defined on the cone, acts on a Wishart matrix.

        The density of a Wishart random matrix #

        A random symmetric matrix with a nonsingular Wishart law has a density against TauCeti.symmetricLebesgue, at every degree and scale: outside the classical parameter range the law is zero, which trivially has one.

        The density against TauCeti.symmetricLebesgue of a random symmetric matrix with a nonsingular Wishart law is TauCeti.Probability.nonsingularWishartPDF.

        The Radon–Nikodym derivative of the nonsingular Wishart law against TauCeti.symmetricLebesgue is the Wishart density.

        Dimension zero #

        @[simp]

        In dimension zero the symmetric space is a single point and the real-valued Wishart density is 1 there.

        @[simp]

        In dimension zero the symmetric space is a single point and the Wishart density is 1 there.

        In dimension zero every valid Wishart law is the Dirac mass at the unique symmetric matrix. The general definition already gives this: TauCeti.symmetricLebesgue 0 is that Dirac mass and the density is identically 1.

        Parameter measurability #

        Parameter measurability of the nonsingular Wishart law. The law is measurable jointly in its real degree and every coordinate of its scale matrix, which is what a Wishart kernel with a random degree and scale needs.

        The nonsingular Wishart law is measurable jointly in its real degree and a scale ranging over the symmetric-matrix carrier. This is the form used to build a kernel with a random symmetric scale.