Documentation

CslibFrontier.Foundations.Data.Finset.Expect.Chebyshev

Chebyshev bounds for uniform finite averages #

A function exceeds a positive absolute threshold on a set of density at most its second moment divided by the squared threshold. Apply this to fun i => f i - c for deviations about any center c, including the uniform mean. Both strict and non-strict tails are available.

Main results #

theorem Fintype.dens_le_abs_le_expect_sq_div_sq {ι : Type u_1} {𝕜 : Type u_2} [Fintype ι] [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] (f : ι → 𝕜) {ε : 𝕜} (hε : 0 < ε) :
↑{i : ι | ε ≤ |f i|}.dens ≤ (Finset.univ.expect fun (i : ι) => f i ^ 2) / ε ^ 2

The density of an absolute tail is bounded by the second moment divided by the threshold squared. Subtract a chosen center from f to obtain Chebyshev's inequality.

theorem Fintype.dens_lt_abs_le_expect_sq_div_sq {ι : Type u_1} {𝕜 : Type u_2} [Fintype ι] [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] (f : ι → 𝕜) {ε : 𝕜} (hε : 0 < ε) :
↑{i : ι | ε < |f i|}.dens ≤ (Finset.univ.expect fun (i : ι) => f i ^ 2) / ε ^ 2

The same second-moment bound holds for a strict absolute tail.