ADescribe · Guide test 261
Watson U squared one sample test
Tests circular uniformity using a rotation invariant integrated cumulative discrepancy.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Tests of circular uniformity (Rayleigh, V, Kuiper, Watson, Rao) — Are the directions or times spread evenly round the circle, or do they prefer some directions?
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
Large spreads approach a uniform circle.
Your data
Drag a point or use ↑/↓ to change itSectors 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
- The reference: how U²* varies across samples when H₀ is true, the limiting distribution of Watson's U²* (Stephens' U²* against its limiting distribution).
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .028).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- sorted directions as fractions of the circle
- their mean; subtracting it makes U² rotation-invariant
- 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 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
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.
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()
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
- circular — circular · watson.testAuthor documentation/source reviewed: circular 0.5-2.search.r-project.org
- watson.testsearch.r-project.org
- circularsearch.r-project.org
- 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.