NLA-lib Explorer

Girard–Hutchinson variance: real sphere probe

Library · Result group

Theorem (variance_quadForm_sqrt_smul_of_hasLaw_uniformSphereVector). The variance of the Girard–Hutchinson estimate with a sphere probe: for \mathbf{u} uniform on the unit sphere of \mathbb{R}^n, so that \boldsymbol{\omega} = \sqrt{\lvert n \rvert}\,\mathbf{u} is uniform on the sphere of radius \sqrt{\lvert n \rvert}, and real symmetric \mathbf{A}, \operatorname{Var}(\boldsymbol{\omega}^{\mathsf{T}}\mathbf{A}\boldsymbol{\omega}) = \frac{2\lvert n \rvert}{\lvert n \rvert + 2} \Bigl(\|\mathbf{A}\|_{\mathsf{F}}^2 - \frac{(\operatorname{tr} \mathbf{A})^2}{\lvert n \rvert} \Bigr)\,, every dimension. The case \lvert k \rvert = 1 of the Haar compression (NLAlib.mul_variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame), by NLAlib.hasLaw_replicateCol_of_hasLaw_uniformSphereVector. For nonsymmetric \mathbf{A}, NLAlib.variance_quadForm_sqrt_smul_eq_hermitianPart_of_hasLaw_uniformSphereVector. [Epperly2023, Real-Valued Test Vectors] and [Epperly2023, Uniform on the Real Sphere]; proved there by the radius–direction decomposition of a Gaussian, here from invariance alone.

Headline General form: sizes are index types

Lean statement and details
NLAlib.variance_quadForm_sqrt_smul_of_hasLaw_uniformSphereVector.{u_1, u_2} {Ω : Type u_1}
  {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} [Fintype n] {u : Ω → n → ℝ}
  (hu : HasLaw u (uniformSphereVector n) μ) {A : Matrix n n ℝ} (hA : A.IsHermitian) :
  Var[fun ω ↦ quadForm A (√↑(Fintype.card n) • u ω); μ] =
    2 * ↑(Fintype.card n) / (↑(Fintype.card n) + 2) *
      (frobNorm A ^ 2 - A.trace ^ 2 / ↑(Fintype.card n))

Full source on GitHub

Copy link

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.