Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Bennett's inequality for independent [0,1][0,1][0,1] variables — EPn≤Pn+2Wln⁡(1/δ)/n+ln⁡(1/δ)/(3n)\mathbb EP_n \le P_n + \sqrt{2W\ln(1/\delta)/n} + \ln(1/\delta)/(3n)EPn​≤Pn​+2Wln(1/δ)/n​+ln(1/δ)/(3n)

Proved
EmpiricalBernstein.SVP.bennett_independent

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

bernsteinconcentrationp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let n≥1n \ge 1n≥1 and let X=(X1,…,Xn)X = (X_1,\dots,X_n)X=(X1​,…,Xn​) be a vector of independent, not necessarily identically distributed, random variables with values in [0,1][0,1][0,1]. Let W=1n∑iVXiW = \frac1n\sum_i \mathbb V X_iW=n1​∑i​VXi​ and let Pn(X)=1n∑iXiP_n(X) = \frac1n\sum_i X_iPn​(X)=n1​∑i​Xi​ be the sample mean. Then for every δ>0\delta > 0δ>0, with probability at least 1−δ1-\delta1−δ,

EPn(X)≤Pn(X)+2Wln⁡(1/δ)n+ln⁡(1/δ)3n.\mathbb E P_n(X) \le P_n(X) + \sqrt{\frac{2W\ln(1/\delta)}{n}} + \frac{\ln(1/\delta)}{3n}.EPn​(X)≤Pn​(X)+n2Wln(1/δ)​​+3nln(1/δ)​.

This is the form of Bennett's inequality recalled in the proof of Theorem 11 (the paper cites McDiarmid's survey, its reference [8], for the non-identically distributed case); it is combined there with W≤EVnW \le \mathbb EV_nW≤EVn​ and Theorem 10. The same statement applied to 1−Xi1 - X_i1−Xi​ gives the reverse direction used in Lemma 14.

Formalization Note Xi∼μiX_i \sim \mu_iXi​∼μi​ independently, each μi\mu_iμi​ a probability measure on R\mathbb RR with μi(R∖[0,1])=0\mu_i(\mathbb R\setminus[0,1]) = 0μi​(R∖[0,1])=0; the sample is the identity on Fin n → ℝ under ∏iμi\prod_i\mu_i∏i​μi​, and "with probability at least 1−δ1-\delta1−δ" is written as the product measure of the complementary (strict) event being at most δ\deltaδ. n≥1n \ge 1n≥1 is added: at n=0n = 0n=0 Lean's 1/0=01/0 = 01/0=0 would make the statement false.

Preamble
import Mathlib
import Definitions.Def_VarianceRegularization_Expansion_empMean

open MeasureTheory ProbabilityTheory VarianceRegularization.Expansion
Formal statement
namespace EmpiricalBernstein.SVP

/-- Bennett's inequality for independent, not necessarily identically distributed, `[0,1]`-valued
variables, as used in the proof of Theorem 11 (arXiv:0907.3740v1, p. 4), with
`W = (1/n) ∑ 𝕍X_i`. -/
theorem bennett_independent {n : ℕ} (hn : 1 ≤ n) (μs : Fin n → Measure ℝ)
    [∀ i, IsProbabilityMeasure (μs i)] (hμs : ∀ i, μs i (Set.Icc (0 : ℝ) 1)ᶜ = 0)
    (δ : ℝ) (hδ : 0 < δ) :
    Measure.pi μs {x | (∫ z, empMean z ∂(Measure.pi μs))
        > empMean x
          + Real.sqrt (2 * ((1 / (n : ℝ)) * ∑ i, variance (fun y : ℝ => y) (μs i))
              * Real.log (1 / δ) / n)
          + Real.log (1 / δ) / (3 * n)}
      ≤ ENNReal.ofReal δ := by sorry

end EmpiricalBernstein.SVP
Source
Maurer, Pontil, Empirical Bernstein Bounds and Sample Variance Penalization, arXiv:0907.3740v1, proof of Theorem 11, p. 4, display after 'Recall that Bennett's inequality'
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me