Quant Memo
Advanced

Cramér-von Mises and Watson Tests

Goodness-of-fit tests that measure the total squared gap between a sample's empirical distribution and a proposed model across every point, rather than the single worst gap that Kolmogorov-Smirnov looks at — more sensitive when the mismatch is spread out rather than concentrated in one spot.

Prerequisites: The Kolmogorov-Smirnov Test, Hypothesis Testing

You've fit a normal distribution to a return series and want to check whether the fit is any good. The Kolmogorov-Smirnov test answers this by finding the single largest gap between your data's empirical distribution and the fitted model — but a model can be systematically, mildly wrong everywhere without ever having one dramatic gap, and KS can miss exactly that kind of diffuse mismatch. The Cramér-von Mises test (and its close relative, the Watson test) fix this by summing up the squared gap across the entire distribution rather than reporting only its worst point, making them more sensitive to broad, evenly spread departures from the model.

An analogy: judging a tailor by one bad seam versus overall fit

Imagine grading two tailors on how well a suit fits. Tailor A's suit is perfect everywhere except one seam that gapes noticeably at the shoulder. Tailor B's suit has no single glaring flaw, but is a little loose in the waist, a little tight in the chest, and a touch long in the sleeve — every measurement slightly off, nowhere dramatically so. A judge who only checks "what's the single worst measurement" (like Kolmogorov-Smirnov) might flag Tailor A as the worse fit and pass Tailor B. A judge who adds up every measurement's deviation, squared, across the whole suit (like Cramér-von Mises) would correctly recognize that Tailor B's suit, while never egregiously wrong at any one point, is actually a worse overall fit once every small gap is counted.

The mechanics, one piece at a time

Let Fn(x)F_n(x) be the sample's empirical distribution function (the fraction of observations x\le x) and F(x)F(x) be the fitted model's cumulative distribution function. The Cramér-von Mises statistic is

ω2=n[Fn(x)F(x)]2dF(x),\omega^2 = n \int_{-\infty}^{\infty} \left[ F_n(x) - F(x) \right]^2 dF(x),

In plain English: at every point along the distribution, measure the squared vertical gap between the data's cumulative curve and the model's cumulative curve, then integrate (sum continuously) that squared gap across the whole range, weighting more heavily where the model expects more probability mass. Unlike KS, which reports only maxxFn(x)F(x)\max_x |F_n(x) - F(x)| (the single worst gap), ω2\omega^2 accumulates evidence from everywhere the two curves disagree, so it detects diffuse, whole-distribution mismatches that a single-point statistic can miss. The Watson test is a close variant, U2U^2, that additionally corrects for the curve's overall vertical shift before integrating — making it specifically useful when you suspect the model is right about spread and shape but the data might be centered slightly differently (relevant on a circular scale, like time-of-day effects, where "shift" doesn't have a fixed reference point).

Worked example 1: a diffusely miscalibrated volatility model

A risk model assumes standardized daily returns follow a standard normal. Comparing 250 days of actual standardized returns against the normal CDF: KS finds a maximum gap of 0.04 at the 90th percentile — not statistically alarming on its own (critical value around 0.086 for n=250n=250 at 5% significance). But the Cramér-von Mises statistic, summing squared gaps across all 250 comparison points, comes out to ω2=0.61\omega^2 = 0.61, comfortably above its 5% critical value of about 0.461 — flagging the fit as poor even though no single point looked dramatically off. The model isn't badly wrong anywhere in particular; it's mildly wrong almost everywhere, understating tail thickness a bit and overstating central density a bit, and only a whole-curve statistic like ω2\omega^2 picks that up.

Worked example 2: comparing test power at a glance

Simulate 500 samples of size 100 from a Student-t distribution (5 degrees of freedom) and test each against a fitted normal. Kolmogorov-Smirnov correctly rejects normality (at 5% significance) in roughly 38% of samples; Cramér-von Mises rejects in roughly 55% of samples — because the t-distribution's departure from normal is spread broadly across the whole curve (heavier everywhere in the tails, not just at one location), which is precisely the kind of mismatch Cramér-von Mises is built to detect more reliably than a single-worst-gap statistic.

KS: 1 gap CvM sums squared gaps everywhere along the curve
Kolmogorov-Smirnov reports only the single largest vertical gap between empirical and fitted curves; Cramér-von Mises integrates the squared gap across the entire curve, catching diffuse mismatches KS can miss.
KS: 38% CvM: 55% rejection rate detecting a diffusely heavy-tailed t-distribution
Simulated repeatedly against samples drawn from a Student-t distribution, Cramér-von Mises detects the departure from normality noticeably more often than Kolmogorov-Smirnov, because the mismatch is spread across the whole curve rather than concentrated at one point.

What this means in practice

Use Cramér-von Mises or Watson over Kolmogorov-Smirnov whenever you suspect a fitted distribution is subtly wrong across its whole shape rather than badly wrong in one spot — common when checking whether standardized returns really are normal, whether a copula fit captures joint tail behavior, or whether a simulated model's output distribution matches historical data. The Watson variant specifically suits circular or seasonal data (intraday time, day-of-week effects) where there's no natural fixed starting point for the comparison.

Cramér-von Mises integrates the squared gap between empirical and fitted cumulative distributions across the entire range, rather than reporting only the single largest gap the way Kolmogorov-Smirnov does — making it more sensitive to a model that's mildly wrong everywhere, at the cost of being less interpretable as "the worst single point of failure."

A significant Cramér-von Mises result tells you the fit is poor somewhere or everywhere across the distribution, but not where — unlike KS, which hands you the exact location of its one worst gap, a large ω2\omega^2 statistic gives no direct pointer to which region of the distribution (center, tails, or both) is driving the rejection. Always follow up a significant CvM result with a Q-Q plot or a region-by-region residual check before concluding what specifically is wrong with the fitted model.

Related concepts

Practice in interviews

Further reading

  • Anderson, Darling, Asymptotic Theory of Certain Goodness of Fit Criteria, Annals of Mathematical Statistics (1952)
ShareTwitterLinkedIn