SStatistics, Built

Stage IV · PhD Core

Part 48 of 65

Empirical Processes

PhDstarts at this level54 min of film14 chaptersprerequisites: Part 43, Part 44, Part 47

When does an average converge uniformly over a whole class of functions, and at what rate?

In 1949 Doob guesses that root n times the gap between the empirical and the true distribution functions behaves like a Brownian bridge, so that Kolmogorov's 1933 law is the law of the bridge's largest absolute value; Donsker proves it in 1952. The part turns the guess into a theory. An empirical distribution function is an average of indicators, so the question becomes for which classes of functions the law of large numbers and the central limit theorem hold uniformly. Symmetrization and Rademacher averages give Glivenko-Cantelli classes, VC dimension counts patterns, covering and bracketing numbers measure a class's size, and Dudley's chaining, drawn as refining nets on a Brownian path, turns entropy into a uniform CLT. The theory is then put to work: Talagrand's concentration, the functional delta method for quantiles and Kaplan-Meier, the footprint an estimated nuisance parameter leaves, cube-root rates and Chernoff's distribution, and empirical risk minimization. It ends where it began: the bootstrap empirical process, and the Kolmogorov-Smirnov test with estimated parameters, where Kolmogorov's table gives a 5% test a size near zero and Durbin's process with a parametric bootstrap repairs it.

What you need. Part 43's weak convergence, Part 44's Brownian motion and Donsker's principle for random walks, and Part 47's delta method and bootstrap.

Hook
Doob's heuristic, 1949
Mathematics
Glivenko–Cantelli and Donsker classes, symmetrization, VC, entropy and bracketing, chaining, Talagrand, the functional delta method, rates and cube-root asymptotics
Built
statkit.empirical

What you will be able to do

Bachelor's

  • Explain Doob's heuristic: what the scaled gap between the empirical and true distribution functions looks like, and why its largest value has one law for every continuous distribution.
  • Read a Kolmogorov-Smirnov band around an empirical distribution function.

Master's

  • Compute growth functions of half-lines, intervals and half-planes and compare them with the Sauer-Shelah bound.
  • Bound an expected uniform deviation by a Rademacher average and by Massart's finite-class lemma.
  • Compute a covering number and evaluate Dudley's entropy integral for a simple class.

PhD

  • Prove the symmetrization inequality and the Glivenko-Cantelli theorem for a VC class.
  • Prove Dudley's bound by chaining, and state the uniform-entropy and bracketing conditions under which a class is Donsker.
  • Derive the limit of a Z-estimator when a nuisance parameter is estimated, and state the rate theorem that gives cube-root asymptotics.

Practice

  • Calibrate a goodness-of-fit test with fitted parameters by a parametric bootstrap, not by Kolmogorov's table.
  • Choose a confidence band for a distribution function (exact, DKW, bootstrap) knowing which undercovers at small n.
  • Read a uniform-deviation bound for a classifier and say why the actual excess risk is usually far below it.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Bachelor's 6 min · Master's 13 min · PhD 54 min · Practice 13 min.

  1. 0Doob's heuristic, 1949Bachelor's4 min
  2. 1Glivenko-Cantelli classesPhD4 min
  3. 2VC classesPhD4 min
  4. 3Entropy and bracketingPhD4 min
  5. 4ChainingPhD5 min
  6. 5Donsker classesPhD4 min
  7. 6Maximal inequalitiesPhD4 min
  8. 7The functional delta methodPhD4 min
  9. 8Z-estimators with nuisance parametersPhD4 min
  10. 9Rates of convergencePhD4 min
  11. 10Uniform laws at work: learningPractice3 min
  12. 11The bootstrap empirical processPhD3 min
  13. 12KS with estimated parameters, done rightPractice4 min
  14. Recap, problems, and the road aheadAll tracks2 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Doob's heuristic, 1949Bachelor's4 min

In 1933 Andrei Kolmogorov found the limiting law of the largest gap between an empirical distribution function and the true one, scaled by root n, by a long and difficult calculation. In 1949 Joseph Doob made a guess. Root n times the gap, as a function of x, behaves like a Brownian bridge, a Brownian motion pinned to zero at both ends. So its largest absolute value should behave like the largest absolute value of the bridge, and Kolmogorov's law should simply be the law of that maximum. Three years later Monroe Donsker proved it: a central limit theorem, not for a number, but for an entire random function. Making the proof airtight took Skorokhod and Dudley, and what they built became the theory of empirical processes, which now sits underneath most of modern statistics and machine learning.

Take uniform data, so that the true distribution function is the diagonal, and draw root n times the gap between the empirical and the true distribution functions. With twenty points it is a staircase: it jumps up by one over root n at each data point and slides down in between. With two hundred the steps are finer, and with five thousand the sampled path looks increasingly like a bridge. These are finite-grid drawings; each empirical path still has finitely many jumps. Beside it, a Brownian bridge: comparable coarse-scale fluctuations, the same pinning at zero and one, and the same variance, u times one minus u, at each point.

Now the largest gap itself, simulated twenty thousand times. With five observations its ninety-fifth percentile is ; with a hundred, . The white curve is the density of the largest absolute value of a Brownian bridge, Kolmogorov's distribution, with ninety-fifth percentile . Doob's guess is right. And because the probability integral transform turns any continuous distribution into the uniform, for iid observations the same law holds whatever continuous F is: the test is distribution-free.

The general idea is a change of viewpoint. The empirical distribution function at x is an average: the average of an indicator function over the sample. So instead of one average, consider many at once: the empirical process, root n times the gap between the sample average and the true mean, as a function of f running over a whole class of functions. Distribution functions are the class of indicators of half-lines. The question of this part is: for which classes do the law of large numbers and the central limit theorem hold uniformly over the class, and at what rate? It matters because so much of statistics takes a supremum over a class: the consistency of M-estimators, the bootstrap, confidence bands, and the theory of classifiers.

Three promises are due. Part eight used the plug-in principle, that the empirical distribution converges to the true one uniformly; chapters one and two prove it, and much more. Part forty-four stated Donsker's invariance principle for random walks; chapters four and five explain the empirical-process proof strategy and state the entropy theorems with their assumptions. And Part forty-seven twice pointed here: for the uniform law of large numbers behind consistency, and for the bootstrap empirical process. Those arrive in chapters seven, eleven and twelve.

Numbers: 95th percentile of √n D_n: 1.25 (n = 5), 1.34 (n = 100); Kolmogorov 1.358

1Glivenko-Cantelli classesPhD4 min

Glivenko–Cantelli classes: a law of large numbers for a whole class at once. Write P n f for the sample average of f and P f for its true mean, and take the largest gap between them over a class of functions F. The class is called Glivenko–Cantelli if that largest gap goes to zero almost surely: a law of large numbers holding uniformly over the class. The class of indicators of half-lines is the original example. Valery Glivenko and Francesco Cantelli proved in 1933 that the empirical distribution function converges to the true one uniformly. But not every class works. Take indicators of all finite sets. For continuous data the true probability of any finite set is zero, while the sample itself is a finite set with empirical probability one. The gap is one, always. The class is too rich: it can fit any sample exactly.

Here is the theorem happening. Three long sequences of uniform draws. For each, follow the largest gap as the sample grows from one to five thousand. Every path goes to zero: almost sure convergence, path by path, not just in probability. The paths shrink at about the rate of root log log n over n, which is Kai Lai Chung's law of the iterated logarithm for this statistic, from Part forty-four's family of results.

How is such a theorem proved? By symmetrization, an idea that goes back to Vapnik and Chervonenkis in 1971. Introduce a ghost sample, an independent copy of the data. By Jensen's inequality the expected gap is at most the expected gap between the two empirical measures. Now the difference for each i is symmetric: swapping X i with its ghost changes nothing in law. So we may multiply each term by an independent random sign. Splitting the two halves, the expected gap is at most twice the Rademacher average of the class: the expected largest correlation between the class and pure noise. The gain is that, with the data held fixed, the supremum is over the finite set of patterns the class can produce on the sample. For indicator classes there are at most two to the n binary patterns. Real-valued classes can have infinitely many sample vectors and need metric approximations instead.

For half-lines the Rademacher average can be computed exactly. With the data sorted, the patterns are the n plus one prefixes, so the supremum is the largest partial sum of n random signs, a random walk's maximum, which a killed-walk spectral sum evaluates without simulation. In blue, the expected Kolmogorov distance, simulated: at a thousand observations, . In gold, twice the Rademacher average: , above it as promised. On log scales both are straight lines of slope minus a half: the uniform law holds at the root n rate. And root n times the expected distance converges to the mean of Kolmogorov's law, root pi over two times log two.

To bound the Rademacher average of a finite class, Pascal Massart's lemma: for k functions bounded by one it is at most the root of two log two k over n. The price of k candidates is only logarithmic. Conditionally on the sample, an indicator class has finitely many binary patterns. If there are at most pi of n patterns on n points, the same bound holds with pi of n in place of k. So if the number of patterns grows only polynomially in n, the expected gap is of order root log n over n, and the class is Glivenko–Cantelli. If it grows like two to the n, every labelling is possible, the class can fit noise, and this counting bound need not tend to zero. Infinite VC dimension alone does not imply failure for every fixed distribution. Counting patterns is the subject of chapter two.

Numbers: E D_n = 0.0272 vs 2R_n = 0.0783 at n = 1,000; √n E D_n → √(π/2) log 2 = 0.869

2VC classesPhD4 min

VC classes: counting the patterns a class can draw. For a class of sets, count how many different subsets of n points it can pick out, and take the most over all configurations of the points. That is the growth function. If the class picks out all two to the n subsets, it shatters the points. The VC dimension, after Vladimir Vapnik and Alexey Chervonenkis in 1971, is the largest number of points the class can shatter. Half-lines have VC dimension one, intervals two, half-planes three, axis-parallel rectangles four, and half-spaces in d dimensions d plus one.

Here is why half-planes have dimension three. Three points in general position: every one of the eight labellings, from none to all, is cut out by some half-plane. The brute-force count agrees: . But no four points can be shattered. For a square, the labelling that takes opposite corners cannot be separated by a line, and brute force finds only of the sixteen patterns. In general Radon's theorem says any four points in the plane split into two groups whose convex hulls intersect, and no half-plane can contain one group and miss the other.

Counting by brute force on points in the plane: half-lines pick out n plus one subsets, intervals n times n plus one over two plus one, and half-planes n times n minus one plus two, Thomas Cover's count. Rectangles, on random points, pick out more, but still far fewer than all subsets in the last column. The pattern is a theorem, proved independently by Norbert Sauer and Saharon Shelah in 1972: once no configuration of V plus one points can be shattered, its growth function is at most the sum of the binomial coefficients up to V, a polynomial of degree V. There is no middle ground between polynomial and exponential growth.

On a log scale the difference is stark. Measured in bits, the set of all subsets grows linearly, one bit per point. Half-lines grow like log n, half-planes like two log n, and rectangles at most four log n plus a constant asymptotically, each hugging the diagonal until its VC dimension and peeling away after. Plugged into chapter one's bound, logarithmic growth gives a uniform law of large numbers at rate root of V log n over n. The VC dimension is the complexity that counts.

VC classes are small in a stronger sense too. David Haussler showed that a class of dimension V can be covered by about one over epsilon to the two V balls of radius epsilon in L two of any probability measure. So a VC class is Glivenko–Cantelli for every underlying distribution at once. The idea extends to functions through their subgraphs: finite dimensional vector spaces are VC-subgraph, as are their images under a fixed monotone transformation. Uniform laws for unbounded functions also require an integrable envelope. But beware counting parameters. The class of indicators of sine of omega x being positive has one parameter and infinite VC dimension: with a high enough frequency it can realise any labelling of suitably placed points. Complexity is about what a class can do, not how it is written down.

Numbers: half-planes: n(n − 1) + 2 (92 at n = 10); 3 points shattered (8), a square not (14 of 16)

3Entropy and bracketingPhD4 min

Entropy and bracketing: measuring a class by how many balls it takes to cover it.

VC dimension counts patterns. A finer measure of size asks how many balls of radius epsilon it takes to cover the class in some norm. That is the covering number; its logarithm is the metric entropy, a name Kolmogorov chose deliberately. A variant uses brackets: pairs of functions, a floor l and a ceiling u, at most epsilon apart in L two of P, such that every function in the class lies between the floor and the ceiling of some bracket. Brackets turn a uniform statement into finitely many ordinary ones: a function sandwiched between l and u has its empirical gap sandwiched between theirs, up to epsilon. With measurable integrable bracket endpoints, finitely many L-one brackets at every epsilon make the class Glivenko–Cantelli, by the ordinary law of large numbers applied to the brackets.

The half-lines show how brackets work. Cut the line at points that split the probability into pieces of mass epsilon squared. The floor of a bracket is the indicator of the half-line up to the left cut, and its ceiling the indicator up to the right cut. Every half-line ending in between lies between them. The two differ only on a piece of probability epsilon squared, so they are epsilon apart in L two, and one over epsilon squared brackets cover the whole class. That is the proof of the Glivenko–Cantelli theorem in four lines.

We can count nets directly, greedily: pick an uncovered function, remove everything within epsilon of it, and repeat. For the half-lines on our finite 801-point approximation to L two of the uniform distribution, the greedy net size grows roughly like one over epsilon squared, so the entropy grows only like two log one over epsilon: at epsilon one twentieth, balls. For a finite sample of twenty thousand random one-Lipschitz functions, observed on a 61-point grid in the maximum norm, the entropy grows like one over epsilon itself, linearly on this chart: at epsilon point oh eight, balls. These greedy nets cover only the finite sampled class; they are neither minimal covering numbers nor upper bounds for the full Lipschitz ball. These are the two regimes. VC-type classes have logarithmic entropy; smoothness classes of functions of d variables with alpha derivatives have entropy one over epsilon to the d over alpha.

A small catalogue. Indicator VC classes have uniform covering entropy bounded by a constant times V log one over epsilon; this is a covering bound, not a general VC bracketing formula. Monotone functions with values in the unit interval, and Lipschitz functions, have entropy of order one over epsilon; for Lipschitz functions the result goes back to Kolmogorov and Tikhomirov in 1959. Smooth functions of d variables with alpha derivatives have one over epsilon to the d over alpha. For convex sets in a bounded regular region under a regular density, the L-two bracketing entropy has dimension-dependent polynomial growth. Chapter five will show that a class is Donsker, satisfying a uniform central limit theorem, when the root of the bracketing entropy is integrable at zero: when the actual entropy integral is finite and the envelope is square integrable. A strict power exponent below two suffices; little-oh of epsilon to the minus two alone does not. For bounded smoothness balls on compact domains, smoothness above half the dimension is a sufficient condition. The convex-set dimension statements shown require the stated regular geometric and distributional setting.

Numbers: half-lines: 267 balls at ε = 0.05 (brackets 400); Lipschitz: 320 balls at ε = 0.08

4ChainingPhD5 min

Chaining: Dudley's refining nets. The basic tool for a maximum of N Gaussians with standard deviation sigma is the union bound: the expected maximum is at most sigma times the root of two log N. Apply it to Brownian motion on a grid of two to the K points. Each value has variance at most one, so the bound is the root of two K log two, which grows without limit as the grid is refined. Yet the true expected supremum over the whole interval is finite: root two over pi, about point eight, by Part forty-four's reflection principle. The union bound wastes its strength because neighbouring values are nearly equal, and it treats them as if they were independent.

Richard Dudley's chaining, from 1967, uses the correlation. Build nets that refine: at level zero, the two endpoints; at each later level, add the midpoints of the previous cells, so that level k has two to the k cells. Tie every new point to its parent, the nearest point of the coarser net, which is two to the minus k away. Then the value at any point is the value at the coarsest level plus a chain of links down the tree, and the link at level k is a Brownian increment over a distance two to the minus k, with standard deviation two to the minus k over two.

Here is a Brownian path. Seen at level zero it is a single chord from zero to its endpoint. At level one, add the midpoint; at level two, the quarter points; and so on: each picture refines the last. The gold segments are midpoint corrections relative to the chord joining both neighbouring parents. This interpolation version has slightly smaller variances than the single-parent tree. At level k there are two to the k minus one of them, each of size about two to the minus k plus one over two in standard deviation. The number grows but the sizes shrink faster. So the supremum of the path is at most the maximum at the coarsest level plus, for each level, the positive part of the largest midpoint correction. Including zero matters: keeping the old grid points must never lower a maximum. Apply the union bound level by level, where it is cheap, and add up.

Compare. In red, the union bound applied in one step to the whole net: it climbs without limit as the net refines. In blue, the expected maximum over the net, simulated: it rises to at a thousand and twenty-five points and is closing on root two over pi. In purple, the chaining bound, summed level by level: it converges, to . It is loose, but it is finite, and it stays finite as the net becomes the whole interval. Chaining trades the right answer for the right order, and in empirical-process theory the order is what matters.

The same argument works for any process whose increments are sub-Gaussian in some metric: at level k, the net is an epsilon net with epsilon two to the minus k, and each link is at most twice that in the metric. The union bound at each level gives a sum, over levels, of the link size times the root of the log of the number of links. And that sum is, up to constants, an integral: Dudley's entropy integral, the area under the root of the metric entropy. For Brownian motion the natural metric is the root of the distance in time, N of epsilon is about one over epsilon squared, and the integral is finite: root pi over two. For a separable sub-Gaussian process, the entropy condition gives a bounded uniformly continuous version in the increment metric. For the empirical process, the same integral, with the class's entropy, is the condition of the next chapter.

Numbers: E max over 2^K + 1 points → 0.788 (K = 10) vs √(2/π) = 0.798; union bound 3.72; chaining sum 3.85

5Donsker classesPhD4 min

Donsker classes: a central limit theorem, uniformly over a class. The empirical process is a random function on the class. At finitely many functions it is asymptotically normal by the ordinary multivariate central limit theorem, with the covariances of the functions as its covariance. That part needs square integrability of the functions. A class is Donsker if the whole process converges, as a random element of the space of bounded functions on the class, to a tight Gaussian process called the P Brownian bridge. The extra ingredient is tightness: the process must not oscillate wildly between nearby functions. Then, by the continuous mapping theorem, its supremum converges to the Gaussian supremum, and so does every other continuous functional of it: Doob's heuristic made into a theorem.

Tightness comes down to asymptotic equicontinuity: the process's largest increment between functions closer than delta must vanish as delta shrinks. And that is exactly what chaining controls. With brackets: with a square-integrable envelope and the usual measurability conditions, a finite bracketing entropy integral makes the class Donsker, a theorem of Mina Ossiander's. Without brackets: if the uniform entropy integral is finite, the class is Donsker, with the entropy measured in the worst probability measure, relative to a square-integrable envelope F, with the required measurability. That is due to David Pollard, building on Dudley. VC classes have uniform entropy V log one over epsilon, whose root is integrable, so measurable indicator VC classes are Donsker for every distribution. VC-subgraph function classes also need a square-integrable envelope. The half-lines are one, and the Kolmogorov–Smirnov limit follows.

How good is the limit? The exact finite-sample law of the Kolmogorov statistic is known, and computable to full precision by an algorithm of Marsaglia, Tsang and Wang. Its ninety-five percent point, times root n, is at five observations and at a hundred, rising toward Kolmogorov's . So the limit's critical value is a little too big, and a test using it has true size percent at five observations and at fifty: conservative, but close.

A real example. The waiting times between eruptions of Old Faithful, in Yellowstone, from the Museum. Their empirical distribution function, and around it an iid-reference asymptotic ninety-five percent band for a distribution function: plus or minus Kolmogorov's quantile over root n, . These recorded waits are rounded and may be dependent, so the iid band is a descriptive reference rather than guaranteed coverage for the geyser. The normal distribution with the sample's mean and standard deviation does not stay inside: its largest distance from the data is , nearly twice the band's half-width, because the waits are bimodal. Strictly, testing a fitted normal needs the correction of chapter twelve, but this one fails by a wide margin.

Being Donsker is a stronger property than being Glivenko–Cantelli: it fixes the rate, one over root n, and the limiting law. Some classes are Glivenko–Cantelli without being Donsker: smoothness classes whose smoothness is no more than half the dimension, or the convex sets in four or more dimensions. In suitable regular examples uniform consistency holds with slower rates. Failure to be Donsker alone does not determine a rate, which is where chapter nine's rates come from. Donsker classes are what make the root n theory of M-estimators, the bootstrap and confidence bands work, and the next chapters use them for all three.

Numbers: exact 95% point √n D_n: 1.260, 1.315, 1.340 (n = 5, 20, 100); Old Faithful band ±0.082, D(normal) = 0.155

6Maximal inequalitiesPhD4 min

Maximal inequalities: how tightly the supremum sits around its mean. For a single bounded function, Bernstein's inequality bounds the tail of a centred sum: Gaussian with variance n sigma squared for moderate deviations, exponential for large ones. For the supremum over a class there are two separate problems: the size of its expectation, which chaining controls, and how far it fluctuates around that expectation. Part forty-four's McDiarmid inequality handles the fluctuation, for the indicator classes used here, since changing one observation moves the supremum of centred sums by at most one. But it cannot see the variance: it treats every function as if it had the largest possible spread. What one wants is Bernstein's inequality, holding uniformly over the class, with the largest variance in the class in place of sigma squared.

Michel Talagrand proved exactly that in 1996, and Olivier Bousquet in 2002 found the sharp constants. With sigma squared the largest variance in the class, and v equal to n sigma squared plus twice b times the expected supremum, the supremum exceeds its mean by more than root two x v plus b x over three with probability at most e to the minus x. Read it as: the supremum is its expectation plus a fluctuation of the order of the largest single standard deviation, with Bernstein-type tails: a Gaussian moderate-deviation term and a linear large-deviation term. The class's complexity enters only through the expectation and the largest variance. The concentration around the mean comes for free. For the Kolmogorov statistic there is an even sharper special result, the Dvoretzky–Kiefer–Wolfowitz inequality, with the constant two found by Pascal Massart in 1990: the tail of root n D n is at most twice e to the minus two t squared, for every n.

The tails for the Kolmogorov statistic, a hundred uniform observations, on a log scale. The estimated expected value of n D n is . In blue, the simulated chance of exceeding that by t. McDiarmid's bound in red, Bousquet's in purple. For this class the largest variance is a quarter, as large as it can be, so Bousquet has nothing to exploit, and his bound is the weaker of the two here. And in green the Dvoretzky–Kiefer–Wolfowitz bound, which uses everything about this particular class, and is tightest here. We estimated the centring expectation from forty thousand samples; these plotted plug-in comparisons are not certified finite-sample bounds.

Bousquet's bound earns its keep when the variances are small. Take the half-lines that end before two percent of the probability: every function in the class has variance below two percent. The table compares simulated fluctuation quantiles with bounds evaluated at estimated expectations. It illustrates the variance effect, with centring Monte Carlo error. For all half-lines, the simulated point is ; McDiarmid says and Bousquet . For the small-variance class the simulated point drops to . McDiarmid cannot tell the difference and still says , but Bousquet drops to . Classes like this, functions near the truth with small variance, are exactly what the rate theorems of chapter nine and the oracle inequalities of learning theory need.

What concentration buys. It turns statements about expectations into almost sure ones: for a measurable uniformly bounded class, convergence in mean combines with bounded-difference concentration and Borel–Cantelli to give almost sure convergence. It gives honest finite-sample bands, like the DKW band, valid separately at each fixed n, rather than simultaneously over all sampling times, which chapter eleven tests on the Coverage Board. And it underlies oracle inequalities for empirical risk minimization and the lasso. With concentration in hand, the whole theory comes down to bounding one number, the expected supremum, by symmetrization and chaining.

Numbers: n = 100: 95% point of nD_n − E: 4.89 (McDiarmid 12.2, Bousquet 16.9); t ≤ 0.02 class: 1.48 (12.2, 6.5)

7The functional delta methodPhD4 min

The functional delta method: quantile processes and Kaplan–Meier, from one theorem. Donsker's theorem says the empirical process converges to a Brownian bridge run on the scale of F. Part forty-seven's functional delta method then applies to any map of the distribution function that is Hadamard differentiable: the map's derivative, applied to the bridge, is the limit. Inverting a distribution function is such a map, at regular F with a positive continuous density, uniformly bounded away from zero on the quantile range in question. Its derivative in the direction h is minus h at the quantile, divided by the density there. So the whole quantile process converges: root n times the error of the sample quantile function is asymptotically minus a Brownian bridge over the density, jointly over a compact interior range of p; an unweighted whole-interval result generally fails at the tails. Bahadur's representation, from Part forty-seven, was a single coordinate of this.

Exponential data, observations. In blue, one sample's quantile process: root n times the error of its quantile function, across p. In white, plus and minus one point nine six asymptotic standard deviations. For the exponential, the root of p times one minus p over the density at the quantile simplifies to the root of p over one minus p. The spread blows up as p approaches one, because the density there vanishes: the upper quantiles of a long-tailed distribution are hard to pin down. These are pointwise limits. A band that holds for all p at once needs the supremum of the limiting process, which the bootstrap of chapter eleven provides.

Checked by simulation at five values of p: the simulated standard deviations are , at the median, and at the ninetieth percentile, against the delta method's , one, and three. Agreement to about two decimals, at two hundred observations.

The Kaplan–Meier estimator of Part forty yields to the same method. For iid subjects with independent right censoring and positive at-risk probability on a fixed finite horizon, the empirical distribution of the observed times, and of the times that were events, form a two-dimensional empirical process over a Donsker class of indicators. The Nelson–Aalen cumulative hazard is an integral of one with respect to the other, a smooth map. The Kaplan–Meier curve is the product integral of the hazard, and Richard Gill and Søren Johansen showed in 1990 that the product integral is Hadamard differentiable. Chaining the derivatives: root n times the Kaplan–Meier error converges to minus S times a Gaussian martingale whose variance at t is the integral of the hazard over S times G, where G is the censoring survivor function. Greenwood's formula estimates this asymptotic variance; it is not an exact finite-sample variance.

A check. Exponential survival times with rate one, exponential censoring with rate one half, two hundred subjects. The simulated standard deviations of root n times the Kaplan–Meier error, at five times, against the limit, which here has a closed form: at t equal to one, simulated against . One theorem, the functional delta method on a Donsker class, gives the quantile process, the Kaplan–Meier process, and many more: the Nelson–Aalen estimator, the L-statistics, the ROC curve.

Numbers: quantile SDs 0.334 / 0.992 / 2.996 vs 1/3, 1, 3; KM SD at t = 1: 0.558 vs 0.560

8Z-estimators with nuisance parametersPhD4 min

Z-estimators with nuisance parameters: when estimating something else first costs, and when it does not.

Many estimators solve an estimating equation that contains something else estimated first: a nuisance parameter, plugged in. If the estimating functions form a Donsker class and the nuisance estimate is consistent in the relevant L-two metric, asymptotic equicontinuity lets us replace the empirical process at the estimated values by the empirical process at the true ones: the random fluctuation is as if the nuisance were known. What remains is a deterministic drift: the population estimating equation evaluated at the estimated nuisance. To first order it is the derivative of the estimating equation in the nuisance, times the nuisance's own error. If that derivative is zero, the first-order drift vanishes. The higher-order remainder must still be little-oh of one over root n; with quadratic drift this often needs a nuisance rate faster than n to the minus one quarter. If not, its error is passed on.

A simple example shows both cases. The mean absolute deviation about a centre c, distinct from the robust median absolute deviation: the expected distance from c. In practice c is estimated first. When F has no atom at c, its derivative in c is twice F of c minus one. If c is the median, that derivative is zero, because the median minimizes the mean absolute deviation. Under a regular continuous density and adequate convergence rates, estimating the median adds no first-order variance. If c is the mean of skewed data, it is not zero. For exponential data F of one is one minus one over e, and the slope is . The error in the sample mean leaks into the estimate.

The numbers, for two hundred exponential observations. About the median, the variance is the same whether the median is known or estimated: in theory, and simulated. About the mean, knowing the centre gives , but estimating it gives in theory and in simulation. A standard error computed as if the centre were known would understate the variance by a factor of .

Real data. Simon Newcomb's sixty-six passage times of light, with their two outliers. The mean absolute deviation about the mean is . Treating the centre as known, its standard error would be . But the outliers drag the mean below the bulk of the data, so that only about forty-two percent of the points lie below it, and the slope twice F n of the mean minus one is . Including the footprint raises the standard error to . The bootstrap, which re-estimates the centre in every resample automatically, gives , closer to the corrected value. The median-centred calculation uses a continuous-population reference; the rounded data do not by themselves verify that model.

The general lesson: the cost of plugging in an estimated nuisance is its footprint, the derivative of the population estimating equation in the nuisance. When the footprint is zero, the first-order drift is absent, provided the remainder and empirical-process conditions hold. This property is called Neyman orthogonality. When it is not zero, add the nuisance's influence function to the estimator's, or bootstrap the whole two-step procedure. Chapter twelve's Kolmogorov–Smirnov test with estimated parameters is the same story in a function space. And Part forty-nine turns the lesson into a design principle: choose the estimating function so that the footprint vanishes, even when the nuisance is infinite dimensional.

Numbers: MAD about the mean (Exp): n·Var 0.459 known, 0.778 estimated (simulated 0.466, 0.787); Newcomb SE 1.13 → 1.29

9Rates of convergencePhD4 min

Rates of convergence: when the answer is not root n. For an M-estimator, two things fix the rate. The population criterion curves away from its maximum quadratically. And the empirical process, restricted to parameters within delta of the truth, has expected supremum of order some function phi n of delta, which chaining computes. For a consistent approximate maximizer, quadratic population curvature, and a local modulus with the required growth and measurability bounds, the rate theorem gives convergence at the rate r n that balances the two: r n squared times phi n of one over r n equal to root n. For smooth criteria the local modulus is linear in delta, and the rate is root n, as in Part forty-seven. For some indicator criteria with quadratic population curvature, the local increments have variance proportional to delta, not delta squared, the modulus is root delta, and the balance gives n to the one third.

Jeankyung Kim and David Pollard showed in 1990 that cube-root M-estimators can converge to the argmax of a Gaussian process minus quadratic drift. Only particular one-dimensional models reduce to two-sided Brownian motion minus a parabola; the general limit is not universally Chernoff. The best-known example is Ulf Grenander's estimator of a decreasing density, from Part twenty-nine: the slope of the least concave majorant of the empirical distribution function. At a point where the density has a negative derivative, its error, scaled by n to the one third, converges to a constant depending on f and f prime, times twice Z. Z is Chernoff's distribution: where Brownian motion minus t squared reaches its maximum. Herman Chernoff met it in 1964 estimating a mode.

Here is Chernoff's distribution, simulated: six thousand Brownian paths on a finite grid between minus two point five and two point five, each with t squared subtracted, and where each one peaks. The simulated standard deviation is . Piet Groeneboom and Jon Wellner computed the distribution exactly in 2001, with Airy functions; its standard deviation is . Against a normal with the same spread, it is more peaked and has much lighter tails, decaying like e to the minus a constant times the cube of t.

Grenander's estimator for exponential data, at x equal to one, where the density is e to the minus one and its derivative is minus e to the minus one. The limit predicts that n to the one third times the error has standard deviation . The simulated values at a hundred, a thousand and ten thousand observations are , and : stable, and close to the limit. Scaled by root n instead, the error would grow like n to the one sixth. Using root n theory here would give intervals that are far too narrow.

Cube-root asymptotics occur in several nonsmooth models under specific local curvature and process conditions: Charles Manski's maximum score estimator for binary choice, the shortest half of the data, isotonic regression, and current status data in survival analysis. The direct ordinary bootstrap can fail in these cube-root models because its conditional local process or drift is wrong. This is distinct from the sample-maximum atom mechanism in Part forty-seven. Under appropriate conditions, subsampling or an m out of n bootstrap with m diverging and m over n tending to zero can work, in certain monotone likelihood models, Moulinath Banerjee and Jon Wellner obtained a nuisance-free likelihood-ratio limit. That conclusion does not extend automatically to maximum score or every cube-root estimator.

Numbers: Chernoff finite-grid SD 0.524 (reference 0.513); Grenander n^{1/3} SD 0.39–0.41 vs 0.418

10Uniform laws at work: learningPractice3 min

The theory was invented, in part, for learning. A classifier h has a true error rate R of h and a training error rate R n of h. Empirical risk minimization picks the classifier in the class with the smallest training error, Part nineteen's recipe. Adding and subtracting, the chosen classifier's excess true error is at most twice the largest gap between training and true error over the class: a uniform law of large numbers, exactly chapter one's quantity. So for a class of VC dimension V, the excess risk is of order the root of V log n over n, whatever the distribution of the data. This is Vapnik and Chervonenkis's original motivation.

A toy problem. Threshold classifiers on the unit interval, a true threshold at point three, and twenty percent of the labels flipped at random, so the best possible error is point two. In purple, the distribution-free VC bound. In blue, twice the expected uniform deviation, simulated: below the bound, with the same slope of minus a half. In green, the excess risk that empirical risk minimization actually incurs: at a thousand observations, . It falls like one over n, not one over root n, because near the best threshold the excess risk is linear in the distance, and the variance there is small: chapter six's small-variance classes, and chapter nine's localization, explain the faster rate.

From here the road leads into machine learning theory. Rademacher complexities, computed on the data at hand, give bounds that are often much tighter than the VC bound. Margin bounds explain support vector machines and boosting through a scale-sensitive dimension, not the number of parameters. Localized complexities, due to Peter Bartlett, Olivier Bousquet and Shahar Mendelson, can give fast rates under additional margin or low-variance conditions, such as the constant-noise threshold model shown here. But modern deep networks can fit pure noise perfectly, so unrestricted worst-case VC bounds can be vacuous at the available sample size. Norm constraints, margins, data-dependent complexity and algorithmic stability can still yield useful guarantees. Understanding the full range of deep-network generalization remains an active research problem, and the companion series AI, Built takes up the practice.

Numbers: thresholds: 2E sup 0.057, excess risk 0.0014 at n = 1,000 (slope −1)

11The bootstrap empirical processPhD3 min

Resample the data, and form the empirical process of the resample around the original empirical distribution. Evarist Giné and Joel Zinn proved in 1990 a theorem of rare elegance: the bootstrap empirical process converges, conditionally on the data, to the same Gaussian limit under the theorem's measurability and envelope-integrability conditions, exactly when the class is Donsker. The bootstrap works precisely where the central limit theorem does. Combined with the functional delta method, the bootstrap distribution of any Hadamard differentiable functional mimics its sampling distribution. Failure of ordinary Hadamard differentiability removes this sufficient theorem; it does not imply automatic failure for every nonsmooth map. Important failures include Part forty-seven's sample maximum and this part's Grenander estimator.

A cousin is the multiplier bootstrap. Instead of resampling, give each observation an independent Gaussian weight with mean zero and variance one, and form the weighted empirical process. Recentred multinomial counts give the ordinary bootstrap, with dependent weights rather than independent multipliers; Gaussian weights give the multiplier bootstrap. For measurable Donsker classes with the appropriate envelope conditions, Gaussian multipliers have the same limit. General independent multipliers need stronger tail conditions than merely a finite variance. It never touches the data, only the weights, and Victor Chernozhukov, Denis Chetverikov and Kengo Kato showed in 2013 conditions under which Gaussian approximation and multiplier calibration work for maxima of many statistics, the basis of modern simultaneous inference in high dimensions.

How do bands built five ways cover the true distribution function? Normal data, twenty and a hundred observations. Kolmogorov's limit, the exact finite-sample quantile, and the DKW bound are near or above ninety-five percent in this simulation, allowing for Monte Carlo uncertainty; the limiting quantile has no general exact-coverage guarantee. The bootstrap and multiplier bands cover and percent at twenty, and percent at a hundred. They are right to first order and slow to converge. Resampling from a step function produces ties, but that alone does not prove a universal direction of error. Here the bootstrap quantiles are too small often enough to produce undercoverage. For the plain KS band, with its distribution-free exact law, there is no reason to bootstrap at all. The bootstrap earns its place where no exact law exists.

On the Old Faithful waits, two hundred and seventy-two of them, the five half-widths are from the limit, exact, from DKW, and and from the two bootstraps. The half-widths are descriptive iid references. The recorded waits have ties, which the resampling calculations now respect, and may be dependent; numerical agreement would not prove coverage for the geyser.

Numbers: 95% band coverage at n = 20: bootstrap 88%, multiplier 91%; at n = 100: 94%

12KS with estimated parameters, done rightPractice4 min

The Kolmogorov–Smirnov test with estimated parameters, done right: testing a family, not a single law.

Part forty-six met Lilliefors's discovery: if the parameters are estimated, the Kolmogorov–Smirnov table is wrong. Here is why. The gap between the empirical distribution and the fitted one splits into the ordinary empirical process minus the movement of the fitted distribution. The movement is the derivative of F in theta times the estimator's error, and under regular likelihood conditions, an efficient estimator's first-order error is the inverse information times the empirical process applied to the score. This is chapter eight's footprint in function space. So the limit is a Brownian bridge minus a random term built from the same bridge: a Gaussian process, but not a bridge, as James Durbin showed in 1973. For the normal family with mean and standard deviation estimated, its variance at the standardized point z is the bridge's, Phi times one minus Phi, minus phi squared, minus half of z phi squared.

Normal samples of a hundred. In white, the variance of the ordinary empirical process, a quarter at the centre. In gold, Durbin's variance for the process with fitted parameters. The dots are simulated variances: at the centre, against the formula's . Fitting the mean and the standard deviation pulls the fitted curve toward the data, and removes nearly two thirds of the variance in the middle. The supremum is correspondingly smaller, so Kolmogorov's critical values are far too large.

How far off? For normal samples of twenty, the correct ninety-five percent point of D is , against Kolmogorov's . A test using Kolmogorov's table almost never rejects: its simulated rejection rate across forty thousand samples is about percent. For the exponential with an estimated rate, at fifty, the size is percent instead of five. The remedy rests on a lucky fact. For location–scale and scale families, the law of D does not depend on the true parameters when the fitting rule is equivariant. So a parametric bootstrap, simulating from the fitted distribution, refitting, and recomputing D, gets the right critical value, up to Monte Carlo error. For other families bootstrap consistency needs regular estimation and a valid conditional process limit; it is not automatic.

Newcomb's passage times again. Testing normality with the mean and standard deviation fitted, D is . Kolmogorov's table gives a p-value of ; the parametric bootstrap, with nine thousand nine hundred and ninety-nine resamples, finds none as extreme, giving the finite-Monte-Carlo p-value one in ten thousand. The continuous normal model ignores rounding in these historical measurements. Without the two famous outliers, D falls to . The naive p-value is , and the fitted-normal reference calculation gives . The naive p-value is three times too large: used routinely, it would hide real departures from normality. The deletion was chosen after seeing the data. The trimmed result is an influence comparison, not a calibrated normality test or evidence that the remaining observations follow a normal law.

Numbers: normal n = 20: 0.192 vs Kolmogorov's 0.294, observed naive size 0.005% (2 / 40,000); Newcomb post hoc deletion: reference p = 0.21 (naive 0.64), not a calibrated selected-data test

Recap, problems, and the road aheadAll tracks2 min

Part forty-eight in thirteen lines. Doob's heuristic and Donsker's theorem. Glivenko–Cantelli classes, proved by symmetrization and Rademacher averages. The VC dimension and the Sauer–Shelah lemma. Covering and bracketing numbers. Dudley's chaining. Donsker classes and their entropy integrals. Talagrand's concentration inequality, in Bousquet's form, and the DKW inequality. The functional delta method, for quantiles and Kaplan–Meier. Nuisance parameters and their footprint. Rates of convergence, the cube root and Chernoff's distribution. Empirical risk minimization. The bootstrap and multiplier empirical processes. And the Kolmogorov–Smirnov test with estimated parameters, done right.

A promise for the next part. This one built uniform laws and process limits. Chapter eight showed that a plugged-in nuisance can cost something, and that sometimes it costs nothing, but only for simple nuisances. Part forty-nine takes the nuisance to be an entire unknown distribution, and asks how well a single number can then be estimated: tangent spaces, efficient influence functions, and the theory behind double machine learning.

Where it comes back. Part forty-nine needs Donsker conditions for its one-step and targeted estimators. Part fifty turns entropy into minimax rates, with the lower bounds of Fano and Le Cam. Part fifty-one develops concentration and chaining in high dimensions. Part fifty-four is statistical learning theory, built on VC dimension, Rademacher complexity and margins. And Part fifty-six uses the multiplier bootstrap for inference after selection.

Six problems, with full solutions in the README. Symmetrization; the intervals' growth function; brackets for half-lines; Dudley's integral for Brownian motion; the mean absolute deviation's footprint; and why the estimated-parameter KS law is free of the parameters. Pause here if you want to try them.

The books this part follows: van der Vaart and Wellner's Weak Convergence and Empirical Processes, Kosorok, Pollard, Giné and Nickl, and Dudley's Uniform Central Limit Theorems; with the papers from Kolmogorov and Doob to Chernozhukov, Chetverikov and Kato.

Forty-eight parts of sixty-five. A class is small enough for uniform laws when it cannot fit noise, and its entropy says how small. Next, Part forty-nine: semiparametric efficiency.

Where it goes next. Donsker conditions for one-step estimators, and the footprint as Neyman orthogonality, come in Part 49; entropy becomes minimax rates in Part 50; chaining and suprema in high dimensions are Part 51; VC, Rademacher and margin bounds for learning are Part 54; multiplier bootstraps return in Part 56.

Key results

The part's results in one place, for revision.

Symmetrization\(\displaystyle \operatorname{E}\sup_{f\in\mathcal F}\bigl|P_nf-Pf\bigr|\le 2\,\operatorname{E}\sup_{f\in\mathcal F}\Bigl|\frac1n\sum_{i=1}^n\varepsilon_if(X_i)\Bigr|\)
Sauer-Shelah\(\displaystyle \Pi_{\mathcal C}(n)\le\sum_{j=0}^{V}\binom nj\le\Bigl(\frac{en}{V}\Bigr)^{V}\qquad\allowbreak (n\ge V)\)
Dudley's entropy integral\(\displaystyle \operatorname{E}\sup_{t\in T}X_t\le K\int_0^{\operatorname{diam}T}\sqrt{\log N(\varepsilon,T,d)}\,d\varepsilon\)
Donsker and Kolmogorov\(\displaystyle \sqrt n\,\sup_x|F_n(x)-F(x)|\Rightarrow\sup_{0\le t\le1}|B(t)|,\qquad\allowbreak P\bigl(\sup|B|\le t\bigr)=1-2\sum_{k\ge1}(-1)^{k-1}e^{-2k^2t^2}\)
DKW with Massart's constant\(\displaystyle P\bigl(\sqrt n\,\sup_x|F_n(x)-F(x)|>t\bigr)\le 2e^{-2t^2}\)
Durbin's variance with estimated mean and SD\(\displaystyle \operatorname{Var}\to\Phi(z)\bigl(1-\Phi(z)\bigr)-\varphi(z)^2-\tfrac12\bigl(z\varphi(z)\bigr)^2\quad\allowbreak \text{in }\allowbreak \text{place }\allowbreak \text{of}\quad\allowbreak \Phi(z)\bigl(1-\Phi(z)\bigr)\)

Try it

Lab 48 · The empirical process: Kolmogorov's law, symmetrization, and estimated parameters

Simulate sqrt(n) sup|F_n - F| for n = 5, 20, 100 against the exact finite-n law and the Brownian bridge's (Kolmogorov's) limit; check E sup|F_n - F| against twice the exact Rademacher average of half-lines; then fit a normal's mean and SD and compare the process's variance with Durbin's formula.

Figure produced by Lab 48: The empirical process: Kolmogorov's law, symmetrization, and estimated parameters
Produced by the lab below, seed 0, in 0.4 s.
python -m videos.stats.labs 48 needs numpy, scipy, matplotlib · download lab48.py · source on GitHub
n = 5: 95th percentile of sqrt(n) D_n              1.257   exact 1.260   Kolmogorov's limit 1.358
n = 5: size of the test that uses the limit        2.6%   (nominal 5%)
n = 20: 95th percentile of sqrt(n) D_n             1.315   exact 1.315   Kolmogorov's limit 1.358
n = 20: size of the test that uses the limit       3.9%   (nominal 5%)
n = 100: 95th percentile of sqrt(n) D_n            1.344   exact 1.340   Kolmogorov's limit 1.358
n = 100: size of the test that uses the limit      4.6%   (nominal 5%)
sup |Brownian bridge|, simulated: 95th percentile  1.330   (Kolmogorov 1.358)
n = 20: E D_n against 2 R_n                        0.1859 <= 0.5151
n = 100: E D_n against 2 R_n                       0.0852 <= 0.2411
sqrt(n) E D_n at n = 100                           0.852   (limit sqrt(pi/2) log 2 = 0.869)
variance at z = 0: parameters known                0.2533   (theory 0.2500)
variance at z = 0: mean and SD estimated           0.0912   (Durbin 0.0908)
KS with estimated mean and SD, n = 20: 95% point   0.192   (Kolmogorov's table 0.294)
size of the naive test at nominal 5%               0.005%

The scaled largest gap follows the Brownian bridge's law, twice the Rademacher average bounds its mean, and fitting the parameters shrinks the process so much that Kolmogorov's table almost never rejects.
The code (85 lines; it asserts its own result)
"""Lab 48: test Doob's heuristic, the symmetrization bound, and what estimating parameters does to Kolmogorov-Smirnov."""

import numpy as np
from scipy import stats

from videos.coursekit import labs
from explainer.stats.kit import empirical

TITLE = "The empirical process: Kolmogorov's law, symmetrization, and estimated parameters"
GOAL = ("Simulate sqrt(n) sup|F_n - F| for n = 5, 20, 100 against the exact finite-n law and the Brownian bridge's "
        "(Kolmogorov's) limit; check E sup|F_n - F| against twice the exact Rademacher average of half-lines; then fit "
        "a normal's mean and SD and compare the process's variance with Durbin's formula.")
TASKS = [
    "Replace the uniform data by Exp(1) data with its true CDF. Why do the three percentiles not change?",
    "Fit only the mean (keep the SD known). Derive the new pointwise variance and check it against the simulation.",
    "For exponential data with an estimated rate use empirical.durbin_variance_exponential, and find the naive KS test's size at n = 50.",
]


def run(seed=0):
    rng = np.random.default_rng(seed)
    lab = labs.Lab()
    k95 = empirical.kolmogorov_quantile(0.95)

    # 1. Doob's heuristic: sqrt(n) D_n has the law of sup |Brownian bridge| in the limit.
    reps, sims = 20_000, {}
    for n in (5, 20, 100):
        d = np.sqrt(n) * empirical.ks_stats_uniform(rng.random((reps, n)))
        exact = np.sqrt(n) * empirical.ks_band_quantiles(n)["exact"]
        sims[n] = d
        lab.row(f"n = {n}: 95th percentile of sqrt(n) D_n", f"{np.quantile(d, 0.95):.3f}   exact {exact:.3f}   Kolmogorov's limit {k95:.3f}")
        lab.row(f"n = {n}: size of the test that uses the limit", f"{np.mean(d > k95):.1%}   (nominal 5%)")
        assert abs(np.quantile(d, 0.95) - exact) < 0.03, "the simulation matches the exact finite-n law"
        assert exact < k95, "the limit's critical value is conservative at every finite n"
    grid = np.linspace(0.3, 2.2, 96)
    gap = np.max(np.abs(np.mean(sims[100][:, None] <= grid[None, :], axis=0) - empirical.kolmogorov_cdf(grid)))
    bridge = np.max(np.abs(empirical.brownian_bridge(2000, rng, reps=4000)), axis=1)
    lab.row("sup |Brownian bridge|, simulated: 95th percentile", f"{np.quantile(bridge, 0.95):.3f}   (Kolmogorov {k95:.3f})")
    assert gap < 0.04 and abs(np.quantile(bridge, 0.95) - k95) < 0.06, "Doob's heuristic"

    # 2. Symmetrization: E sup |F_n - F| <= 2 R_n, with R_n exact for half-lines.
    for n in (20, 100):
        ed, two_r = sims[n].mean() / np.sqrt(n), 2 * empirical.rademacher_halflines(n)
        lab.row(f"n = {n}: E D_n against 2 R_n", f"{ed:.4f} <= {two_r:.4f}")
        assert ed < two_r, "symmetrization"
    limit = np.sqrt(np.pi / 2) * np.log(2)
    lab.row("sqrt(n) E D_n at n = 100", f"{sims[100].mean():.3f}   (limit sqrt(pi/2) log 2 = {limit:.3f})")
    assert abs(sims[100].mean() - limit) < 0.03

    # 3. Estimated parameters: sqrt(n)(F_n(x) - Phi((x - xbar)/s)) has Durbin's variance, far below F(1 - F).
    n, reps = 200, 20_000
    x = rng.standard_normal((reps, n))
    m, s = x.mean(axis=1, keepdims=True), x.std(axis=1, ddof=1, keepdims=True)
    zs = np.array([-1.5, -0.75, 0.0, 0.75, 1.5])
    var_est = np.array([n * np.var(np.mean(x <= m + z * s, axis=1)) for z in zs])
    var_known = np.array([n * np.var(np.mean(x <= z, axis=1)) for z in zs])
    durbin, binom = empirical.durbin_variance_normal(zs), stats.norm.cdf(zs) * stats.norm.sf(zs)
    lab.row("variance at z = 0: parameters known", f"{var_known[2]:.4f}   (theory {binom[2]:.4f})")
    lab.row("variance at z = 0: mean and SD estimated", f"{var_est[2]:.4f}   (Durbin {durbin[2]:.4f})")
    assert np.all(np.abs(var_est - durbin) < 0.008) and np.all(np.abs(var_known - binom) < 0.012), "Durbin's variance"
    d20 = empirical.ks_estimated_normal_rows(rng.standard_normal((40_000, 20)))
    table = empirical.ks_band_quantiles(20)["exact"]
    lab.row("KS with estimated mean and SD, n = 20: 95% point", f"{np.quantile(d20, 0.95):.3f}   (Kolmogorov's table {table:.3f})")
    lab.row("size of the naive test at nominal 5%", f"{np.mean(d20 > table):.3%}")
    assert abs(np.quantile(d20, 0.95) - 0.192) < 0.006 and np.mean(d20 > table) < 0.002, "the table is far too wide"
    lab.note = ("The scaled largest gap follows the Brownian bridge's law, twice the Rademacher average bounds its mean, "
                "and fitting the parameters shrinks the process so much that Kolmogorov's table almost never rejects.")

    fig, ax = labs.figure(2, size=(11, 4.3))
    t = np.linspace(0.25, 2.2, 300)
    for n, color in ((5, labs.BLUE), (100, labs.GREEN)):
        ax[0].hist(sims[n], bins=60, range=(0.25, 2.2), density=True, histtype="step", lw=1.4, color=color, label=f"sqrt(n) D_n, n = {n}")
    ax[0].plot(t, empirical.kolmogorov_density(t), color=labs.GOLD, label="sup |Brownian bridge| (Kolmogorov)")
    ax[0].axvline(k95, color=labs.RED, ls="--", lw=1, label=f"95% point {k95:.3f}")
    ax[0].set(title="Doob's heuristic: the largest gap, scaled", xlabel="sqrt(n) sup |F_n - F|", ylabel="density")
    ax[0].legend()
    z = np.linspace(-3, 3, 241)
    ax[1].plot(z, stats.norm.cdf(z) * stats.norm.sf(z), color=labs.BLUE, label="parameters known: F(1 - F)")
    ax[1].plot(z, empirical.durbin_variance_normal(z), color=labs.GOLD, label="mean and SD estimated: Durbin")
    ax[1].scatter(zs, var_known, color=labs.BLUE, s=26, zorder=3)
    ax[1].scatter(zs, var_est, color=labs.GOLD, s=26, zorder=3, label="simulated, n = 200")
    ax[1].set(title="Pointwise variance of the empirical process", xlabel="z = (x - mean) / SD", ylabel="variance", ylim=(0, 0.34))
    ax[1].legend(loc="upper right")
    lab.fig = fig
    return lab

Now change it

  1. Replace the uniform data by Exp(1) data with its true CDF. Why do the three percentiles not change?
  2. Fit only the mean (keep the SD known). Derive the new pointwise variance and check it against the simulation.
  3. For exponential data with an estimated rate use empirical.durbin_variance_exponential, and find the naive KS test's size at n = 50.

Problems, with solutions

Try each problem before opening its solution.

  1. Symmetrization. Show that \(E\,\|P_n - P\|_{\mathcal F} \le 2\,\mathcal R_n(\mathcal F)\) by introducing a ghost sample and random signs.

    Solution
    • Let X′ be an independent copy of the sample. Since P f = E′ P′_n f, Jensen gives E sup|P_n f − P f| ≤ E sup|P_n f − P′_n f|.
    • Each f(X_i) − f(X′_i) is symmetric and the pairs are independent, so multiplying by independent signs ε_i leaves the joint law unchanged.
    • Then sup|Σ ε_i (f(X_i) − f(X′_i))| ≤ sup|Σ ε_i f(X_i)| + sup|Σ ε_i f(X′_i)|, and the two terms have the same mean: E‖P_n − P‖ ≤ 2R_n.
  2. Intervals. Show that intervals on the line pick out exactly \(n(n+1)/2 + 1\) subsets of \(n\) distinct points, so their VC dimension is 2.

    Solution
    • Sort the points. An interval picks out a contiguous run x_(i), …, x_(j), and every run is achievable. There are n(n + 1)/2 runs plus the empty set.
    • At n = 2 that is 4 = 2²: two points are shattered. At n = 3 it is 7 < 8: the outer two points without the middle one cannot be picked out. So the VC dimension is 2.
  3. Brackets for half-lines. Build \(\lceil 1/\varepsilon^2 \rceil\) brackets for the half-lines in \(L_2(P)\), and deduce the Glivenko–Cantelli theorem.

    Solution
    • Choose −∞ = t₀ < t₁ < … < t_k = ∞ with F(t_j) − F(t_{j−1}) ≤ ε², which needs k = ⌈1/ε²⌉ (for continuous F).
    • The brackets [1{x ≤ t_{j−1}}, 1{x ≤ t_j}] have L₂(P) size at most ε and cover every 1{x ≤ t} for t in the corresponding closed interval, using endpoint conventions at ±∞. The continuous-F construction is sufficient here; for a general distribution use brackets allowing its atoms.
    • So sup_t (F_n(t) − F(t)) ≤ max_j (F_n(t_j−) − F(t_j−)) + ε², and similarly below. The maximum of finitely many terms goes to 0 a.s. by the strong law; since ε is arbitrary, sup|F_n − F| → 0 a.s.
  4. Dudley's integral for Brownian motion. For Brownian motion with \(d(s,t) = \sqrt{|s-t|}\), show \(N(\varepsilon) \le 1/\varepsilon^2 + 1\) and evaluate Dudley's integral.

    Solution
    • In d(s, t) = √|s − t| a ball of radius ε contains an interval of length 2ε², so ⌈1/(2ε²)⌉ ≤ 1/ε² + 1 balls cover [0, 1].
    • ∫₀¹ √(log(1/ε²)) dε = √2 ∫₀¹ √(log(1/ε)) dε = √2 Γ(3/2) = √(π/2), which is finite: sample paths are continuous and E sup B is finite (in fact √(2/π)).
  5. The mean absolute deviation's footprint. For \(\theta = E|X - c|\) with \(c\) the sample mean, find the influence function and the variance for Exp(1) data.

    Solution
    • For finite E|X| and no atom at c, θ(c) = E|X − c| has θ′(c) = 2F(c) − 1. This is mean absolute deviation, not the robust median absolute deviation. With ĉ = x̄, θ̂ − θ ≈ (P_n − P)|X − μ| + θ′(μ)(x̄ − μ), so IF(x) = |x − μ| − θ + (2F(μ) − 1)(x − μ).
    • For Exp(1), μ = 1, θ = 2/e, 2F(1) − 1 = 1 − 2/e. Var|X − 1| = E(X − 1)² − θ² = 1 − 4/e² = 0.459; Cov(|X − 1|, X − 1) = 0.472 (by quadrature). So n·Var = 0.459 + 2(0.264)(0.472) + 0.264² = 0.778.
  6. The estimated-parameter KS law is parameter-free. Show that the law of \(D_n\) with \(\hat\mu\), \(\hat\sigma\) plugged in does not depend on \((\mu, \sigma)\) for normal data.

    Solution
    • Write X_i = μ + σZ_i. Then x̄ = μ + σz̄ and s = σ s_z, so (X_i − x̄)/s = (Z_i − z̄)/s_z.
    • D = sup_x |F_n(x) − Φ((x − x̄)/s)| depends only on these standardized values (substitute x = μ + σu), hence only on Z: its law is the same for every (μ, σ).

Notes and sources

Where it comes back

  • Part 49: Donsker conditions for one-step estimators and TMLE; the footprint becomes Neyman orthogonality.
  • Part 50: entropy turned into minimax rates, with Fano's and Le Cam's lower bounds.
  • Part 51: concentration, chaining (Sudakov, generic chaining) and suprema in high dimensions.
  • Part 54: statistical learning theory: VC, Rademacher and margin bounds.
  • Part 56: multiplier bootstraps for simultaneous inference after selection.

Glossary

  • The objects.
    • Empirical measure P_n; empirical process 𝔾_n; function class; envelope; ℓ^∞(ℱ): random functions on a class.
    • Brownian bridge; P-Brownian bridge; Kolmogorov distribution; Doob's heuristic: the limits.
  • Uniform laws.
    • Glivenko–Cantelli class; ghost sample; symmetrization; Rademacher average; Massart's lemma: the LLN, uniformly.
    • Shattering; growth function; VC dimension; Sauer–Shelah lemma; VC-subgraph class: counting patterns.
    • Covering number; metric entropy; bracket; bracketing number; uniform entropy: measuring size.
  • Uniform CLTs.
    • Chaining; dyadic net; link; Dudley's entropy integral; sub-Gaussian process: suprema.
    • Donsker class; tightness; asymptotic equicontinuity; bracketing CLT; uniform-entropy CLT: the CLT, uniformly.
    • Bernstein's inequality; McDiarmid; Talagrand's inequality; Bousquet's constants; DKW; Massart's constant: concentration.
  • Uses.
    • Functional delta method; quantile process; product integral; Kaplan–Meier process: smooth maps.
    • Nuisance parameter; footprint; Neyman orthogonality: plug-ins.
    • Rate theorem; modulus of continuity; cube-root asymptotics; Grenander estimator; Chernoff's distribution: slower rates.
    • Empirical risk minimization; excess risk; VC bound; localization: learning.
    • Bootstrap empirical process; Giné–Zinn theorem; multiplier bootstrap: resampling a process.
    • Estimated-parameter empirical process; Durbin's covariance; Lilliefors's test; parametric bootstrap: testing a family.

Sources

  • Origins.
    • A. Kolmogorov, G. Ist. Ital. Attuari 4 (1933); V. Glivenko, G. Ist. Ital. Attuari 4 (1933); F. Cantelli, same volume.
    • J. Doob, Ann. Math. Stat. 20 (1949); M. Donsker, Ann. Math. Stat. 23 (1952); K. L. Chung, Trans. AMS 67 (1949).
  • Combinatorics and entropy.
    • V. Vapnik & A. Chervonenkis, Theory Probab. Appl. 16 (1971); N. Sauer, J. Comb. Theory A 13 (1972); S. Shelah, Pacific J. Math. 41 (1972); T. Cover, IEEE Trans. Electron. Comput. 14 (1965).
    • D. Haussler, J. Comb. Theory A 69 (1995); A. Kolmogorov & V. Tikhomirov, Uspekhi 14 (1959).
    • R. Dudley, J. Funct. Anal. 1 (1967); Ann. Probab. 6 (1978); M. Ossiander, Ann. Probab. 15 (1987); D. Pollard, J. Austral. Math. Soc. A 33 (1982).
  • Concentration.
    • A. Dvoretzky, J. Kiefer & J. Wolfowitz, Ann. Math. Stat. 27 (1956); P. Massart, Ann. Probab. 18 (1990).
    • M. Talagrand, Invent. Math. 126 (1996); O. Bousquet, C. R. Acad. Sci. Paris 334 (2002).
  • Applications.
    • R. Gill & S. Johansen, Ann. Stat. 18 (1990); J. Durbin, Ann. Stat. 1 (1973); H. Lilliefors, JASA 62 (1967).
    • U. Grenander, Skand. Aktuarietidskr. 39 (1956); B. Prakasa Rao, Sankhyā A 31 (1969); H. Chernoff, Ann. Inst. Stat. Math. 16 (1964); J. Kim & D. Pollard, Ann. Stat. 18 (1990); P. Groeneboom & J. Wellner, J. Comput. Graph. Stat. 10 (2001).
    • M. Banerjee & J. Wellner, Ann. Stat. 29 (2001); B. Sen, M. Banerjee & M. Woodroofe, Ann. Stat. 38 (2010).
    • E. Giné & J. Zinn, Ann. Probab. 18 (1990); V. Chernozhukov, D. Chetverikov & K. Kato, Ann. Stat. 41 (2013).
    • P. Bartlett, O. Bousquet & S. Mendelson, Ann. Stat. 33 (2005); G. Marsaglia, W. Tsang & J. Wang, J. Stat. Softw. 8 (2003).
  • Books.
    • A. van der Vaart & J. Wellner, Weak Convergence and Empirical Processes (1996; 2nd ed. 2023); M. Kosorok, Introduction to Empirical Processes and Semiparametric Inference (2008).
    • D. Pollard, Convergence of Stochastic Processes (1984); E. Giné & R. Nickl, Mathematical Foundations of Infinite-Dimensional Statistical Models (2016); R. Dudley, Uniform Central Limit Theorems (1999).
About this partfrom its README

Part 48 of a sixty-five-part course in statistics, from a first course to a PhD (see the series plan and the syllabus), and the sixth part of Stage IV, the PhD core.

It opens with Doob's heuristic of 1949: √n(F_n − F) looks like a Brownian bridge, so Kolmogorov's 1933 law of √n sup|F_n − F| should be the law of sup|B|. Donsker proved it in 1952, and making the proof airtight produced the theory of empirical processes. The part asks for which classes of functions the law of large numbers and the central limit theorem hold uniformly, and at what rate. It builds the answer in four steps:

  • symmetrization and Rademacher averages (Glivenko–Cantelli classes);
  • counting patterns (VC dimension, Sauer–Shelah);
  • measuring size by covering and bracketing numbers (entropy);
  • Dudley's chaining, which turns entropy into a uniform CLT (Donsker classes).

It then uses the theory on:

  • concentration of the supremum (Talagrand, Bousquet, DKW);
  • the functional delta method (the quantile and Kaplan–Meier processes);
  • Z-estimators with nuisance parameters (the "footprint");
  • rates of convergence and cube-root asymptotics (Grenander, Chernoff's distribution);
  • empirical risk minimization;
  • the bootstrap and multiplier empirical processes;
  • the Kolmogorov–Smirnov test with estimated parameters (Durbin's process, the parametric bootstrap).

It keeps three promises:

  • Part 8 used the plug-in principle, F_n → F uniformly, on trust. Chapters 1–3 prove the Glivenko–Cantelli theorem three ways: symmetrization, VC counting, brackets.
  • Part 44 stated Donsker's invariance principle for random walks. Chapters 4–5 explain the empirical-process proof strategy and state the entropy theorems with their envelope and measurability conditions.
  • Part 47 took a uniform law of large numbers and the bootstrap empirical process on trust. Chapters 7, 11 and 12 supply them.

Built in this part:

  • statkit.empirical (explainer/stats/kit/empirical.py), tested in tests/test_stats_kit_empirical.py; local repairs in compute.py are tested in tests/test_stats48_polish.py:
    • the Kolmogorov distribution (cdf, density, quantile) and KS statistics; Brownian bridges; empirical processes;
    • the exact Rademacher average of half-lines (the expected maximum of a simple random walk, by a local killed-walk spectral sum); Massart's finite-class lemma;
    • brute-force growth functions for half-lines, intervals, half-planes and rectangles; Sauer–Shelah;
    • greedy covering numbers; half-line brackets; random Lipschitz classes;
    • the dyadic chaining bound for Brownian motion; Dudley's integral; the sup over a dyadic net;
    • Bousquet's form of Talagrand's inequality; DKW with Massart's constant;
    • Durbin's variance for the estimated-parameter process (normal location–scale, exponential scale);
    • the mean absolute deviation's nuisance footprint;
    • Chernoff's distribution by simulation; the Grenander constant;
    • KS bands: Kolmogorov, exact, DKW, bootstrap, multiplier; the parametric-bootstrap KS test.
  • The chaining net (ChainingNet in explainer/stats/viz.py), the part's instrument: Dudley's refining dyadic nets drawn as a tree of points tied to their parents, and, on a Brownian path, the level-k approximations with the links each level adds.

Data.

  • From the Museum: Old Faithful's 272 waiting times; Newcomb's 66 passage times of light.
  • The rest is exact arithmetic or seeded simulation.

The Coverage Board gains seven rows:

Method Setting Nominal Achieved ± MCSE Verdict
KS band from Kolmogorov's limit N(0, 1) data, n = 20 95% 96.35% ± 0.42% conservative
KS band, exact finite-n quantile N(0, 1) data, n = 20 95% 95.45% ± 0.47% kept
DKW band (Massart's constant) N(0, 1) data, n = 20 95% 96.35% ± 0.42% conservative
KS band by the bootstrap N(0, 1) data, n = 20 95% 88.65% ± 0.71% broken
KS band by the multiplier bootstrap N(0, 1) data, n = 20 95% 92.35% ± 0.59% broken
KS test, estimated rate, Kolmogorov's table exponential data, n = 30 5% 0.60% ± 0.17% conservative
KS test, estimated rate, parametric bootstrap exponential data, n = 30 5% 5.45% ± 0.51% kept

Each row uses 2,000 independent datasets. Band bootstraps use 499 resamples per dataset; the exponential test uses 199 and the finite-Monte-Carlo rank p-value. MCSE describes simulation uncertainty, separately from coverage or test calibration.

Chapter notes
# Chapter Numbers
0 Doob's heuristic 95th percentile of √n D_n: 1.25 (n = 5), 1.34 (n = 100); Kolmogorov 1.358
1 Glivenko–Cantelli classes E D_n = 0.0272 vs 2R_n = 0.0783 at n = 1,000; √n E D_n → √(π/2) log 2 = 0.869
2 VC classes half-planes: n(n − 1) + 2 (92 at n = 10); 3 points shattered (8), a square not (14 of 16)
3 Entropy and bracketing half-lines: 267 balls at ε = 0.05 (brackets 400); Lipschitz: 320 balls at ε = 0.08
4 Chaining E max over 2^K + 1 points → 0.788 (K = 10) vs √(2/π) = 0.798; union bound 3.72; chaining sum 3.85
5 Donsker classes exact 95% point √n D_n: 1.260, 1.315, 1.340 (n = 5, 20, 100); Old Faithful band ±0.082, D(normal) = 0.155
6 Maximal inequalities n = 100: 95% point of nD_n − E: 4.89 (McDiarmid 12.2, Bousquet 16.9); t ≤ 0.02 class: 1.48 (12.2, 6.5)
7 The functional delta method quantile SDs 0.334 / 0.992 / 2.996 vs 1/3, 1, 3; KM SD at t = 1: 0.558 vs 0.560
8 Nuisance parameters MAD about the mean (Exp): n·Var 0.459 known, 0.778 estimated (simulated 0.466, 0.787); Newcomb SE 1.13 → 1.29
9 Rates Chernoff finite-grid SD 0.524 (reference 0.513); Grenander n^{1/3} SD 0.39–0.41 vs 0.418
10 Learning thresholds: 2E sup 0.057, excess risk 0.0014 at n = 1,000 (slope −1)
11 The bootstrap empirical process 95% band coverage at n = 20: bootstrap 88%, multiplier 91%; at n = 100: 94%
12 KS with estimated parameters normal n = 20: 0.192 vs Kolmogorov's 0.294, observed naive size 0.005% (2 / 40,000); Newcomb post hoc deletion: reference p = 0.21 (naive 0.64), not a calibrated selected-data test
13 Outro —

The rest of the part's numbers, chapter by chapter:

  • Hook.
    • √n D_n, 20,000 samples each: 95th percentiles 1.25 (n = 5), 1.32 (n = 20), 1.34 (n = 100), matching the exact finite-n law (1.260, 1.315, 1.340); Kolmogorov's limit 1.358.
    • Empirical-process paths at n = 20, 200, 5,000 beside a Brownian bridge.
  • Chapter 1.
    • Glivenko–Cantelli defined; the class of finite sets fails (sup = 1 always).

    • Three sequences of D_n for n up to 5,000, inside a √(log log n / n) envelope (Chung 1949).

    • Symmetrization: E‖P_n − P‖ ≤ 2R_n. For half-lines R_n = E max_k |S_k| / n exactly:

      n 10 100 1,000 2,000
      E D_n (simulated) 0.259 0.0855 0.0272 0.0194
      2R_n (exact) 0.705 0.241 0.0783 0.0556
    • √n R_n → E sup|W| = √(π/2) = 1.253 (1.229 at n = 400). Massart's lemma √(2 log 2k / n).

  • Chapter 2.
    • Growth functions by brute force (n = 10): half-lines 11, intervals 56, half-planes 92, rectangles ≥ 224 on random points, Sauer–Shelah with V = 4: 386, all subsets 1,024.
    • Haussler's covering bound; VC-subgraph classes; sin(ωx) has infinite VC dimension.
  • Chapter 3.
    • Half-lines in L₂(uniform): greedy nets 7, 11, 25, 43, 89, 201, 267 at ε = 0.4 … 0.05; brackets ⌈1/ε²⌉ = 7 … 400.
    • 20,000 random 1-Lipschitz functions, sup norm: 5, 8, 14, 30, 64, 132, 320 balls at ε = 0.3 … 0.08 (log N ∝ 1/ε).
    • Entropy catalogue: indicator VC uniform covering entropy ≲ V log(1/ε), distinguished from bracketing entropy. Bounded monotone/Lipschitz and smoothness classes require their specified norms, domains and envelopes. For bounded Hölder balls on compact domains α > d/2 suffices; convex-set dimension claims assume a bounded regular region and regular sampling density. The actual square-root entropy integral must converge; little-o of ε⁻² is insufficient.
  • Chapter 4.
    • Union bound over 2^K + 1 grid points: 1.18 (K = 0) … 3.72 (K = 10).
    • Simulated E max over the net: 0.405, 0.488, 0.564, … 0.788 (K = 0 … 10), toward √(2/π) = 0.798.
    • Chaining midpoint-correction bound: 1/√(2π) + Σ(k≥1) 2^{−(k+1)/2} √(2k log 2), about 3.85. Each maximum includes zero. Forty levels leave a rigorously bounded tail below 0.00001264. Dudley's integral for BM: √(π/2).
  • Chapter 5.
    • Exact 95% points of √n D_n (Marsaglia, Tsang & Wang 2003): 1.260, 1.294, 1.315, 1.332, 1.340, 1.353 at n = 5, 10, 20, 50, 100, 1,000. The limit's test has size 2.7%, 3.4%, 3.9%, 4.3%, 4.5%, 4.9%.
    • Old Faithful (n = 272): band ±1.358/√272 = ±0.082; the fitted normal N(70.9, 13.6²) is 0.155 away.
  • Chapter 6.
    • n = 100, 40,000 samples, E nD_n = 8.52. The centre E[nD_n] is estimated from these same draws (MCSE is recorded in the input). The plotted theoretical curves evaluated at that estimated centre are plug-in illustrations. 95% points of the fluctuation: simulated 4.89, McDiarmid 12.24, Bousquet 16.87 (σ² = 1/4: nothing to exploit).
    • Half-lines with t ≤ 0.02 (σ² = 0.0196): simulated 1.48, McDiarmid 12.24, Bousquet 6.54.
  • Chapter 7.
    • Quantile process, Exp(1), n = 200: SDs 0.334, 0.579, 0.992, 1.724, 2.996 at p = 0.1 … 0.9 vs √(p/(1 − p)) = 0.333, 0.577, 1, 1.732, 3.
    • Kaplan–Meier, Exp(1) times, Exp(½) censoring, n = 200, 3,000 samples: SDs 0.433, 0.520, 0.558, 0.536, 0.497 at t = 0.25 … 2 vs the limit 0.429, 0.523, 0.560, 0.531, 0.483.
  • Chapter 8.
    • θ(c) = E|X − c|, slope 2F(c) − 1: zero at the median, 1 − 2/e = 0.264 at the mean of Exp(1).
    • n·Var (n = 200, 20,000 samples): about the median 0.614 known and estimated (simulated 0.623, 0.620); about the mean 0.459 known, 0.778 estimated (simulated 0.466, 0.787), a factor 1.70.
    • Newcomb: MAD about the mean 5.42; SE 1.13 ignoring the footprint, 1.29 with it (slope −0.15), bootstrap 1.36. About the median 5.30 ± 1.14.
  • Chapter 9.
    • The rate theorem; Kim & Pollard's cube-root limit.
    • Chernoff's distribution, 6,000 finite-window grid paths on [−2.5, 2.5] with 3,000 steps per side: SD 0.524 (Groeneboom & Wellner reference: 0.5133).
    • Grenander at x₀ = 1, Exp(1): constant 2|ff′/2|^{1/3} = 0.815; predicted SD 0.418; simulated 0.391, 0.406, 0.395 at n = 100, 1,000, 10,000.
  • Chapter 10.
    • Thresholds, t₀ = 0.3, 20% label noise: 2E sup|R_n − R| = 0.398, 0.057, 0.042 at n = 20, 1,000, 2,000; ERM excess risk 0.059, 0.0014, 0.0007 (slope −1); VC bound 2.45, 0.49, 0.36.
  • Chapter 11.
    • Giné–Zinn: bootstrap consistency ⇔ Donsker under envelope-integrability and measurability conditions. Gaussian multiplier CLT. Non-Hadamard differentiability alone does not prove bootstrap failure.
    • 95% band coverage (n = 20 / 100): Kolmogorov 95.2 / 95.9, exact 94.2 / 95.3, DKW 95.2 / 95.9, bootstrap 88.0 / 94.3, multiplier 91.0 / 94.2.
    • Old Faithful half-widths: 0.0823 (limit), 0.0817 (continuous-iid exact reference), 0.0823 (DKW), 0.0772 (tie-aware bootstrap), 0.0772 (tie-aware multiplier). These are iid references, not verified coverage for possibly dependent geyser waits.
  • Chapter 12.
    • Durbin's variance Φ(1 − Φ) − φ² − (zφ)²/2: 0.0908 at z = 0 against 0.25 known (simulated 0.0909).
    • 95% points: normal, n = 20: 0.192 (Kolmogorov 0.294, observed naive size 0.005% (2 / 40,000)); exponential, n = 50: 0.151 (0.188, naive size 0.56%).
    • Newcomb normality: all 66, D = 0.231, p = 0.0014 naive, 0.0001 bootstrap (zero exceedances in 9,999 resamples); without the two outliers (64), D = 0.090, p = 0.64 naive, 0.21 fitted-normal reference; deletion is post hoc, so this is an influence comparison, not a calibrated test. The continuous-normal references ignore measurement rounding.

Companion material in this repository

The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
  1. Hook: Doob's heuristic (1949) and Donsker (1952).
  2. Glivenko–Cantelli classes. Symmetrization and Rademacher averages.
  3. VC classes (Vapnik & Chervonenkis 1971). Sauer–Shelah; covering numbers of VC classes.
  4. Entropy and bracketing. Covering vs bracketing numbers; examples (monotone, Lipschitz, Sobolev balls).
  5. Chaining. Dudley's entropy integral (drawn as refining nets).
  6. Donsker classes. The uniform CLT; uniform entropy and bracketing conditions.
  7. Maximal inequalities. Bernstein-type; Talagrand's concentration (1996) and Bousquet's form.
  8. The functional delta method. The quantile process; the Kaplan–Meier process (Part 40).
  9. Z-estimators with nuisance parameters.
  10. Rates of convergence. The rate theorem; cube-root asymptotics (Kim & Pollard 1990): Grenander and Chernoff's distribution (Part 29).
  11. Uniform laws at work: learning. Why minimizing training error works: excess risk by a uniform deviation.
  12. The bootstrap empirical process (Giné & Zinn 1990); the multiplier bootstrap.
  13. KS with estimated parameters, done right (Board).
  14. Outro.

Built: statkit.empirical. Books: van der Vaart & Wellner; Kosorok; Pollard; Giné & Nickl.

Build the film

python -m videos.stats.stats48.compute        # the part's numbers, into .cache/stats48
python tools/build.py stats48                  # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py stats48 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/stats/stats48. Setup: see the course page. Source of these notes: the README and the scenes' narration.

Build it
OMP_NUM_THREADS=1 python -m videos.stats.stats48.compute   # once (about a minute)
python tools/build.py stats48 -q l                         # fast 480p preview
python tools/build.py stats48                              # 1080p30 -> renders/stats48.mp4
python tools/qa_scene.py stats48 Chaining
python tools/lecture_length.py stats48 --floor 50