Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma B.1: for Z ∈ [0,1] with E[Z] = μ and a ∈ (0,1), P[Z > 1 − a] ≥ (μ − (1 − a))/a and P[Z > a] ≥ (μ − a)/(1 − a) ≥ μ − a

Proved
UnderstandingML.reverse_markov

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

appendix-bmarkov-inequalityprobability

Lemma B.1. Let ZZZ be a random variable that takes values in [0,1][0,1][0,1]. Assume that E[Z]=μE[Z] = \muE[Z]=μ. Then, for any a∈(0,1)a \in (0,1)a∈(0,1),

P[Z>1−a]≥μ−(1−a)a.P[Z > 1 - a] \ge \frac{\mu - (1-a)}{a}.P[Z>1−a]≥aμ−(1−a)​.

This also implies that for every a∈(0,1)a \in (0,1)a∈(0,1),

P[Z>a]≥μ−a1−a≥μ−a.P[Z > a] \ge \frac{\mu - a}{1 - a} \ge \mu - a.P[Z>a]≥1−aμ−a​≥μ−a.

Formally: for a probability measure DDD on Ω\OmegaΩ, a measurable θ:Ω→R\theta : \Omega \to \mathbb{R}θ:Ω→R with θ∈[0,1]\theta \in [0,1]θ∈[0,1] DDD-almost surely, μ=∫θ dD\mu = \int \theta\,dDμ=∫θdD and a∈(0,1)a \in (0,1)a∈(0,1), the three inequalities hold with P[⋅]=D(⋅)P[\cdot] = D(\cdot)P[⋅]=D(⋅).

Preamble
import Definitions.Def_UnderstandingML_Framework
import Mathlib.SetTheory.Cardinal.Finite

open MeasureTheory
Formal statement
namespace UnderstandingML

/-- **Lemma B.1** (p. 422). Let `Z` be a random variable that takes values in `[0, 1]` and assume
that `E[Z] = μ`. Then for any `a ∈ (0, 1)`, `P[Z > 1 − a] ≥ (μ − (1 − a))/a`. This also implies
that for every `a ∈ (0, 1)`, `P[Z > a] ≥ (μ − a)/(1 − a) ≥ μ − a`. Stated for a measurable
`θ : Ω → ℝ` with values in `[0, 1]` almost surely under a probability measure `D`, with
`μ = ∫ θ dD`. -/
theorem reverse_markov {Ω : Type*} [MeasurableSpace Ω] (D : Measure Ω) [IsProbabilityMeasure D]
    (θ : Ω → ℝ) (hθ : Measurable θ) (hrange : ∀ᵐ ω ∂D, θ ω ∈ Set.Icc (0 : ℝ) 1) {a : ℝ}
    (ha0 : 0 < a) (ha1 : a < 1) :
    ((∫ ω, θ ω ∂D) - (1 - a)) / a ≤ (D {ω | 1 - a < θ ω}).toReal ∧
    ((∫ ω, θ ω ∂D) - a) / (1 - a) ≤ (D {ω | a < θ ω}).toReal ∧
    (∫ ω, θ ω ∂D) - a ≤ (D {ω | a < θ ω}).toReal := 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, Appendix B.1 p. 422, Lemma B.1 with its proof (from Markov's inequality (B.3))
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me