Tutorials › Statistical Theory I - Probability and Distribution Theory › Uniform Concentration Over a Finite Function Class

Concentration and Exponential Bounds · Tutorial 942 of 994

Uniform Concentration Over a Finite Function Class

Learn how to turn pointwise Hoeffding bounds into a simultaneous guarantee over a finite function class, and how to calibrate the deviation threshold.

Advanced 9 min read

What You'll Learn

  • Define empirical averages and uniform deviation over a fixed finite class
  • State the Hoeffding-based bound for functions with individual range widths
  • Prove the simultaneous bound using a union bound
  • Calibrate a deviation threshold from a desired failure probability
  • Apply the result to finite threshold classes and bounded losses
  • Recognize why the bound does not require independence across functions

From Pointwise Accuracy to Uniform Accuracy

Suppose a statistician considers several possible functions of the same observations. A concentration inequality for one fixed function controls its empirical average, but it does not by itself guarantee that all the functions are accurate at once. The distinction matters whenever a function is selected after examining the data: a pointwise guarantee for a function chosen in advance need not apply to the selected one.

For a finite class, a direct route to simultaneous control is to apply a pointwise Hoeffding bound to each function and then use the union bound. The resulting guarantee reveals how the size of the class affects the deviation threshold. No independence between the different functions’ empirical averages is needed; they may all be computed from the same sample.

Empirical Averages and Uniform Deviation

Definition: Let \(Z_1,\ldots,Z_n\) be independent and identically distributed random elements with common distribution \(P\). For a measurable function \(f\) with finite expectation, define \(Pf=E[f(Z_1)]\) and \(P_n f=n^{-1}\sum_{i=1}^n f(Z_i)\). For a fixed finite class \(\mathcal{F}\) of such functions, its uniform deviation is \(\sup_{f\in\mathcal{F}}|P_n f-Pf|\). Since the class is finite, this supremum is a maximum.

The class \(\mathcal{F}\) is fixed independently of the observations. Assume each \(f\in\mathcal{F}\) is bounded, with deterministic bounds \(a_f\leq f(z)\leq b_f\) almost surely under \(P\), and write \(c_f=b_f-a_f\) for its range width. The bounds may differ from one function to another.

For one fixed function, Hoeffding’s inequality gives an exponential tail bound for its empirical average. The uniform result below combines those pointwise guarantees. Its cost depends on the number of functions because a larger class creates more opportunities for at least one deviation to be large.

The Finite-Class Hoeffding Bound

Theorem: Under the conditions above, for every \(\varepsilon>0\),
$$ P\!\left(\sup_{f\in\mathcal{F}}|P_n f-Pf|\geq \varepsilon\right) \leq 2\sum_{f\in\mathcal{F}}\exp\!\left(-\frac{2n\varepsilon^2}{c_f^2}\right), $$
where a function with \(c_f=0\) has zero deviation almost surely and contributes zero to the bound. In particular, if every function takes values in a common interval of width \(c>0\), and \(M=|\mathcal{F}|\), then
$$ P\!\left(\sup_{f\in\mathcal{F}}|P_n f-Pf|\geq \varepsilon\right) \leq 2M\exp\!\left(-\frac{2n\varepsilon^2}{c^2}\right). $$

The factor \(2\) accounts for deviations in either direction, and \(M\) counts the functions when a common range width is used. The displayed upper bound is valid even if its numerical value exceeds one; in that case it can be replaced by the trivial probability bound \(1\).

1
Control one function.
For fixed \(f\), the variables \(f(Z_1),\ldots,f(Z_n)\) are independent and lie in an interval of width \(c_f\). Hoeffding’s inequality therefore bounds the probability that \(|P_n f-Pf|\geq\varepsilon\).
2
Describe the failure event.
The maximum deviation is at least \(\varepsilon\) exactly when at least one function in the finite class has deviation at least \(\varepsilon\).
3
Add the pointwise probabilities.
The union bound gives a simultaneous guarantee without requiring the deviations for different functions to be independent.

Proof. For each \(f\in\mathcal{F}\) with \(c_f>0\), Hoeffding’s inequality for independent bounded variables gives

$$ P\!\left(|P_n f-Pf|\geq\varepsilon\right) \leq 2\exp\!\left(-\frac{2n\varepsilon^2}{c_f^2}\right). $$

If \(c_f=0\), then \(f(Z_i)=a_f\) almost surely for every \(i\), so \(P_n f=Pf=a_f\) almost surely. Now the event that the maximum deviation is at least \(\varepsilon\) is the union of the events \(\{|P_n f-Pf|\geq\varepsilon\}\) over \(f\in\mathcal{F}\). By the union bound, its probability is at most the sum of their probabilities. Substituting the pointwise bounds gives the claimed inequality. If all widths equal \(c\), the sum has \(M\) terms, each bounded by \(2\exp(-2n\varepsilon^2/c^2)\), which gives the common-width result. \(\square\)

Choosing a Threshold for a Desired Guarantee

The common-width inequality can be rearranged to give a deviation threshold for a specified failure probability. If all functions take values in an interval of width \(c>0\), then for any \(0<\delta<1\),

$$ P\!\left( \sup_{f\in\mathcal{F}}|P_n f-Pf| \geq c\sqrt{\frac{\log(2M/\delta)}{2n}} \right) \leq \delta. $$

Indeed, substituting \(\varepsilon=c\sqrt{\log(2M/\delta)/(2n)}\) into the bound makes its right-hand side \(2M\exp[-\log(2M/\delta)]=\delta\). The threshold grows with the logarithm of the class size, rather than linearly with that size. Increasing the sample size reduces the threshold at the rate \(n^{-1/2}\).

Worked Example: Five Bounded Functions

Let \(\mathcal{F}\) contain five fixed functions, each taking values in \([0,1]\), and let \(n=100\). Bound the probability that any empirical average differs from its expectation by at least \(0.2\).

Here \(M=5\), \(c=1\), and \(\varepsilon=0.2\). The exponent is \(2n\varepsilon^2=2(100)(0.2)^2=200(0.04)=8\). Therefore

$$ P\!\left(\sup_{f\in\mathcal{F}}|P_n f-Pf|\geq 0.2\right) \leq 2(5)e^{-8} =10e^{-8} \approx 0.00335. $$

Thus the probability of at least one such deviation is at most about \(0.00335\), or \(0.335\%\). This is an upper bound, not a claim that the probability equals that value.

Worked Example: Empirical Distribution Values on a Fixed Grid

Let \(Z_1,\ldots,Z_{200}\) be independent observations from a distribution on the real line. Consider the four fixed functions \(f_j(x)=\mathbf{1}\{x\leq t_j\}\), for four specified thresholds \(t_1,\ldots,t_4\). Each function takes values in \([0,1]\), and \(P_n f_j\) is the empirical distribution function evaluated at \(t_j\). Bound the probability that at one or more of these four thresholds the empirical distribution function differs from its expectation by at least \(0.1\).

There are \(M=4\) functions, \(c=1\), \(n=200\), and \(\varepsilon=0.1\). The exponent is \(2(200)(0.1)^2=400(0.01)=4\). Hence

$$ P\!\left(\max_{1\leq j\leq 4}|P_n f_j-Pf_j|\geq 0.1\right) \leq 2(4)e^{-4} =8e^{-4} \approx 0.1465. $$

This calculation gives simultaneous control at these four fixed thresholds. It does not, by itself, give a bound over every real threshold: the theorem here assumes a finite function class.

Worked Example: Calibrating a Uniform Error Level

Suppose a fixed class of \(20\) functions all takes values in \([0,1]\), and \(n=100\). Find a threshold that guarantees the probability of any deviation at least that large is no more than \(0.05\).

Set \(M=20\), \(c=1\), and \(\delta=0.05\) in the threshold formula. Since \(2M/\delta=40/0.05=800\),

$$ \varepsilon =\sqrt{\frac{\log(800)}{2(100)}} =\sqrt{\frac{6.6846\ldots}{200}} \approx 0.1828. $$

Substitution verifies the guarantee: \(2M\exp(-2n\varepsilon^2)=40\exp[-\log(800)]=40/800=0.05\). Therefore \(P(\sup_{f\in\mathcal{F}}|P_n f-Pf|\geq 0.1828)\leq 0.05\), with the unrounded threshold understood in the inequality.

Different Range Widths and Interpretation

When the functions have substantially different ranges, retaining the individual widths can sharpen the result. A function with a narrow range has a stronger pointwise Hoeffding bound at the same \(\varepsilon\), and the theorem sums these separate bounds rather than replacing all widths by the largest one. This refinement is useful only when the actual deterministic range widths are known.

Worked Example: Two Functions With Different Ranges

Suppose a class has two functions: \(f_1\) takes values in \([0,1]\), while \(f_2\) takes values in \([0,2]\). With \(n=50\), bound the probability that either function deviates from its expectation by at least \(0.3\).

The range widths are \(c_1=1\) and \(c_2=2\). For \(f_1\), the exponent is \(2(50)(0.3)^2=9\). For \(f_2\), it is \(2(50)(0.3)^2/(2)^2=9/4=2.25\). The range-specific bound is therefore

$$ P\!\left(\max_{j=1,2}|P_n f_j-Pf_j|\geq 0.3\right) \leq 2e^{-9}+2e^{-2.25} \approx 0.000247+0.2108 \approx 0.2110. $$

Using the common width \(2\) instead would give \(4e^{-2.25}\approx0.4216\). Keeping the narrower range for \(f_1\) makes the bound smaller, while the wider-range function still dominates the total.

Why the Union Bound Works—and Its Limits

The empirical averages for different functions are generally dependent because they are calculated from the same observations. That dependence does not obstruct this argument: the union bound applies to any finite collection of events, whether independent or not. What matters for the pointwise Hoeffding step is that, for each fixed function, the observations \(f(Z_1),\ldots,f(Z_n)\) are independent and bounded.

The theorem controls a maximum over a class fixed in advance. If the class itself is selected using the observed data, it is not automatically a fixed finite class to which this result applies. One safe use of the theorem is to choose a function from a fixed finite class after seeing the data: on the event that every function in the class is within \(\varepsilon\) of its expectation, the selected function is too. The class-size factor pays for this simultaneous guarantee.

Common Mistake

A frequent error is to quote the pointwise Hoeffding bound for one function and then claim the same failure probability for the maximum over \(M\) functions. The event that some function has a large deviation contains each individual deviation event, so its probability generally needs to account for all \(M\) possibilities. Applying the union bound introduces the factor \(M\) (and the factor \(2\) for two-sided deviations). Omitting these factors does not establish a simultaneous guarantee.

Key takeaway: For a fixed finite class of \(M\) functions with common range width \(c\), pointwise Hoeffding concentration and a union bound give a uniform deviation scale of order \(c\sqrt{\log(M/\delta)/n}\) with failure probability at most \(\delta\).

Check Your Understanding

Use the theorem and its assumptions to answer the following.

  1. For \(M\) functions taking values in \([0,1]\), write the bound on the probability that the maximum absolute deviation is at least \(\varepsilon\).
  2. Why does the union-bound argument not require the empirical deviations of different functions to be independent?
  3. If all functions in a class have range width \(c\), how does the threshold for failure probability \(\delta\) depend on \(M\) and \(n\)?
  4. Four fixed functions have range widths \(1,1,2,2\). For \(n=40\) and \(\varepsilon=0.25\), write the range-specific bound before evaluating it.
  5. Why does applying a finite-class bound to four fixed threshold functions not automatically control the empirical distribution function at every real threshold?