Documentation

CslibFrontier.Probability.KWiseIndependent.SecondMoment

Second moments under pairwise independence #

For a pairwise independent hash family h with seed i drawn uniformly and scores Z x : Y → ℝ of average zero at the points x of a finite set S, the average square of the sum ∑ x ∈ S, Z x (h i x) is the sum of the average squares (Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum): the cross terms vanish. This gives the unbiasedness of the tug-of-war estimator of Alon, Matias and Szegedy [AMS99] and the variance of an average of independent samples.

Main results #

References #

theorem Cslib.Probability.IsKWiseIndependentHash.expect_sq_sum {ι : Type u_1} {X : Type u_2} {Y : Type u_3} [Fintype ι] [Fintype Y] [DecidableEq Y] {h : ι → X → Y} (hh : IsKWiseIndependentHash 2 h) (S : Finset X) (Z : X → Y → ℝ) (hZ : ∀ x ∈ S, (Finset.univ.expect fun (y : Y) => Z x y) = 0) :
(Finset.univ.expect fun (i : ι) => (∑ x ∈ S, Z x (h i x)) ^ 2) = ∑ x ∈ S, Finset.univ.expect fun (y : Y) => Z x y ^ 2

Second moments add under pairwise independence: for scores Z x : Y → ℝ of average zero at the points of a finite set S, the average square of ∑ x ∈ S, Z x (h i x) is the sum of the average squares.