Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.How sure can you be?
A robot arm succeeds at 92 of 100 grasps. Is its true success rate really above 85%? The law of large numbers says the average will eventually be right. Engineers need more: “with 99% confidence, the true rate is at least X.” Concentration inequalities give exactly such promises, and they hold for any number of trials, with no “approximately”.
They work because a sum of many independent bounded pieces rarely strays far from its average. To stray far, many pieces would all have to be unlucky in the same direction at once, and that’s exponentially unlikely.
Certifying that a learned controller is safe, deciding how many test drives or simulations you need, proving a machine-learning model will work on new data, and setting alarm thresholds that rarely trigger falsely all need a bound that is guaranteed, not approximate.
- 1. A concentration inequality gives…
- 2. Big deviations of an average are rare because…
- 3. More trials make the guarantee…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Markov and Chebyshev
- Markov: for and , . Proof: . Take expectations.
- Chebyshev: apply Markov to : .
They need almost nothing, so they’re loose. Chebyshev says 25% at , but a normal has 4.6%.
Hoeffding’s inequality
If are independent, then for and ,
For the mean of variables in : . Two-sided, multiply by 2. The decay is exponential in , and it never depends on the distribution, only on the range.
Sample size: gives . For and , that’s 738.
- 1. Markov's inequality needs X to be…
- 2. Chebyshev bound on P(|X − μ| ≥ 3σ)?
- 3. Hoeffding's bound for a mean of [0,1] variables decays like…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Bernstein: use the variance too
If and , then
When is small, as with rare failures, this is much sharper than Hoeffding, which assumes the worst-case variance . For small it behaves like a Gaussian tail with the true variance. For large it’s like an exponential tail.
The union bound
. To make statements hold simultaneously with probability , give each one . With Hoeffding, the price is only . This is how you safely evaluate many candidate policies or hyperparameters on the same test set.
McDiarmid: beyond sums
If changing the -th input changes by at most (bounded differences), then
Examples: the empirical risk (), the number of empty bins, the length of a longest common subsequence, and the error of a stable learning algorithm.
- 1. Bernstein beats Hoeffding when…
- 2. To make 100 bounds hold together at δ = 0.05 overall, each uses…
- 3. The empirical risk (losses in [0,1]) has bounded differences c_i =
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Proof of Hoeffding
- Chernoff step. For any , Markov applied to gives (A4.3-3).
- Hoeffding’s lemma. If and , then . Proof sketch: by convexity, . Take expectations. Write the log of the result as with . Then and , so .
- Optimize. . Minimize at to get . ∎
McDiarmid follows the same pattern applied to the Doob martingale . Each increment lies in an interval of length , so Hoeffding’s lemma applies step by step (Azuma–Hoeffding).
A first generalization bound
For a finite hypothesis class and losses in , Hoeffding plus the union bound give, with probability , simultaneously for all :
This is the template for VC, Rademacher and PAC-Bayes bounds (Shalev-Shwartz and Ben-David, 2014).
Exercise 3.1: Derive Chebyshev from Markov
.
- 1. Hoeffding's lemma bounds E e^{λX} (X ∈ [a,b], mean 0) by…
- 2. McDiarmid is proved with…
- 3. In the finite-class bound, the complexity term grows like…
Level 4: Expert
★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.Certifying the best of many controllers: the winner’s curse
You train 50 grasp-policy variants and test each on 400 trials. Picking the best-looking one and reporting its 95% Hoeffding lower bound is not valid. The best-looking policy was chosen because it got lucky, so its bound fails far more than 5% of the time. Dividing by the number of candidates (the union bound) restores the guarantee, and it costs only a widening. Better still, hold out a fresh test set for the chosen policy. This is the formal version of “don’t tune on the test set,” and it’s central to statistical certification of autonomous systems (Koopman and Wagner, 2016; Corso et al., 2021).
Concentration in AI, robotics and aerospace
- PAC learning and generalization. Finite-class, VC and Rademacher bounds all start from Hoeffding/McDiarmid plus a union bound (Valiant, 1984; Bartlett and Mendelson, 2002).
- Bandits and exploration. UCB adds a Hoeffding radius to each arm’s mean (“optimism in the face of uncertainty”), with provably logarithmic regret (Auer, Cesa-Bianchi and Fischer, 2002).
- Safe RL and verification. High-confidence off-policy evaluation reports a lower bound on a new policy’s return before you deploy it (Thomas et al., 2015). Statistical model checking certifies probabilistic safety properties from simulated runs.
- Scenario optimization for robust control: the number of sampled scenarios needed so that the solution violates at most an fraction of conditions with confidence comes from a binomial tail bound (Campi and Garatti, 2008).
- Conformal prediction produces distribution-free prediction sets whose coverage is a finite-sample guarantee. It’s widely used for uncertainty in perception and planning (Angelopoulos and Bates, 2023).
References
- W. Hoeffding (1963). “Probability inequalities for sums of bounded random variables.” JASA, 58(301).
- S. Bernstein (1924). “On a modification of Chebyshev’s inequality and of the error formula of Laplace.” Ann. Sci. Inst. Sav. Ukraine, 1.
- C. McDiarmid (1989). “On the method of bounded differences.” Surveys in Combinatorics, LMS Lecture Notes 141.
- S. Boucheron, G. Lugosi, P. Massart (2013). Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford University Press.
- R. Vershynin (2018). High-Dimensional Probability, Ch. 2. Cambridge University Press.
- S. Shalev-Shwartz, S. Ben-David (2014). Understanding Machine Learning. Cambridge University Press.
- P. Auer, N. Cesa-Bianchi, P. Fischer (2002). “Finite-time analysis of the multiarmed bandit problem.” Machine Learning, 47.
- P. Thomas, G. Theocharous, M. Ghavamzadeh (2015). “High-confidence off-policy evaluation.” AAAI.
- M. Campi, S. Garatti (2008). “The exact feasibility of randomized solutions of uncertain convex programs.” SIAM Journal on Optimization, 19(3).
- A. Corso, R. Moss, M. Koren, R. Lee, M. Kochenderfer (2021). “A survey of algorithms for black-box safety validation of cyber-physical systems.” JAIR, 72.
- A. Angelopoulos, S. Bates (2023). “Conformal prediction: a gentle introduction.” Foundations and Trends in ML, 16(4).
- P. Koopman, M. Wagner (2016). “Challenges in autonomous vehicle testing and validation.” SAE International Journal of Transportation Safety, 4(1).