Weissman's deviation bound for an empirical distribution
ProvedBanditAlgorithm.weissman_l1_deviationLet be independent random variables with values in a finite set and common law , and let
be their empirical distribution. Then for every ,
This is the fixed-sample-size categorical concentration inequality of Weissman, Ordentlich, Seroussi, Verdú and Weinberger, and it is the probabilistic content of Lemma 38.8 in Lattimore and Szepesvári: it is what makes the confidence sets
of Eq. (38.13) valid, and it explains both the shape of the confidence width and the appearance of inside it: setting the right-hand side equal to gives , of the stated order up to the logarithmic term.
The proof has two halves. The deterministic half is the variational identity , which shows that an deviation of forces one of the events to have empirical probability exceeding its true probability by ; a union bound over the subsets produces the factor . The probabilistic half is Hoeffding's inequality applied to each fixed : the indicators are independent and take values in , hence are sub-Gaussian with variance proxy , and
The hypothesis only rules out the empty sample, for which the empirical distribution is not defined.
import Mathlib.Probability.Moments.SubGaussian import Mathlib.MeasureTheory.Integral.Bochner.Set open MeasureTheory ProbabilityTheory open scoped NNReal ENNReal
theorem BanditAlgorithm.weissman_l1_deviation
{Ω : Type*} {mΩ : MeasurableSpace Ω} {μ : Measure Ω}
[IsProbabilityMeasure μ] {ι : Type*} [Fintype ι] [DecidableEq ι]
[MeasurableSpace ι] [MeasurableSingletonClass ι] {m : ℕ} (hm : 0 < m)
(X : Fin m → Ω → ι) (p : ι → ℝ) (hmeas : ∀ i, Measurable (X i))
(hindep : iIndepFun X μ)
(hlaw : ∀ (i : Fin m) (a : ι), μ.real {ω | X i ω = a} = p a)
{ε : ℝ} (hε : 0 ≤ ε) :
μ.real {ω | ε ≤ ∑ a, |(∑ i : Fin m, if X i ω = a then (1 : ℝ) else 0) / m - p a|}
≤ 2 ^ Fintype.card ι * Real.exp (-(m : ℝ) * ε ^ 2 / 2) := by
sorry