Empirical distribution function Created 2026-09-24 Updated 2026-10-18
The empirical distribution function counts the fraction of observations at or below a threshold. For a statistical sample of real observations , define
Each indicator function contributes one exactly when its observation is counted. Equivalently, , where the empirical measure assigns probability mass to each observation, including repeated observations.[ref]
Choose the illustrative statistical sample . Its empirical distribution function is
For example, counts both observations equal to , , and . There is no observation at , so there is no jump there. The five observations produce only four distinct jump locations.
Figure 1. . The chosen statistical sample is . Stacked marks retain the two observations at . Open circles show excluded heights and filled circles show the value at each jump of the right-continuous step function. The right axis gives the cumulative count, five times the empirical distribution function. Details.
The convention makes the empirical distribution function right-continuous: once a threshold reaches an observation, that observation remains counted immediately to its right. For a finite statistical sample, the count is constant from any up to the next larger observed value, proving right continuity. Its left-hand limit counts observations strictly below , so
A value occurring times causes one jump of size . At the jump is ; at , , and each jump is . All jumps sum to one. Thus the empirical distribution function is a nondecreasing step function with limits zero and one, and is itself a valid cumulative distribution function.
This turns many questions about data into simple cumulative distribution function operations. The observed fraction in is : for it is , counting and but excluding both s. Including the left endpoint gives . A sample quantile reads the same staircase in reverse: the smallest threshold reaching is . Unlike a histogram, this representation requires no choice of bins; its jumps retain every observation and its multiplicity.
The exact description of a finite statistical sample must be distinguished from a statistical model for how it was obtained. The empirical distribution function is defined for any finite list, with no independence assumption. Once the list is observed, its counts are fixed. For statistical inference, one often models as independent and identically distributed random variables with an unknown population cumulative distribution function . Then describes the sampling law, while varies across repeated statistical samples. The value is an observed fraction and an estimate of ; it does not establish that the population probability is . Even when is continuous, every finite is discrete.
For any threshold fixed before sampling, the indicator functions are independent Bernoulli random variables with success probability . Therefore the count has a binomial distribution and
The expected value follows by adding the expected values of the indicator functions; the variance follows by adding their variances using independence and dividing by . Thus is an unbiased estimator of at a fixed threshold. Controlling the error at every threshold at once requires more than a fixed-threshold calculation: the DKW inequality supplies such control, and the Glivenko-Cantelli theorem describes its uniform convergence almost surely as grows.
Comparing with a proposed cumulative distribution function also motivates goodness-of-fit tests, including the Kolmogorov-Smirnov test, the Anderson–Darling test, and the Cramér–von Mises criterion. A standard Kolmogorov-Smirnov test calibration assumes a fully specified continuous population law; fitting its statistical parameters from the same statistical sample changes that calibration.[ref]
The empirical distribution function is . For continuous F, the probability integral transform gives independent uniform variables . Strict increase of F is unnecessary. More explicitly, generate the observations by with the generalized quantile inverse. Then , so , where is the uniform empirical distribution.
Continuity and the limits of F ensure that its range contains . The endpoint discrepancies for are zero. Hence
which depends only on n. Equivalently it is , a function of uniform order statistics. This proves the distribution-free property of the Kolmogorov-Smirnov statistic even when F has flat portions.
Choose from this common distribution so that . The Kolmogorov-Smirnov confidence band is
The event that all these inequalities hold is exactly the event used to choose the critical value, giving simultaneous coverage . The Glivenko-Cantelli theorem states that for an independent identically distributed sample from any distribution function, continuous or not, almost surely.
For an integrable r-argument U-statistic kernel, replace it by . Every permutation has the same expectation by exchangeability, so this symmetrization of a U-statistic kernel preserves the target functional. For a symmetric U-statistic kernel h and , the U-statistic is
Each summand has expectation theta, hence the statistic is unbiased.
For the population variance, use . Independence gives when the second moment is finite. The corresponding statistic simplifies using :
Thus variance as a U-statistic is precisely the usual unbiased sample variance, for .
The empirical distribution function gives each observation mass :
The Glivenko-Cantelli theorem asserts the uniform, almost sure convergence
No continuity of the distribution function is required. Here is a proof that also handles its jumps. Let be independent uniform random variables on , and write , where . The generalized inverse property gives , so, if is the empirical distribution function of the , then .
For a fixed positive integer , the strong law of large numbers applied at each of the finitely many grid points shows that almost surely. If , monotonicity sandwiches between its endpoint values, whence
Take the probability-one intersection of these events over all . On that event the limit superior is at most for every , hence is zero. Therefore . The coupled sequence has the same joint law as any independent sample from , which proves the asserted almost sure conclusion for the original sample.
For , the sample quantile is
where denotes the th order statistic, with repeated observations retained. Suppose the population median is unique and is continuously differentiable in a neighbourhood of , with probability density function . Then
To see the variance directly, fix and count observations below . This count has a binomial distribution with success probability . The event that the sample median is below this point is that the count is at least . The central limit theorem for this binomial triangular array gives a limiting probability , exactly the displayed normal distribution. Centering is necessary for stating the limiting distribution; subtracting the deterministic population median has no effect on the asymptotic variance requested in the comparisons.
Write and for the population and empirical measure. The empirical distribution function is
Fix and a finite cover by function brackets of width below . If belongs to the th bracket, then
and, using instead, . Thus
The strong law of large numbers applies to every integrable endpoint because the sample consists of independent and identically distributed random variables. For this finite collection the maximum tends to zero on a common probability-one event. Apply the argument for , , and intersect those countably many events. On the resulting event the limsup is at most for every , proving the uniform strong law from finite L1 bracketing. This pathwise argument also avoids assuming without justification that an arbitrary uncountable supremum is measurable.
For the Glivenko-Cantelli theorem, take . Here is a finite bracketing construction which also handles atoms of the distribution. Choose and divide the possible values of into finitely many bins , including the final value one. For each nonempty parameter set , set and pointwise. These functions are indicators of rays, possibly with an open endpoint, so they are measurable. Monotonicity of and monotone limits at the extreme thresholds give and . Hence . No continuity of is required. Applying the proved uniform law gives
For an uncountable class of continuous functions, use . The functions are distinct, bounded and integrable for every probability law. Moreover by the strong law of large numbers. This supplies the requested example without additional compactness machinery.
For each positive integer , apply part (i) to the grid . Intersect the resulting probability-one events over all , a countable intersection. Work on this common event.
For , monotonicity of the empirical distribution function gives . Consequently
and
The endpoint is itself on the grid. Therefore
For each fixed , take the upper limit as ; part (i) makes the maximum vanish. Then let . This proves
This is the uniform-sample case of the Glivenko-Cantelli theorem, proved by a finite-grid approximation rather than assumed.
The Glivenko-Cantelli theorem states that for the empirical distribution function of iid real observations with distribution function ,
almost surely.
Apply part (a) to . For each , choose finitely many quantile cutpoints so that the -mass between consecutive cutpoints is at most , treating atoms as cutpoints themselves. Indicators at adjacent cutpoints give finite brackets of width at most . Using the strong law for the finite bracket endpoints and then intersecting the probability-one events for gives the almost-sure conclusion.