# Cramer-Von Mises Test

A Cramer-Von Mises Test is a hypothesis test that compares the goodness-of-fit of a cumulative distribution function to an empirical distribution function.

## References

### 2016

$\omega^2 = \int_{-\infty}^{\infty} [F_n(x)-F^*(x)]^2\,\mathrm{d}F^*(x)$
In one-sample applications $F^*$ is the theoretical distribution and $F_n$ is the empirically observed distribution. Alternatively the two distributions can both be empirically estimated ones; this is called the two-sample case. The criterion is named after Harald Cramér and Richard Edler von Mises who first proposed it in 1928–1930.

### 1962

$\omega^2=\in_{-\infty}^{\infty}[F_N(x)−F(x)]^2\,dF(x) \quad(1)$
where $F_N(x)$ is the empirical distribution function of the sample; that is, $FN(x)=k/N$ if exactly $k$ observations are less than or equal to $x(k=0,1,⋯,N)$. If there is a second sample, $y_1,\cdots,y_M$ a test of the hypothesis that the two samples come from the same (unspecified) continuous distribution can be based on the analogue of $N\omega^2$, namely
$T=[NM/(N+M)]\int^\infty_{−\infty}[F_N(x)−G_M(x)]^2dH_{N+M}(x), \quad (2)$
where $GM(x)$ is the empirical distribution function of the second sample and $H_{N+M(x)}$ is the empirical distribution function of the two samples together [that is, $(N+M)H_{N+M}(x)=NF_N(x)+MG_M(x)]$. The limiting distribution of $N\omega^2$ as $N\rightarrow \infty$ has been tabulated [2], and it has been shown ([3], [4a], and [7]) that TT has the same limiting distribution as $N\rightarrow \infty$, $M\rightarrow \infty$, and $N/M\rightarrow \lambda$, where $\lambda$ is any finite positive constant. In this note we consider the distribution of $T$ for small values of $N$ and $M$ and present tables to permit use of the criterion at some conventional significance levels for small values of $N$ and $M$ . The limiting distribution seems a surprisingly good approximation to the exact distribution for moderate sample sizes (corresponding to the same feature for $N\omega^2$ [6]). The accuracy of approximation is better than in the case of the two-sample Kolmogorov-Smirnov statistic studied by Hodges [4].