Lemma 4.5 (Hoeffding's inequality): P[|(1/m)∑θᵢ − μ| > ε] ≤ 2 exp(−2mε²/(b − a)²) for i.i.d. θᵢ ∈ [a, b] with mean μ
ProvedUnderstandingML.hoeffding_inequalityconcentrationhoeffdingprobability
Lemma 4.5 (Hoeffding's Inequality). Let be a sequence of i.i.d. random variables and assume that for all , and . Then, for any ,
Formally: for a probability measure on , a measurable with -almost surely and mean , and , the product law of the event is at most (when the bound reads under Lean's convention and is trivially true).
Preamble
import Definitions.Def_UnderstandingML_Framework open MeasureTheory
Formal statement
namespace UnderstandingML
/-- **Lemma 4.5 (Hoeffding's inequality)** (p. 56). Let `θ₁, …, θ_m` be a sequence of i.i.d. random
variables and assume that for all `i`, `E[θᵢ] = μ` and `P[a ≤ θᵢ ≤ b] = 1`. Then for any `ε > 0`,
`P[|(1/m) ∑ θᵢ − μ| > ε] ≤ 2 exp(−2mε²/(b − a)²)`. Stated on the product law of `m` copies of
a distribution `D` on `Ω`, for a measurable `θ : Ω → ℝ` with `a ≤ θ ≤ b` almost surely and mean
`μ = ∫ θ dD`. -/
theorem hoeffding_inequality {Ω : Type*} [MeasurableSpace Ω] (D : Measure Ω)
[IsProbabilityMeasure D] (θ : Ω → ℝ) (hθ : Measurable θ) {a b : ℝ}
(hab : ∀ᵐ ω ∂D, a ≤ θ ω ∧ θ ω ≤ b) (m : ℕ) {ε : ℝ} (hε : 0 < ε) :
iidLaw D m {ω | ε < |(∑ i, θ (ω i)) / m - ∫ x, θ x ∂D|} ≤
ENNReal.ofReal (2 * Real.exp (-(2 * m * ε ^ 2 / (b - a) ^ 2))) := by sorry
end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §4.2 p. 56, Lemma 4.5 (proved in Appendix B)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.