Proposition 1: Hoeffding–Bentkus p-values are valid
ProvedLearnThenTest.hoeffding_bentkus_pvalue_validLet and let be independent and identically distributed losses with values in , the losses of a fixed on an i.i.d. calibration set. Their mean is the risk . Let and suppose the null hypothesis holds. Let and . Then
is a valid p-value: for every .
This is the p-value the paper uses in all of its finite-sample experiments.
Formalization Note The losses are taken directly as i.i.d. random variables, without modelling the data and the predictor. The restriction is not printed, but it is needed for and to be defined.
import Mathlib import Definitions.Def_LearnThenTest_Basic open MeasureTheory ProbabilityTheory Filter
namespace LearnThenTest
theorem hoeffding_bentkus_pvalue_valid {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] {n : ℕ} (hn : 1 ≤ n) (L : Fin n → Ω → ℝ)
(hmeas : ∀ i, Measurable (L i)) (hind : iIndepFun L P)
(hident : ∀ i, IdentDistrib (L i) (L ⟨0, hn⟩) P P)
(hL01 : ∀ i ω, L i ω ∈ Set.Icc (0 : ℝ) 1) (α : ℝ) (hα : 0 < α ∧ α < 1)
(hnull : α < ∫ ω, L ⟨0, hn⟩ ω ∂P) :
IsValidPValue P (fun ω => hbPValue n α (empRisk (fun i => L i ω))) := by sorry
end LearnThenTestRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a probability space: is an arbitrary measurable space and is a probability measure on it. Fix:
- a natural number ;
- real-valued functions on , the "losses".
The following hypotheses are assumed on the losses:
- each is measurable;
- are mutually independent under , as a whole family and not merely pairwise;
- each has the same law under as ;
- for every index and every outcome . This holds pointwise everywhere, not just almost surely.
Fix also a real number with , and assume the strict inequality
The mean of exists because is bounded. By identical distribution it equals the common mean of all .
For each outcome , define the empirical risk
Define the Hoeffding–Bentkus statistic
Here , and the two auxiliary functions are as follows.
- The function :
It uses the conventions and division by giving . In this theorem and . The only degenerate case is therefore , where the first term is .
- The function :
This is the distribution function of the binomial law evaluated at . In this theorem it is evaluated at the integer , the ceiling of .
The theorem asserts that is a valid p-value under , in the following sense: for every ,
No measurability of is assumed or asserted. If the event were not measurable, of it would be interpreted as outer measure. The bound is claimed only for thresholds in .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.