Cramér–von Mises criterion

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Technical

The shaded area indicates the region that contributes to ω2

In statistics the Cramér–von Mises criterion is a criterion used for judging the goodness of fit of a cumulative distribution function (CDF) F∗ compared to a given empirical distribution function Fn, 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 ω2, where ω2=∫−∞∞[Fn(x)−F∗(x)]2dF∗(x)

In one-sample applications F∗ is the theoretical distribution and Fn 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 x1,x2,…,xn be the observed values, in increasing order. Then the test statistic is[3]Template:Rp[5]

T=nω2=112n+∑i=1n[2i−12n−F∗(xi)]2.

If this value is larger than the tabulated value, then the hypothesis that the data came from the distribution F∗ 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]

U2=T−n(F¯−12)2,

where F¯=1n∑i=1nF∗(xi).

Cramér–von Mises test (two samples)

Let x1,x2,…,xn and y1,y2,…,ym be the observed values in the first and second sample respectively, in increasing order. Within the combined sample of size n+m, let r1,r2,…,rn be the ranks of the xs in the combined sample, and let s1,s2,…,sm be the ranks of the ys in the combined sample. Anderson[3]Template:Rp shows that

T=nmn+mω2=Unm(n+m)−4mn−16(m+n)

where U is defined as

U=n∑i=1n(ri−i)2+m∑j=1m(sj−j)2

If the value of T is larger than the tabulated values,[3]Template:Rp the hypothesis that the two samples come from the same distribution can be rejected. (Some booksTemplate: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 x, y, and r sequences. So xi is unique, and its rank is i in the sorted list x1,…,xn. If there are duplicates, and xi through xj 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 (i+j)/2. In the above equations, in the expressions (ri−i)2 and (sj−j)2, duplicates can modify all four variables ri, i, sj, and j.

Cramér distance

For two distributions on the real line with cumulative distribution functions F and G and finite first moment, the Cramér distance is

ℓ2(F,G)=[∫−∞∞(F(x)−G(x))2dx]1/2,

a metric on the space of such distributions.[8] Note that some sources define the Cramér distance as ℓ22, but this fails the triangle inequality and so cannot be properly defined as a distance. The Cramér distance is the one-dimensional case of the energy distance via the relationship 2ℓ2=D,[9] and when G represents a single observation y with cumulative distribution G(x)=𝟏{x≥y}, ℓ22(F,G) is equivalent to the continuous ranked probability score, a strictly proper scoring rule.[10]

The shaded area of this PIT reliability diagram indicates the values that are squared, integrated, and square rooted to form the Cramér distance

Under the probability integral transform (PIT), the plot of the empirical distribution of the transformed values F∗(x1),…,F∗(xn) and the uniform distribution on [0,1] creates a PIT reliability diagram. The Cramér distance ℓ2 between these two distributions equals ω, the square root of the criterion, and serves as a numerical score of the calibration error of F∗. This may also be referred to as the Root Mean Square Calibration Error (RMSCE).

For a deterministic (point) forecast at μ, the PIT degenerates to a Bernoulli random variable on {0,1} with success probability p=Pr⁡(y>μ), so in the population limit the Cramér distance between the PIT CDF and the uniform distribution evaluates in closed form to

ℓ2=[∫01((1−p)−x)2dx]1/2=p2−p+13.

This quantity is minimized at p=12 (the unbiased case) with value 112≈0.2887, establishing a calibration-error floor that no point forecast can fall below regardless of how accurate its central value is. In contrast, a well-calibrated probabilistic forecast can approach 0. Similarly, this quantity is maximized at the bias extremes p∈{0,1} with value 13≈0.5774.

References

Template:Reflist

Further reading

  1. ↑ Template:Cite journal
  2. ↑ Template:Cite book
  3. ↑ 3.0 3.1 3.2 3.3 Template:Cite journal
  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. Template:ISBN (page 118 and Table 54)
  6. ↑ Watson, G.S. (1961) "Goodness-Of-Fit Tests on a Circle", Biometrika, 48 (1/2), 109-114 Template:JSTOR
  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.
  8. ↑ Bellemare, M. G.; Danihelka, I.; Dabney, W.; Mohamed, S.; Lakshminarayanan, B.; Hoyer, S.; Munos, R. (2017). "The Cramer Distance as a Solution to Biased Wasserstein Gradients". Template:ArXiv.
  9. ↑ Székely, G. J.; Rizzo, M. L. (2013). "Energy statistics: A class of statistics based on distances". Journal of Statistical Planning and Inference. 143 (8): 1249–1272. Template:Doi.
  10. ↑ Gneiting, T.; Raftery, A. E. (2007). "Strictly proper scoring rules, prediction, and estimation". Journal of the American Statistical Association. 102 (477): 359–378. Template:Doi.