NLA-lib Explorer

NLAlib.variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame

Library · theorem

Headline of haar-compression-trace-variance General form: sizes are index types

The variance of a Haar compression: for an n \times k Haar frame \mathbf{Q} with \lvert k \rvert \le \lvert n \rvert and \lvert n \rvert \ge 2, and real symmetric \mathbf{A}, \operatorname{Var}\operatorname{tr}(\mathbf{Q}^{\mathsf{H}}\mathbf{A}\mathbf{Q}) = \frac{2\lvert k \rvert(\lvert n \rvert - \lvert k \rvert)} {(\lvert n \rvert - 1)\lvert n \rvert(\lvert n \rvert + 2)} \Bigl(\|\mathbf{A}\|_{\mathsf{F}}^2 - \frac{(\operatorname{tr} \mathbf{A})^2}{\lvert n \rvert} \Bigr)\,. It vanishes for \lvert k \rvert = \lvert n \rvert (then the trace is \operatorname{tr} \mathbf{A}) and for \mathbf{A} a multiple of \mathbf{I}; with \lvert k \rvert = 1 it is the sphere's variance (NLAlib.variance_quadForm_sqrt_smul_of_hasLaw_uniformSphereVector). The multiplied form, valid for every \lvert n \rvert, is NLAlib.mul_variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame; for nonsymmetric \mathbf{A}, NLAlib.variance_trace_conjTranspose_mul_mul_eq_hermitianPart_of_hasLaw_haarFrame. [Epperly2023, Uniform on the Real Sphere], there \lvert k \rvert = 1; here any number of orthonormal probes. Result: haar-compression-trace-variance

NLAlib.variance_trace_conjTranspose_mul_mul_of_hasLaw_haarFrame.{u_1, u_2, u_3} {Ω : Type u_1}
  {mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_2} {k : Type u_3} [Fintype n] [Fintype k]
  {X : Ω → Matrix n k ℝ} [DecidableEq k] (hX : HasLaw X (haarFrame n k) μ)
  (hk : Fintype.card k ≤ Fintype.card n) (hn : 1 < Fintype.card n) {A : Matrix n n ℝ}
  (hA : A.IsHermitian) :
  Var[fun ω ↦ ((X ω)ᴴ * A * X ω).trace; μ] =
    2 * ↑(Fintype.card k) * (↑(Fintype.card n) - ↑(Fintype.card k)) /
        ((↑(Fintype.card n) - 1) * ↑(Fintype.card n) * (↑(Fintype.card n) + 2)) *
      (frobNorm A ^ 2 - A.trace ^ 2 / ↑(Fintype.card n))

Full source on GitHub

Import NLAlib.RandomMatrix.Haar.Moments.

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.