Skip to content

Watson goodness-of-fit test

Watson’s one-sample U² centres the empirical-distribution discrepancy. A checked five-point example shows circular origin invariance and why null calibration matters.

The Watson goodness-of-fit test, in its one-sample U2U^2 form, compares an observed distribution with a proposed continuous distribution using a centred empirical-distribution discrepancy. Its distinctive circular-uniform version gives the same result wherever the analyst puts zero on the circle. For a quant studying genuinely periodic event phases, that prevents a clock-origin choice from changing the evidence against uniformity.
This page uses the unmodified one-sample Watson U2U^2 statistic. Watson's two-sample test instead compares two circular populations. The Durbin–Watson test concerns serial correlation in regression residuals, as the statsmodels documentation explains. Neither is the calculation below.

What centring changes

Let X1,…,XnX_1,\ldots,X_n be independent observations from the same distribution. Under a fully specified, continuous null CDF F0F_0, the transformed values ui=F0(Xi)u_i=F_0(X_i) are independent uniform values on the unit interval. Sort them into u(1)≤⋯≤u(n)u_{(1)}\le\cdots\le u_{(n)} and write uˉ=n−1∑iui\bar u=n^{-1}\sum_i u_i.

For circular uniformity, an angle θi\theta_i in radians becomes ui=θi/(2π)u_i=\theta_i/(2\pi) after choosing an origin and wrapping angles into [0,2π)[0,2\pi).

Begin with the Cramér–von Mises statistic and subtract its centring term:

W2=112n+∑i=1n(u(i)−2i−12n)2,U2=W2−n(uˉ−12)2.\begin{aligned} W^2 &= \frac{1}{12n}+\sum_{i=1}^{n}\left(u_{(i)}-\frac{2i-1}{2n}\right)^2,\\ U^2 &= W^2-n\left(\bar u-\frac12\right)^2. \end{aligned}

Equivalently, centre each difference inside the sum:

U2=112n+∑i=1n(u(i)−2i−12n−uˉ+12)2.U^2=\frac{1}{12n}+\sum_{i=1}^{n}\left(u_{(i)}-\frac{2i-1}{2n}-\bar u+\frac12\right)^2.
This is the convention in NCSS's Watson-test formula, page 230-5. Larger values indicate greater discrepancy, with significance assessed against the appropriate null distribution.
The centring has a precise interpretation. Let Gn(t)G_n(t) be the empirical CDF of the transformed values and let D(t)=Gn(t)−tD(t)=G_n(t)-t. Then
U2=n∫01[D(t)−∫01D(s) ds]2dt.U^2=n\int_0^1\left[D(t)-\int_0^1D(s)\,ds\right]^2dt.
It measures variation in the empirical discrepancy after removing its average height. That is why this statistic suits a circle whose cut point is arbitrary. The integral formulation and origin invariance are discussed in Bentley's SFU thesis, §5.2.1. For a nonuniform circular null, changing angular origin also requires expressing the null CDF from that new origin; shifting observations alone changes the question.

Five fictional observations, two origins

Take the ordered null transforms 0.05,0.25,0.40,0.75,0.900.05,0.25,0.40,0.75,0.90. Here n=5n=5 and uˉ=0.47\bar u=0.47. Their differences from the reference positions 0.10,0.30,0.50,0.70,0.900.10,0.30,0.50,0.70,0.90 are −0.05,−0.05,−0.10,0.05,0-0.05,-0.05,-0.10,0.05,0.

W2=160+0.0025+0.0025+0.0100+0.0025+0=0.0341667,U2=0.0341667−5(0.47−0.50)2=0.0296667.\begin{aligned} W^2 &= \frac{1}{60}+0.0025+0.0025+0.0100+0.0025+0\\ &=0.0341667,\\ U^2 &=0.0341667-5(0.47-0.50)^2\\ &=0.0296667. \end{aligned}

Now add 0.200.20 modulo one and sort again. The values become 0.10,0.25,0.45,0.60,0.950.10,0.25,0.45,0.60,0.95; the Watson statistic remains 0.02966670.0296667. This rotation happens to leave W2W^2 unchanged too. A rotation of 0.100.10 makes the distinction visible: W2W^2 becomes 0.11416670.1141667, while its larger centring subtraction leaves the same U2U^2.

Five fictional transforms rotated by zero, 0.1 and 0.2; a full rotation sweep changes W squared but keeps Watson U squared at 0.029667.
Five fictional transforms rotated by zero, 0.1 and 0.2; a full rotation sweep changes W squared but keeps Watson U squared at 0.029667.
Original fictional calculation. A rotation changes the interval representation of the same circular configuration. Watson's centred statistic stays fixed across the entire turn.

These five observations illustrate the arithmetic only. They establish neither uniformity nor a rejection decision. In particular, NCSS restricts its documented tabular procedure to at least eight angles; its table should not be used to attach a p-value to this example.

A statistic still needs a matching reference law

For a known continuous F0F_0 and independent observations, null calibration can use the corresponding Watson distribution or simulation at the actual sample size. A U2U^2 value is not a chi-squared statistic, and a Cramér–von Mises table calibrates a different quantity.

If parameters of F0F_0 were estimated from these same observations, the transformed values no longer have the simple independent-uniform null law. Use a calibration specific to that fitted model and fitting method. A parametric bootstrap simulates from the fitted null, refits each simulated sample, then recomputes its transformed U2U^2. Bentley, §§5.2.1–5.2.3, distinguishes known-parameter calibration from this fitted-parameter procedure. The official circular package documentation likewise distinguishes uniform and fitted von Mises cases.

For market data, verify what is actually circular. A trading session has an opening and a close that may be economically distinct; wrapping them together needs justification. Event times may also cluster or follow a nonuniform intraday intensity. A uniformity test does not remove that dependence or seasonality. Ties, discrete observations and serial dependence require a reference procedure that represents those features; the continuous independent null above does not cover them. A failure to reject remains a lack of sufficient evidence against the specified null, rather than proof of correct calibration.

For the empirical-distribution foundation, The Empirical CDF, Glivenko–Cantelli, and QQ-Plots develops the staircase distribution and visual shape diagnostics. The public page is a preview; the full lesson requires membership.

Sources

Last updated
  • goodness of fit
  • circular statistics
  • empirical distribution
  • watson u squared
  • null calibration
← Back to the glossaryBack to top ↑