The variance of a distribution on
DefinitionTwoFoldOPI_Supplement_pmfVarcoding-theoryoptimal-polynomial-intersectionp2o-gran-per-chapterp2o-plan-paperp2o-v1quantum-algorithmsregev-reductionschur-product-codes
For a distribution on with mean , its variance is
and is the standard deviation.
Formalization Note Every statement using it assumes a finite third absolute moment, under which the series converges absolutely.
Definition code
import Mathlib
import Definitions.Def_TwoFoldOPI_Supplement_pmfMean
namespace TwoFoldOPI
namespace Supplement
/-- **The variance `σ² = Var[D]` of a distribution on `ℤ`.**
Ragavan, Shutty, *Quantum Algorithms for OPI Variants Beyond Locality and Classical
Decodability*, arXiv:2610.00502 (version held, sha256 ef050ec0…62605), §5.4, Theorem 5.38, p.34: "let µ_r, σ_r be the mean and standard deviation of D_r … There
exists r ∈ [R] such that Var[D_r] > 0".
`pmfVar D = Σ_{z ∈ ℤ} (z − µ)² · D(z)` with `µ = pmfMean D`; the standard deviation is
`σ = √(pmfVar D)`, so `σ² = pmfVar D`.
**Formalization Note.** Every statement using it assumes a finite third absolute moment, under which
the series converges absolutely. -/
noncomputable def pmfVar (D : PMF ℤ) : ℝ :=
∑' z : ℤ, ((z : ℝ) - pmfMean D) ^ 2 * (D z).toReal
end Supplement
end TwoFoldOPI
Source
Ragavan, Shutty, Quantum Algorithms for OPI Variants Beyond Locality and Classical Decodability, arXiv:2610.00502 (version held, sha256 ef050ec0…62605), §5.4, Theorem 5.38, p. 34