Documentation

CslibFrontier.Foundations.Probability.EfronStein

The Efron–Stein inequality for uniform averages #

For a function f of a spectator y and of a uniformly random tuple w : Fin n → A, the second moment of f about its average over w is at most the sum, over the coordinates i, of the second moments of f about its averages over the single coordinate w i (Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update): 𝔼 (f - 𝔼_w f)² ≤ ∑ i, 𝔼 (f - 𝔼_{w i} f)². This is the Efron–Stein inequality Efron and Stein in the general form for functions that need not be symmetric Steele, for the uniform product measure and with the spectator as an extra fixed coordinate. It reduces the distance of f from the functions of y alone to its distances from the functions not depending on one coordinate at a time.

The proof is by induction on n: split w = Fin.cons a r, decompose orthogonally over the fibers of (y, a), apply the induction hypothesis with the spectator (y, a) to the part of average zero on these fibers, and bound the fiber averages by Jensen's inequality.

Main results #

References #

theorem Fintype.expect_sq_sub_expect_update_le {ι : Type u_1} {Y : Type u_2} {A : Type u_3} [Fintype ι] [DecidableEq ι] [Fintype Y] [Fintype A] [Nonempty A] (i : ι) (f G : Y × (ι → A) → ℝ) (hG : ∀ (p : Y × (ι → A)) (c : A), G (p.1, Function.update p.2 i c) = G p) :
(Finset.univ.expect fun (p : Y × (ι → A)) => (f p - Finset.univ.expect fun (a : A) => f (p.1, Function.update p.2 i a)) ^ 2) ≤ Finset.univ.expect fun (p : Y × (ι → A)) => (f p - G p) ^ 2

The average over one coordinate is the best approximation by functions not depending on that coordinate: if G does not change when w i is resampled, then the second moment of f about its average over w i is at most the second moment of f - G.

theorem Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update {A : Type u} [Fintype A] [Nonempty A] {n : ℕ} {Y : Type u} [Fintype Y] (f : Y × (Fin n → A) → ℝ) :
(Finset.univ.expect fun (p : Y × (Fin n → A)) => (f p - Finset.univ.expect fun (w : Fin n → A) => f (p.1, w)) ^ 2) ≤ ∑ i : Fin n, Finset.univ.expect fun (p : Y × (Fin n → A)) => (f p - Finset.univ.expect fun (a : A) => f (p.1, Function.update p.2 i a)) ^ 2

The Efron–Stein inequality for a uniformly random tuple w : Fin n → A and a spectator y: the second moment of f about its average over w is at most the sum over the coordinates i of the second moments of f about its averages over w i. The spectator lives in the universe of A, so that the induction can absorb coordinates into it.

theorem Fintype.expect_expect_sq_sub_le_sum_expect_expect_sq_sub_update {A : Type u} [Fintype A] [Nonempty A] {n : ℕ} (f : (Fin n → A) → ℝ) :
(Finset.univ.expect fun (u : Fin n → A) => Finset.univ.expect fun (v : Fin n → A) => (f u - f v) ^ 2) ≤ ∑ i : Fin n, Finset.univ.expect fun (u : Fin n → A) => Finset.univ.expect fun (a : A) => (f u - f (Function.update u i a)) ^ 2

The mean square distance between independent uniform tuples is bounded by the sum of the mean square distances for resampling one coordinate at a time.

theorem Fintype.expect_sub_expect_sq_le {A : Type u} [Fintype A] [Nonempty A] {κ : Type u_1} [Fintype κ] [DecidableEq κ] (f : (κ → A) → ℝ) (c : κ → ℝ) (hc : ∀ (i : κ), 0 ≤ c i) (hf : ∀ (ω : κ → A) (i : κ) (a b : A), |f (Function.update ω i a) - f (Function.update ω i b)| ≤ c i) :
(Finset.univ.expect fun (ω : κ → A) => (f ω - Finset.univ.expect fun (ω' : κ → A) => f ω') ^ 2) ≤ ∑ i : κ, c i ^ 2

Bounded-difference variance bound. On any finite product κ → A, a function whose oscillation in coordinate i is at most c i ≥ 0 has variance at most ∑ i, (c i) ^ 2.

theorem Fintype.exists_forall_abs_sub_expect_le {A : Type u} [Fintype A] [Nonempty A] {ι : Type u_1} {κ : Type u_2} [Fintype ι] [Fintype κ] [DecidableEq κ] (f : ι → (κ → A) → ℝ) (c : ι → κ → ℝ) (hc : ∀ (j : ι) (i : κ), 0 ≤ c j i) (hf : ∀ (j : ι) (ω : κ → A) (i : κ) (a b : A), |f j (Function.update ω i a) - f j (Function.update ω i b)| ≤ c j i) :
∃ (ω : κ → A), ∀ (j : ι), |f j ω - Finset.univ.expect fun (ω' : κ → A) => f j ω'| ≤ √(∑ r : ι, ∑ i : κ, c r i ^ 2)

Simultaneous bounded-difference realization. Averaging the sum of squared deviations over a finite family f : ι → (κ → A) → ℝ yields a single sample ω at which every f j ω deviates from its expectation by at most √(∑ j, ∑ i, (c j i) ^ 2).