Show that for a finite hypothesis class H in the realisable setting, any learner that outputs a hypothesis consistent with the training data is PAC with m≥1ϵ(ln⁡∣H∣+ln⁡1δ) samples. How many samples are needed when ∣H∣=106, ϵ=0.05 and δ=0.01?

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 LD(h) for the true error of h on the data distribution D. A fixed h with LD(h)>ϵ is consistent with m i.i.d. samples with probability less than (1−ϵ)m≤e−ϵm. A union bound over at most ∣H∣ bad hypotheses gives failure probability at most ∣H∣e−ϵm; set this ≤δ and solve for m.

Steps

  1. Define the bad hypotheses HB={h∈H:LD(h)>ϵ}. A consistent learner fails only if some h∈HB has zero training error.
  2. For one h∈HB: each sample is classified correctly with probability less than 1−ϵ, so Pr⁡[h consistent on all m]<(1−ϵ)m≤e−ϵm, using 1−x≤e−x.
  3. Union bound: Pr⁡[∃h∈HB consistent]≤∣HB∣ e−ϵm≤∣H∣ e−ϵm.
  4. Solve ∣H∣ e−ϵm≤δ: m≥1ϵ(ln⁡∣H∣+ln⁡1δ).
  5. Numbers: ln⁡106≈13.82 and ln⁡100≈4.61, sum 18.42; divided by 0.05 this is 368.4, so m=369.
  6. Interpret: m grows only logarithmically in ∣H∣, and as 1/ϵ rather than the 1/ϵ2 needed in the agnostic case.

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Learning theory: A coin is tossed n=100 times and p^ is the fraction of heads. Using Chebyshev with variance at most 1/4, and Hoeffding, bound P(∣p^−p∣≥ϵ) for ϵ=0.1 and ϵ=0.2. Which bound is tighter in each case? Also, for a non-negative X with mean 50, what does Markov say about P(X≥100)?
Next in Learning theory: In the agnostic setting, why does empirical risk minimisation (ERM) return a hypothesis within ϵ of the best in H when every h∈H satisfies ∣LS(h)−LD(h)∣≤ϵ/2? What sample complexity does this give for finite H, and how does the excess risk split into approximation and estimation error?