Show that for a finite hypothesis class in the realisable setting, any learner that outputs a hypothesis consistent with the training data is PAC with samples. How many samples are needed when , and ?
Learning theory, PAC learning
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.
What's being asked
Whether you can bound the probability that a bad hypothesis survives the training data, and use the union bound.
Key idea
Write for the true error of on the data distribution . A fixed with is consistent with i.i.d. samples with probability less than . A union bound over at most bad hypotheses gives failure probability at most ; set this and solve for .
Steps
- Define the bad hypotheses . A consistent learner fails only if some has zero training error.
- For one : each sample is classified correctly with probability less than , so , using .
- Union bound: .
- Solve : .
- Numbers: and , sum ; divided by this is , so .
- Interpret: grows only logarithmically in , and as rather than the needed in the agnostic case.
Common mistakes
- Bounding the probability that a good hypothesis is consistent. The argument is about bad hypotheses surviving.
- Forgetting the union bound, or not noting that .
- Using this rate in the agnostic setting, where no hypothesis may be consistent and the rate is .
How long your answer should be
Half a page; 4–5 minutes.
Last checked on 4 December 2026.
Read this
- Shalev-Shwartz and Ben-David, Understanding Machine Learning, Section 2.3.1: Free PDF. Section 2.3.1, Finite Hypothesis Classes (pp. 37–40): the bad-hypothesis plus union-bound argument, ending in Corollary 2.3, m ≥ log(|H|/δ)/ε.
- Mohri, Rostamizadeh and Talwalkar, Foundations of Machine Learning (2nd ed.), Section 2.2: Free PDF linked from this page. Theorem 2.5 (p. 15): the same consistent-case bound with a slightly different proof and a worked example.
- NPTEL: Introduction to Machine Learning - IITKGP (IIT Kharagpur, Prof. Sudeshna Sarkar): Week 7: Sample Complexity: Finite Hypothesis Space, which derives the sample size needed for a consistent learner over a finite class.
Previous in Learning theory: A coin is tossed times and is the fraction of heads. Using Chebyshev with variance at most , and Hoeffding, bound for and . Which bound is tighter in each case? Also, for a non-negative with mean 50, what does Markov say about ?
Next in Learning theory: In the agnostic setting, why does empirical risk minimisation (ERM) return a hypothesis within of the best in when every satisfies ? What sample complexity does this give for finite , and how does the excess risk split into approximation and estimation error?