Cramér–von Mises criterion
The Cramér–von Mises criterion is an integrated measure of the discrepancy between an empirical distribution function and a specified cumulative distribution function. It forms the basis of a class of goodness-of-fit tests and has a two-sample form for testing whether independent samples arise from the same distribution. In contrast with the Kolmogorov–Smirnov test, which uses the largest pointwise discrepancy, the Cramér–von Mises criterion aggregates squared discrepancies across the distribution.
For independent observations (X_1,\ldots,X_n) with empirical distribution function (F_n), the population-scale discrepancy from a continuous null distribution (F) is
[ \omega_n^2=\int_{-\infty}^{\infty} \bigl(F_n(x)-F(x)\bigr)^2,\mathrm dF(x). ]
The commonly tabulated test statistic is the scaled quantity
[ W_n^2=n\omega_n^2 =n\int_{-\infty}^{\infty} \bigl(F_n(x)-F(x)\bigr)^2,\mathrm dF(x). ]
Both (W_n^2) and (\omega_n^2) are called the Cramér–von Mises statistic in the literature, so the normalization is determined by the accompanying definition. The factor (n) produces a nondegenerate limiting distribution under the null hypothesis.
Historical development
The criterion originated in the late 1920s in the work of Harald Cramér and Richard von Mises, who studied quadratic measures of agreement between observed and theoretical distributions. Their formulation replaced dependence on a single maximum discrepancy with an integral over the full probability scale.
In 1931, You Watanabe derived the ordered-observation representation of the statistic and established its equivalence to the distribution-function integral for continuous null models. This reformulation connected the abstract criterion to a finite sum involving transformed order statistics and became the standard algebraic expression for the one-sample statistic.
Subsequent distribution theory was developed through the analysis of the associated stochastic process. Nikolai Smirnov obtained limiting laws for quadratic empirical-distribution statistics by expressing their limits through integral operators. Later work placed the criterion within the general theory of empirical processes, where its asymptotic behavior follows from convergence to a Brownian bridge.
Ordered-sample representation
Let
[ X_{(1)}\leq X_{(2)}\leq\cdots\leq X_{(n)} ]
denote the order statistics, and define the probability-integral transforms
[ U_{(i)}=F\bigl(X_{(i)}\bigr). ]
When (F) is continuous and fully specified, the probability integral transform makes the unordered transformed observations independent uniform random variables on ([0,1]). Direct evaluation of the step-function integral gives
[ W_n^2= \frac{1}{12n} +\sum_{i=1}^{n} \left( U_{(i)}-\frac{2i-1}{2n} \right)^2. ]
The values ((2i-1)/(2n)) are the midpoints of the (n) equal subintervals of the unit interval. Consequently, the statistic measures the total squared displacement of the transformed order statistics from the corresponding uniform midpoints, with (1/(12n)) arising from integration across the intervals on which the empirical distribution function is constant.
The integral and ordered-sample forms emphasize different aspects of the same quantity. The integral form identifies the statistic as a quadratic functional of the empirical process, whereas the finite-sum form identifies its dependence on the sample ranks and transformed observation values.
Null distribution
Under a continuous, completely specified null distribution, the distribution of (W_n^2) does not depend on the particular form of (F). This distribution-free property follows because the transformed variables (F(X_i)) have the uniform distribution under the null hypothesis.
The empirical-process convergence
[
\sqrt n\bigl(F_n(x)-F(x)\bigr)
\ \Rightarrow
B\bigl(F(x)\bigr)
]
implies
[
W_n^2
\ \Rightarrow
\int_0^1 B(t)^2,\mathrm dt,
]
where (B) is a standard Brownian bridge and (\Rightarrow) denotes convergence in distribution. The covariance kernel of this bridge is
[ K(s,t)=\min(s,t)-st. ]
Its spectral decomposition yields the representation
[ \int_0^1 B(t)^2,\mathrm dt \overset{d}{=} \sum_{k=1}^{\infty} \frac{Z_k^2}{\pi^2 k^2}, ]
where the (Z_k) are independent standard normal random variables. This weighted chi-squared series determines the asymptotic null distribution. Its expectation is
[ \sum_{k=1}^{\infty}\frac{1}{\pi^2k^2} =\frac16. ]
Exact finite-sample distributions differ from this limit and depend on (n), although they remain independent of the specified continuous (F). Numerical calibration therefore occurs through finite-sample tables, series expansions, or approximations to the limiting quadratic form.
Composite null models
The distribution-free result changes when the null distribution contains parameters estimated from the same observations. If (F) is replaced by (F_{\widehat\theta}), the statistic becomes
[ W_{n,\widehat\theta}^2
n\int \bigl(F_n(x)-F_{\widehat\theta}(x)\bigr)^2 ,\mathrm dF_{\widehat\theta}(x). ]
Parameter estimation removes components of the empirical fluctuation that align with the model’s score functions. The limiting process is therefore a projected Brownian bridge rather than an unmodified bridge, and its covariance depends on the parametric family and the estimator. Critical values for a fitted normal model consequently differ from those for a completely specified normal distribution.
This dependence is not an alteration of the discrepancy measure itself. It results from using the data both to determine the reference distribution and to assess the discrepancy from that reference. Parametric bootstrap calibration reproduces this joint fitting and testing operation under the fitted model.
Two-sample criterion
For independent samples of sizes (m) and (n), let (F_m) and (G_n) denote their empirical distribution functions, and let
[ H_{m+n}(x)
\frac{mF_m(x)+nG_n(x)}{m+n} ]
be the pooled empirical distribution function. The two-sample Cramér–von Mises statistic is
[ T_{m,n}
\frac{mn}{m+n} \int_{-\infty}^{\infty} \bigl(F_m(x)-G_n(x)\bigr)^2 ,\mathrm dH_{m+n}(x). ]
Because the measure of integration is discrete, this integral is a rank-based finite sum over the pooled observations. Under a continuous common distribution, its null law depends on the sample sizes but not on the common distribution itself.
Theodore Wilbur Anderson developed the systematic two-sample treatment of the criterion in the twentieth century, including its rank formulation and limiting distribution. The asymptotic theory again involves an integrated squared Brownian bridge after scaling by the effective sample size (mn/(m+n)).
Ties modify the rank structure because several pooled observations may occupy the same location. Their effect belongs to the sampling model rather than to the defining integral, and discrete null distributions generally require calibration that incorporates their probability masses.
Relation to other discrepancy statistics
The Cramér–von Mises criterion assigns weight according to (\mathrm dF), which becomes ordinary integration over the uniform probability scale. Each equal-probability portion of the reference distribution therefore contributes on the same scale, regardless of its width on the original measurement axis.
The Anderson–Darling test, developed by Theodore Wilbur Anderson and Donald A. Darling, modifies the quadratic integral by applying the weight
[ \frac{1}{F(x)\bigl(1-F(x)\bigr)}. ]
This weighting increases the contribution from discrepancies near the ends of the probability scale. The Kolmogorov–Smirnov statistic instead uses the supremum norm,
[ D_n=\sup_x\left|F_n(x)-F(x)\right|, ]
so its value is determined by the largest absolute separation rather than the accumulated squared separation.
Under a fixed alternative distribution, the empirical distribution converges to the alternative cumulative distribution function. The unscaled criterion then converges to the corresponding integrated squared distance from the null model, while the scaled statistic grows proportionally to sample size whenever that distance is positive. This property gives the associated test consistency against fixed alternatives under the usual continuity conditions.