Interactive demo · Probability and Statistical Inference · Chapter 7

The DKW band: one band for the whole cdf

The empirical cdf F̂n estimates F at every x at once. The Dvoretzky–Kiefer–Wolfowitz inequality turns it into a band: F̂n ± εn, with εn = √(log(2/α)/(2n)), contains the whole curve F with probability at least 1 − α, whatever F is. The top left panel shows it on the 799 nerve waiting times of the book. The rest of the page asks what "whole curve" costs: simulate samples from a known F and compare the band with the narrower pointwise intervals F̂n(x) ± zα/2√(F̂n(1 − F̂n)/n), which are right at each x separately but fail together.

Level α (band has level 1 − α)

Nerve data: interval (a, b]

Simulate from F

Sample size n

Try these

Sample r uses its own seeded generator, so the same settings always give the same samples. For a continuous F the sample is drawn as Xi = F−1(Ui): the Normal, Cauchy and Exponential choices then see exactly the same uniforms, and the band covers in exactly the same samples. The pointwise intervals are checked on [X(1), X(n)), where 0 < F̂n < 1. The exact coverage curve is computed from the exact distribution of supx|F̂n(x) − F(x)| for continuous F.

In the lecture notes