NLAlib.hasLaw_norm_sq_of_hasLaw_gaussianVector
Library · theorem
The squared norm of a standard Gaussian vector is chi-square: for \mathbf{g} with law gaussianVector n (independent standard normal coordinates) and n nonempty, \|\mathbf{g}\|^2 has law \mathrm{Gamma}(d/2, 1/2) with d = \lvert n \rvert (shape d/2, rate 1/2), the chi-square law with d degrees of freedom.
NLAlib.hasLaw_norm_sq_of_hasLaw_gaussianVector.{u_1, u_2} {Ω : Type u_1} {mΩ : MeasurableSpace Ω}
{μ : Measure Ω} {n : Type u_2} [Fintype n] {g : Ω → n → ℝ} [Nonempty n]
(hg : HasLaw g (gaussianVector n) μ) :
HasLaw (fun ω ↦ ‖WithLp.toLp 2 (g ω)‖ ^ 2) (gammaMeasure (↑(Fintype.card n) / 2) (1 / 2)) μImport NLAlib.Probability.Distributions.ChiSquare.