NLA-lib Explorer

ProbabilityTheory.map_sum_sq_pi_gaussianReal

Library · theorem

Headline of chi-square-law General form: sizes are index types

The chi-square law: for \iota nonempty, under the product of d = \lvert\iota\rvert standard normal laws, \sum_i \mathbf{x}_i^2 has law \mathrm{Gamma}\Big(\frac{d}{2}, \frac{1}{2}\Big) (shape d/2, rate 1/2), the chi-square law \chi^2_d. For empty \iota the sum is 0 while gammaMeasure 0 (1 / 2) is the zero measure. No printed source. Result: chi-square-law

ProbabilityTheory.map_sum_sq_pi_gaussianReal.{u_3} {ι : Type u_3} [Fintype ι] [Nonempty ι] :
  Measure.map (fun x ↦ ∑ i, x i ^ 2) (Measure.pi fun x ↦ gaussianReal 0 1) =
    gammaMeasure (↑(Fintype.card ι) / 2) (1 / 2)

Full source on GitHub

Import NLAlib.ForMathlib.Probability.Distributions.ChiSquared.

General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.