Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Inverse second moment of the chi-square distribution: E[(χd2)−2]=1/((d−2)(d−4))\mathbb{E}[(\chi^2_d)^{-2}] = 1/((d-2)(d-4))E[(χd2​)−2]=1/((d−2)(d−4)) for d≥5d \ge 5d≥5

Proved
GaussianMatrix.inv_sq_chi_square_moment

by tc · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

chi-squaregaussianmomentsprobability

Let d≥5d \ge 5d≥5 and let x=(x1,…,xd)x = (x_1,\dots,x_d)x=(x1​,…,xd​) have independent standard normal coordinates, so that Ξ=∑j=1dxj2\Xi = \sum_{j=1}^d x_j^2Ξ=∑j=1d​xj2​ has the chi-square distribution with ddd degrees of freedom. Then Ξ−2\Xi^{-2}Ξ−2 is integrable and

E[Ξ−2]  =  ∫Rd(∑j=1dxj2)−2dγd(x)  =  Γ(d/2−2)4 Γ(d/2)  =  1(d−2)(d−4),\mathbb{E}\big[\Xi^{-2}\big] \;=\; \int_{\mathbb{R}^d} \Big(\sum_{j=1}^d x_j^2\Big)^{-2} d\gamma_d(x) \;=\; \frac{\Gamma(d/2-2)}{4\,\Gamma(d/2)} \;=\; \frac{1}{(d-2)(d-4)},E[Ξ−2]=∫Rd​(j=1∑d​xj2​)−2dγd​(x)=4Γ(d/2)Γ(d/2−2)​=(d−2)(d−4)1​,

where γd\gamma_dγd​ is the standard Gaussian measure on Rd\mathbb{R}^dRd.

This is the second inverse moment of the chi-square law. Applied with d=k−r+1d = k-r+1d=k−r+1 degrees of freedom it yields E[((GG⊤)−1)ii2]=1/((k−r−1)(k−r−3))\mathbb{E}\big[((GG^\top)^{-1})_{ii}^2\big] = 1/((k-r-1)(k-r-3))E[((GG⊤)−1)ii2​]=1/((k−r−1)(k−r−3)) for an r×kr\times kr×k standard Gaussian matrix GGG, the diagonal ingredient of the second moments of the inverse Wishart matrix.

Formalization Note. The integrand is written ((∑ j, x j ^ 2)⁻¹) ^ 2; with Lean's convention 0−1=00^{-1} = 00−1=0 it is defined everywhere (the event Ξ=0\Xi = 0Ξ=0 is null). The hypothesis d≥5d \ge 5d≥5 is sharp: for d≤4d \le 4d≤4 the integral diverges.

Preamble
import Definitions.Def_GaussianMatrix_basic

open MeasureTheory ProbabilityTheory
open scoped Matrix
Formal statement
namespace GaussianMatrix

theorem inv_sq_chi_square_moment {d : ℕ} (hd : 5 ≤ d) :
    Integrable (fun x : Fin d → ℝ => ((∑ j, x j ^ 2)⁻¹) ^ 2)
        (Measure.pi fun _ : Fin d => gaussianReal 0 1) ∧
    ∫ x, ((∑ j, x j ^ 2)⁻¹) ^ 2 ∂(Measure.pi fun _ : Fin d => gaussianReal 0 1)
      = 1 / (((d : ℝ) - 2) * ((d : ℝ) - 4)) := by sorry

end GaussianMatrix
Source
standard fact: for Ξ∼χd2\Xi \sim \chi^2_dΞ∼χd2​ and s<d/2s < d/2s<d/2, E[Ξ−s]=Γ(d/2−s)/(2s Γ(d/2))\mathbb{E}[\Xi^{-s}] = \Gamma(d/2 - s)/(2^s\,\Gamma(d/2))E[Ξ−s]=Γ(d/2−s)/(2sΓ(d/2)); see N. L. Johnson, S. Kotz, N. Balakrishnan, Continuous Univariate Distributions, Vol. 1, 2nd ed., Wiley 1994, Ch. 18 (moments of the chi-square distribution) [chapter cited from memory]; the case s=1s=1s=1 is Halko–Martinsson–Tropp, SIAM Review 53(2), 2011, Appendix A.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me