Cramer-Von Mises testΒΆ
The Cramer-Von Mises test is a statistical test of whether a given sample of data is drawn from a given probability distribution which is of dimension 1 and continuous.
We denote by the data of dimension 1.
Let
be the (unknown) cumulative distribution function of the continuous distribution.
We want to test whether the sample is drawn from the cumulative distribution function .
This test involves the calculation of the test statistic which is
the integrated squared distance between the empirical cumulative distribution function
built from the sample and
.
Letting
be i.i.d. random variables following the distribution with CDF
, the test statistic is defined by:
The empirical value of the test statistic, evaluated from the sample is:
Under the null hypothesis , the distribution of the test statistic
is
asymptotically known i.e. when
.
If
is sufficiently large, we can use the asymptotic distribution to apply the
test as follows.
We fix a risk
(error type I) and we evaluate the associated critical value
which is the quantile of order
of
.
Then a decision is made, either by comparing the test statistic to the theoretical threshold
(or equivalently
by evaluating the p-value of the sample defined as
and by comparing
it to
):
if
(or equivalently
), then we reject
,
if
(or equivalently
), then
is considered acceptable.