Theorem (measureReal_abs_trace_sub_girardHutchinson_ge_le). The tail of the Girard–Hutchinson estimator with sub-Gaussian probes. If the entries of the real n \times m test matrix \mathbf{\Omega} are independent, each satisfies the sub-Gaussian moment generating function bound with variance proxy c (HasSubgaussianMGF) and has second moment 1, then for every real square \mathbf{B} and every \tau \ge 0, <!-- value hansonWrightConstant --> \mathbb{P}\bigl[\lvert \operatorname{tr}\mathbf{B} - \mathsf{girardHutchinson}(\mathbf{B}, \mathbf{\Omega}) \rvert \ge \tau\bigr] \le 2\exp\Bigl(-\frac{1}{196}\min\Bigl( \frac{m\tau^2}{c^2\|\mathbf{B}\|_{\mathsf{F}}^2}, \frac{m\tau}{c\|\mathbf{B}\|_2}\Bigr)\Bigr)\,; the constant is hansonWrightConstant. No symmetry of \mathbf{B} is needed. Junk cases: with no columns (m = 0) the estimate is 0 and the bound is 2; a zero denominator makes its fraction 0, and the bound is again 2. The proof is Hanson–Wright (NLAlib.measureReal_abs_quadForm_sub_integral_ge_le) for m \cdot \mathsf{girardHutchinson}(\mathbf{B}, \mathbf{\Omega}) = \operatorname{vec}(\mathbf{\Omega})^{\mathsf{T}}(\mathbf{I}_m \otimes \mathbf{B}) \operatorname{vec}(\mathbf{\Omega}), whose matrix has squared Frobenius norm m\|\mathbf{B}\|_{\mathsf{F}}^2 and spectral norm \|\mathbf{B}\|_2. [MeyerMuscoMuscoWoodruff2021, Lemma 2 and Appendix A]; there with unspecified constants, in the sample-size form m = O(\log(1/\delta)/\varepsilon^2) for \lvert \cdot \rvert \le \varepsilon\|\mathbf{B}\|_{\mathsf{F}}.
Headline General form: sizes are index types
Lean statement and details
NLAlib.measureReal_abs_trace_sub_girardHutchinson_ge_le.{u_1, u_3, u_4} {Ω : Type u_1}
{mΩ : MeasurableSpace Ω} {μ : Measure Ω} {n : Type u_3} {m : Type u_4} [Fintype n] [Fintype m]
{X : Ω → Matrix n m ℝ} {c : ℝ≥0} (hind : iIndepFun (fun p ω ↦ X ω p.1 p.2) μ)
(hsub : ∀ (i : n) (j : m), HasSubgaussianMGF (fun ω ↦ X ω i j) c μ)
(hvar : ∀ (i : n) (j : m), ∫ (ω : Ω), X ω i j ^ 2 ∂μ = 1) (B : Matrix n n ℝ) {τ : ℝ}
(hτ : 0 ≤ τ) :
μ.real {ω | τ ≤ |B.trace - girardHutchinson B (X ω)|} ≤
2 *
rexp
(-(hansonWrightConstant *
min (↑(Fintype.card m) * τ ^ 2 / (↑c ^ 2 * frobNorm B ^ 2))
(↑(Fintype.card m) * τ / (↑c * specNorm B))))