Documentation

CslibFrontier.Probability.PMF.Chebyshev

Chebyshev's inequality for finite distributions #

For a distribution p on a finite type, a real score f, a centre m and c > 0, the mass of any set of points where |f a - m| ≥ c is at most ∑ a, p(a) (f a - m)² / c² (sum_mul_ite_le_sum_mul_sq_div). With m the mean of f this is Chebyshev's inequality with the variance; the statement is a finite sum, so no measure-theoretic integrability side conditions arise.

Main results #

theorem Cslib.Probability.PMF.sum_mul_ite_le_sum_mul_sq_div {α : Type u_1} [Fintype α] (p : PMF α) (f : α → ℝ) (m : ℝ) {c : ℝ} (hc : 0 < c) (A : α → Prop) [DecidablePred A] (hA : ∀ (a : α), A a → c ≤ |f a - m|) :
(∑ a : α, (p a).toReal * if A a then 1 else 0) ≤ (∑ a : α, (p a).toReal * (f a - m) ^ 2) / c ^ 2

Chebyshev's inequality for a finite distribution: every set of points where f deviates from m by at least c > 0 has mass at most the second moment of f - m divided by c².