Finite complex second moments and covariance matrix
DefinitionDerivativeChainContinuation_Covariancecompression-deficitcontinuation-20261026derivative-chains
Define the uniform mean squared norm , the complex mean square , and the real two-by-two second-moment matrix of a finite complex root list. These become centered variance and covariance when the list has mean zero.
Definition code
import Mathlib
import Definitions.Def_DerivativeChainPrivate_foundations
set_option autoImplicit false
namespace DerivativeChainContinuation
open scoped BigOperators
noncomputable def secondMoment {n : ℕ} (a : Fin n → ℂ) : ℝ :=
(∑ i, Complex.normSq (a i)) / n
noncomputable def holomorphicMoment {n : ℕ} (a : Fin n → ℂ) : ℂ :=
Complex.ofReal ((n : ℝ)⁻¹) * ∑ i, (a i)^2
noncomputable def covariance {n : ℕ} (a : Fin n → ℂ) : Matrix (Fin 2) (Fin 2) ℝ :=
!![(∑ i, (a i).re^2) / n, (∑ i, (a i).re * (a i).im) / n;
(∑ i, (a i).re * (a i).im) / n, (∑ i, (a i).im^2) / n]
end DerivativeChainContinuation
Source