Skip to content

ADescribe · Guide test 261

Watson U squared one sample test

Tests circular uniformity using a rotation invariant integrated cumulative discrepancy.

Runs in CodeSplashPython (calls R) example not runR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In Tests of circular uniformity (Rayleigh, V, Kuiper, Watson, Rao), choose Test = Watson U².

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Watson U² test

30
60
70

Large spreads approach a uniform circle.

0.050

Your data

Drag a point or use ↑/↓ to change it
0°90°180°270°Directions: n = 30, θ̄ = 57°, R̄ = 0.35

Sectors are area-proportional counts; the arrows point to each mean direction, with length R̄ (0: no preferred direction, 1: all identical).

If H₀ were true

U²* = 0.22
  1. The reference: how U²* varies across samples when H₀ is true, the limiting distribution of Watson's U²* (Stephens' U²* against its limiting distribution).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .028).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

U2=112n+∑i=1n[u(i)−2i−12n−uˉ+12]2,U2∗=(U2−0.1n+0.1n2)(1+0.8n)U^2=\frac1{12n}+\sum_{i=1}^n\left[u_{(i)}-\frac{2i-1}{2n}-\bar u+\frac12\right]^2,\qquad U^{2*}=\Big(U^2-\frac{0.1}n+\frac{0.1}{n^2}\Big)\Big(1+\frac{0.8}n\Big)

With your numbers

U2=0.21,n=30,U2∗=0.22U^2 = 0.21,\quad n = 30,\quad U^{2*} = 0.22
u(i)u_{(i)}
sorted directions as fractions of the circle
uˉ\bar u
their mean; subtracting it makes U² rotation-invariant
U2∗U^{2*}
Stephens' modification, compared with the limiting U² distribution (the curve)

The verdict

U²* = 0.22, p = .028

p ≤ α = .050: reject H₀

An integrated (Cramér–von Mises type) discrepancy, so it weighs the whole circle rather than the single largest gap as Kuiper does.

Statistic
0.215
p-value
0.0285
Watson U² test on Directions (°): n = 30: U²* = 0.22, p = .028. The p-value is below α = .050, so the data are hard to reconcile with H0.

Watson U² test on Directions (°): n = 30: U²* = 0.22, p = .028. The p-value is below α = .050, so the data are hard to reconcile with H₀.

Question and hypotheses

H0: a specified circular distribution, usually uniformity.

Assumptions

Independent angular observations with a clear radians/degrees convention and orientation. The usual null uses a full circular domain; axial data require an appropriate doubling transformation or axial model.

Formula

U2=112n+∑i[ui−2i−12n−uˉ+12]2U^2=\frac1{12n}+\sum_i\left[u_i-\frac{2i-1}{2n}-\bar u+\frac12\right]^2

Parameters and notation

ui are ordered transformed angles under F0; ū their mean. Centering the empirical CDF discrepancy removes dependence on circular origin.

Structure of the method

Compute an integrated squared empirical-CDF discrepancy and remove its mean component to obtain a circular-origin-invariant statistic. The one-sample uniformity version compares an empirical distribution with a specified circular null, while fitted von Mises goodness-of-fit involves an additional parameter-estimation problem.

Estimated and nuisance parameters

For uniformity, only empirical ordered angles and their transformed mean are calculated; no location/concentration is fitted. For a von Mises null, estimated mean direction and concentration affect calibration. These cases should not share critical values merely because the same named statistic can be computed.

Settings and design choices

Choose null family, angular units, tie treatment, finite-sample/table convention, and significance level or simulation count. The cited package can return p-value bounds rather than a continuous exact p value. The default demonstration uses uniformity; it does not automatically test the fit of an estimated arbitrary circular model.

Fitting and adaptation

Adapt by explicitly defining the null and, for composite hypotheses, repeating parameter fitting in a valid bootstrap/simulation calibration. Avoid selecting among null families on the same p values without accounting for model selection. The centering operation removes origin dependence, not dependence among observations or errors in the measurement process.

Sensitivity and robustness

Inspect multimodality, localized versus diffuse deviations, rounding, small sample sizes, and repeated measurements. A nonrejection does not prove uniformity or a specific von Mises shape. Distinguish this one-sample statistic from Watson’s two-sample homogeneity statistic; their inputs, normalization, and null references differ.

How to use and calibrate

Use Watson U² critical values or null simulation; parameter-fitted versions require distinct calibration.

Example application

Test circular uniformity with an integrated discrepancy.

Interpretation and pitfalls

Watch out

This one sample U² differs from the two sample homogeneity test in entry 263.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Angles are in radians on a full circle. The V test specifies direction zero in advance; ordinary Rayleigh does not. Some circular routines return critical-value ranges rather than a continuously resolved p-value.

Python · invokes R

Not run — Executed end to end through Rscript · needs Python standard library + Rscript; R packages: circular

# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
    raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
a<-circular::circular(runif(40,0,2*pi),units="radians")
print(circular::watson.test(a))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
                        text=True, capture_output=True)
print(result.stdout)
if result.stderr:
    print(result.stderr)
result.check_returncode()
R

Validated — Executed successfully in the validation environment · needs circular

set.seed(2026)
a<-circular::circular(runif(40,0,2*pi),units="radians")
print(circular::watson.test(a))
Output
       Watson's Test for Circular Uniformity 
 
Test Statistic: 0.0852 
P-value > 0.10

Sources

Statistics guide v4 (historical):
Python: Executed end to end through Rscript · R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 261, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT261.