Cramér–von Mises criterion

From HandWiki
Short description: Statistical test

In statistics the Cramér–von Mises criterion is a criterion used for judging the goodness of fit of a cumulative distribution function [math]\displaystyle{ F^* }[/math] compared to a given empirical distribution function [math]\displaystyle{ F_n }[/math], or for comparing two empirical distributions. It is also used as a part of other algorithms, such as minimum distance estimation. It is defined as

[math]\displaystyle{ \omega^2 = \int_{-\infty}^{\infty} [F_n(x) - F^*(x)]^2\,\mathrm{d}F^*(x) }[/math]

In one-sample applications [math]\displaystyle{ F^* }[/math] is the theoretical distribution and [math]\displaystyle{ F_n }[/math] 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.[1][2] The generalization to two samples is due to Anderson.[3]

The Cramér–von Mises test is an alternative to the Kolmogorov–Smirnov test (1933).[4]

Cramér–von Mises test (one sample)

Let [math]\displaystyle{ x_1,x_2,\ldots,x_n }[/math] be the observed values, in increasing order. Then the statistic is[3]:1153[5]

[math]\displaystyle{ T = n\omega^2 = \frac{1}{12n} + \sum_{i=1}^n \left[ \frac{2i-1}{2n} - F(x_i) \right]^2. }[/math]

If this value is larger than the tabulated value, then the hypothesis that the data came from the distribution [math]\displaystyle{ F }[/math] can be rejected.

Watson test

A modified version of the Cramér–von Mises test is the Watson test[6] which uses the statistic U2, where[5]

[math]\displaystyle{ U^2= T-n( \bar{F}-\tfrac{1}{2} )^2, }[/math]

where

[math]\displaystyle{ \bar{F}=\frac{1}{n} \sum_{i=1}^n F(x_i). }[/math]

Cramér–von Mises test (two samples)

Let [math]\displaystyle{ x_1,x_2,\ldots,x_N }[/math] and [math]\displaystyle{ y_1,y_2,\ldots,y_M }[/math] be the observed values in the first and second sample respectively, in increasing order. Let [math]\displaystyle{ r_1,r_2,\ldots,r_N }[/math] be the ranks of the xs in the combined sample, and let [math]\displaystyle{ s_1,s_2,\ldots,s_M }[/math] be the ranks of the ys in the combined sample. Anderson[3]:1149 shows that

[math]\displaystyle{ T = \frac{NM}{N+M} \omega^2 = \frac{U}{N M (N+M)} - \frac{4 M N - 1}{6(M+N)} }[/math]

where U is defined as

[math]\displaystyle{ U = N \sum_{i=1}^N (r_i-i)^2 + M \sum_{j=1}^M (s_j-j)^2 }[/math]

If the value of T is larger than the tabulated values,[3]:1154–1159 the hypothesis that the two samples come from the same distribution can be rejected. (Some books[specify] give critical values for U, which is more convenient, as it avoids the need to compute T via the expression above. The conclusion will be the same.)

The above assumes there are no duplicates in the [math]\displaystyle{ x }[/math], [math]\displaystyle{ y }[/math], and [math]\displaystyle{ r }[/math] sequences. So [math]\displaystyle{ x_i }[/math] is unique, and its rank is [math]\displaystyle{ i }[/math] in the sorted list [math]\displaystyle{ x_1,\ldots,x_N }[/math]. If there are duplicates, and [math]\displaystyle{ x_i }[/math] through [math]\displaystyle{ x_j }[/math] are a run of identical values in the sorted list, then one common approach is the midrank[7] method: assign each duplicate a "rank" of [math]\displaystyle{ (i+j)/2 }[/math]. In the above equations, in the expressions [math]\displaystyle{ (r_i-i)^2 }[/math] and [math]\displaystyle{ (s_j-j)^2 }[/math], duplicates can modify all four variables [math]\displaystyle{ r_i }[/math], [math]\displaystyle{ i }[/math], [math]\displaystyle{ s_j }[/math], and [math]\displaystyle{ j }[/math].

References

  1. Cramér, H. (1928). "On the Composition of Elementary Errors". Scandinavian Actuarial Journal 1928 (1): 13–74. doi:10.1080/03461238.1928.10416862. 
  2. von Mises, R. E. (1928). Wahrscheinlichkeit, Statistik und Wahrheit. Julius Springer. 
  3. 3.0 3.1 3.2 3.3 Anderson, T. W. (1962). "On the Distribution of the Two-Sample Cramer–von Mises Criterion" (PDF). Annals of Mathematical Statistics (Institute of Mathematical Statistics) 33 (3): 1148–1159. doi:10.1214/aoms/1177704477. ISSN 0003-4851. http://projecteuclid.org/DPubS/Repository/1.0/Disseminate?view=body&id=pdf_1&handle=euclid.aoms/1177704477. Retrieved June 12, 2009. 
  4. A.N. Kolmogorov, "Sulla determinizione empirica di una legge di distribuzione" Giorn. Ist. Ital. Attuari , 4 (1933) pp. 83–91
  5. 5.0 5.1 Pearson, E.S., Hartley, H.O. (1972) Biometrika Tables for Statisticians, Volume 2, CUP. ISBN:0-521-06937-8 (page 118 and Table 54)
  6. Watson, G.S. (1961) "Goodness-Of-Fit Tests on a Circle", Biometrika, 48 (1/2), 109-114 JSTOR 2333135
  7. Ruymgaart, F. H., (1980) "A unified approach to the asymptotic distribution theory of certain midrank statistics". In: Statistique non Parametrique Asymptotique, 1±18, J. P. Raoult (Ed.), Lecture Notes on Mathematics, No. 821, Springer, Berlin.
  • M. A. Stephens (1986). "Tests Based on EDF Statistics". Goodness-of-Fit Techniques. New York: Marcel Dekker. ISBN 0-8247-7487-6. 

Further reading