Glivenko–Cantelli theorem

In the theory of probability, the Glivenko–Cantelli theorem (sometimes referred to as the Fundamental Theorem of Statistics), named after Valery Ivanovich Glivenko and Francesco Paolo Cantelli, describes the asymptotic behaviour of the empirical distribution function as the number of independent and identically distributed observations grows. Specifically, the empirical distribution function converges uniformly to the true distribution function almost surely.

The uniform convergence of more general empirical measures becomes an important property of the Glivenko–Cantelli classes of functions or sets. The Glivenko–Cantelli classes arise in Vapnik–Chervonenkis theory, with applications to machine learning. Applications can be found in econometrics making use of M-estimators.

Statement
Assume that $$X_1,X_2,\dots$$ are independent and identically distributed random variables in $$\mathbb{R}$$ with common cumulative distribution function $$F(x)$$. The empirical distribution function for $$X_1,\dots,X_n$$ is defined by


 * $$F_n(x)=\frac{1}{n}\sum_{i=1}^n I_{[X_i, \infty)}(x) = \frac{1}{n}\ \bigl|\left\{\ i \ \mid X_i \leq x, \ 1 \leq i \leq n \right\}\bigr|$$

where $$I_C$$ is the indicator function of the set $$\ C ~.$$ For every (fixed) $$\ x\ ,$$ $$\ F_n(x)\ $$ is a sequence of random variables which converge to $$F(x)$$ almost surely by the strong law of large numbers. Glivenko and Cantelli strengthened this result by proving uniform convergence of $$\ F_n\ $$ to $$\ F ~.$$

Theorem
 * $$\|F_n - F\|_\infty = \sup_{x \in \mathbb{R}} \bigl|F_n(x) - F(x)\bigr| \longrightarrow 0$$ almost surely.

This theorem originates with Valery Glivenko and Francesco Cantelli, in 1933.


 * Remarks:
 * If $$\ X_n\ $$ is a stationary ergodic process, then $$F_n(x)$$ converges almost surely to $$\ F(x) = \operatorname\mathbb{E} \bigl[ 1_{X_1 \le x} \bigr] ~.$$ The Glivenko–Cantelli theorem gives a stronger mode of convergence than this in the iid case.
 * An even stronger uniform convergence result for the empirical distribution function is available in the form of an extended type of law of the iterated logarithm. See asymptotic properties of the empirical distribution function for this and related results.

Proof
For simplicity, consider a case of continuous random variable $$X$$. Fix $$-\infty =x_0<x_1<\cdots <x_{m-1}<x_m=\infty$$ such that $$F(x_j)-F(x_{j-1})=\frac{1}{m}$$ for $$j=1,\dots,m$$. Now for all $$x \in \mathbb{R}$$ there exists $$j \in \{1,\dots,m\}$$ such that $$x \in [x_{j-1},x_j]$$.


 * $$\begin{align}

F_n(x)-F(x) &\leq F_n(x_j)-F(x_{j-1}) = F_n(x_j)-F(x_j)+\frac1m,\\ F_n(x)-F(x) &\geq F_n(x_{j-1})-F(x_j) = F_n(x_{j-1})-F(x_{j-1})-\frac1m. \end{align} $$

Therefore,


 * $$\|F_n-F\|_\infty = \sup_{x\in \mathbb{R}}|F_n(x)-F(x)| \leq \max_{j\in\{1,\dots,m\}} |F_n(x_j)-F(x_j)| + \frac1m.$$

Since $\max_{j\in\{1,\dots,m\}} |F_n(x_j)-F(x_j)| \to 0 \text{ a.s.}$ by strong law of large numbers, we can guarantee that for any positive $\varepsilon$  and any integer $m$  such that $1/m<\varepsilon$, we can find $N$  such that for all $$n \geq N$$, we have $\max_{j\in\{1,\dots,m\}} |F_n(x_j)-F(x_j)|\leq \varepsilon-1/m \text{ a.s.}$. Combined with the above result, this further implies that $\|F_n-F\|_\infty \leq \varepsilon \text{ a.s.}$, which is the definition of almost sure convergence.

Empirical measures
One can generalize the empirical distribution function by replacing the set $$(-\infty,x]$$ by an arbitrary set C from a class of sets $$\mathcal{C}$$ to obtain an empirical measure indexed by sets $$C \in \mathcal{C}.$$


 * $$P_n(C)=\frac{1}{n} \sum_{i=1}^n I_C(X_i),  C\in\mathcal{C}$$

Where $$I_C(x)$$ is the indicator function of each set $$C$$.

Further generalization is the map induced by $$P_n$$ on measurable real-valued functions f, which is given by


 * $$f\mapsto P_nf=\int_Sf \, dP_n = \frac 1 n \sum_{i=1}^n f(X_i), f\in\mathcal{F}.$$

Then it becomes an important property of these classes whether the strong law of large numbers holds uniformly on $$\mathcal{F}$$ or $$\mathcal{C}$$.

Glivenko–Cantelli class
Consider a set $$\ \mathcal{S}\ $$ with a sigma algebra of Borel subsets $A$ and a probability measure $$\ \mathbb{P} ~.$$ For a class of subsets,


 * $$ \mathcal{C} \subset \bigl\{ C: C \text{ is measurable subset of }\mathcal{S} \bigr\} $$

and a class of functions


 * $$ \mathcal{F} \subset \bigl\{ f:\mathcal{S}\to \mathbb{R}, f \mbox{ is measurable}\ \bigr\} $$

define random variables


 * $$ \bigl\| \mathbb{P}_n - \mathbb{P} \bigr\|_{\mathcal C} = \sup_{C \in {\mathcal C}} \bigl| \mathbb{P}_n(C) - \mathbb{P}(C) \bigr| $$


 * $$ \bigl\| \mathbb{P}_n - \mathbb{P} \bigr\|_{\mathcal F} = \sup_{f \in {\mathcal F}} \bigl| \mathbb{P}_n f - \mathbb{P} f \bigr| $$

where $$\ \mathbb{P}_n(C)\ $$ is the empirical measure, $$\ \mathbb{P}_n f\ $$ is the corresponding map, and


 * $$\ \mathbb{P} f = \int_\mathcal{S} f \ \mathrm{d}\mathbb{P}\ ,$$ assuming that it exists.

Definitions
 * A class $$\ \mathcal C\ $$ is called a  Glivenko–Cantelli class  (or GC class, or sometimes strong GC class) with respect to a probability measure $P$ if
 * $$\ \bigl\| \mathbb{P}_n - \mathbb{P} \bigr\|_\mathcal{C} \to 0\ $$ almost surely as $$\ n \to \infty ~.$$


 * A class is $$\ \mathcal C\ $$ is a weak Glivenko-Cantelli class with respect to $P$ if it instead satisfies the weaker condition
 * $$\ \bigl\| \mathbb{P}_n - \mathbb{P} \bigr\|_\mathcal{C} \to 0\ $$ in probability as $$\ n \to \infty ~.$$


 * A class is called a universal Glivenko–Cantelli class if it is a GC class with respect to any probability measure $$\mathbb{P}$$ on $$(\mathcal{S}, A)$$.


 * A class is a weak uniform Glivenko–Cantelli class if the convergence occurs uniformly over all probability measures $$\mathbb{P}$$ on $$(\mathcal{S}, A)$$: For every $$\varepsilon > 0$$,
 * $$\ \sup_{\mathbb{P} \in \mathbb{P}(\mathcal{S},A)} \Pr\left(\bigl\| \mathbb{P}_n - \mathbb{P} \bigr\|_\mathcal{C} > \varepsilon\right) \to 0\ $$ as $$\ n \to \infty ~.$$


 * A class is a (strong) uniform Glivenko-Cantelli class if it satisfies the stronger condition that for every $$\varepsilon > 0$$,
 * $$\ \sup_{\mathbb{P} \in \mathbb{P}(\mathcal{S},A)} \Pr\left(\sup_{m \geq n} \bigl\| \mathbb{P}_m - \mathbb{P} \bigr\|_\mathcal{C} > \varepsilon\right) \to 0\ $$ as $$\ n \to \infty ~.$$

Glivenko–Cantelli classes of functions (as well as their uniform and universal forms) are defined similarly, replacing all instances of $$\mathcal{C}$$ with $$\mathcal{F}$$.

The weak and strong versions of the various Glivenko-Cantelli properties often coincide under certain regularity conditions. The following definition commonly appears in such regularity conditions:


 * A class of functions $$\mathcal{F}$$ is image-admissible Suslin if there exists a Suslin space $$\Omega$$ and a surjection $$T:\Omega \rightarrow \mathcal{F}$$ such that the map $$(x, y) \mapsto [T(y)](x)$$ is measurable $$\mathcal{X}\times\Omega$$.


 * A class of measurable sets $$\mathcal{C}$$ is image-admissible Suslin if the class of functions $$\{\mathbf{1}_C \mid C\in\mathcal{C}\}$$ is image-admissible Suslin, where $$\mathbf{1}_C$$ denotes the indicator function for the set $$C$$.

Theorems

The following two theorems give sufficient conditions for the weak and strong versions of the Glivenko-Cantelli property to be equivalent.

Theorem (Talagrand, 1987)
 * Let $$\mathcal{F}$$ be a class of functions that is integrable $$\mathbb{P}$$, and define $$\mathcal{F}_0 = \{f - \mathbb{P}f \mid f\in \mathcal{F}\}$$. Then the following are equivalent:


 * $$\mathcal{F}$$ is a weak Glivenko-Cantelli class and $$\mathcal{F}_0$$ is dominated by an integrable function
 * $$\mathcal{F}$$ is a Glivenko-Cantelli class

Theorem (Dudley, Giné, and Zinn, 1991)
 * Suppose that a function class $$\mathcal{F}$$ is bounded. Also suppose that the set $$\mathcal{F}_0 = \{f - \inf f \mid f\in \mathcal{F}\}$$ is image-admissible Suslin. Then $$\mathcal{F}$$ is a weak uniform Glivenko-Cantelli class if and only if it is a strong uniform Glivenko-Cantelli class.

The following theorem is central to statistical learning of binary classification tasks.

Theorem (Vapnik and Chervonenkis, 1968)
 * Under certain consistency conditions, a universally measurable class of sets $$\ \mathcal{C}\ $$ is a uniform Glivenko-Cantelli class if and only if it is a Vapnik–Chervonenkis class.

There exist a variety of consistency conditions for the equivalence of uniform Glivenko-Cantelli and Vapnik-Chervonenkis classes. In particular, either of the following conditions for a class $$\mathcal{C}$$ suffice:
 * $$\mathcal{C}$$ is image-admissible Suslin.
 * $$\mathcal{C}$$ is universally separable: There exists a countable subset $$\mathcal{C_0}$$ of $$\mathcal{C}$$ such that each set $$C\in\mathcal{C}$$ can be written as the pointwise limit of sets in $$\mathcal{C}_0$$.

Examples

 * Let $$S=\mathbb R$$ and $${\mathcal C}=\{(-\infty,t]:t\in {\mathbb R}\}$$. The classical Glivenko–Cantelli theorem implies that this class is a universal GC class. Furthermore, by Kolmogorov's theorem,
 * $$\sup_{P\in \mathcal{P}(S,A)}\|P_n-P\|_{\mathcal C} \sim n^{-1/2}$$, that is $$\mathcal{C}$$ is uniformly Glivenko–Cantelli class.


 * Let P be a nonatomic probability measure on S and $$\mathcal{C}$$ be a class of all finite subsets in S. Because $$A_n=\{X_1,\ldots,X_n\}\in \mathcal{C}$$, $$P(A_n)=0$$, $$P_n(A_n)=1$$, we have that $$\|P_n-P\|_{\mathcal C}=1$$ and so $$\mathcal{C}$$ is not a GC class with respect to P.