NLA-lib Explorer

Polar coordinates for a standard normal vector, and the chi-square law

Library · Source module

Polar coordinates for a standard normal vector, and the chi-square law

For d = \lvert\iota\rvert \ge 1 independent standard normal coordinates \mathbf{g}, a radial function integrates in polar coordinates against the \chi_d density: \mathbb{E}\,\varphi(\|\mathbf{g}\|) = \frac{1}{2^{d/2-1}\Gamma(d/2)} \int_0^\infty y^{d-1}e^{-y^2/2}\varphi(y)\,dy\,. This is the density behind the chi-square law \chi^2_d of \sum_i \mathbf{g}_i^2, which is Mathlib's gammaMeasure (d / 2) (1 / 2) (shape d/2, rate 1/2).

Upstream candidate: a new file Mathlib/Probability/Distributions/ChiSquared.lean beside Gamma.lean. Upstream, the natural statement is about (stdGaussian (EuclideanSpace ℝ ι)).map (‖·‖ ^ 2), through map_pi_eq_stdGaussian; here the law is Measure.pi of gaussianReal 0 1.

Main results

* ProbabilityTheory.integral_comp_norm_pi_gaussianReal: polar coordinates, the \chi_d density. * ProbabilityTheory.integral_rpow_mul_exp_neg_sq_div_two: the Gaussian radial integral. * ProbabilityTheory.map_sum_sq_pi_gaussianReal: the chi-square law, measure-level. * ProbabilityTheory.hasLaw_sum_sq_of_hasLaw_pi_gaussianReal: its HasLaw form.

Declarations