ADescribe · Guide test 260
Kuiper test
Tests circular uniformity using the sum of maximum positive and negative cumulative discrepancies.
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 = Kuiper.
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 · Kuiper 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 V* varies across samples when H₀ is true, the limiting distribution of Stephens' V* (Stephens' V* against its limiting distribution).
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .108).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- sorted directions as fractions of the full circle
- largest gaps above and below the uniform CDF; their sum does not depend on where 0° is
- Stephens' modification, compared with its limiting distribution (the curve)
The verdict
V* = 1.60, p = .108
p > α = .050: compatible with H₀
Rotation-invariant, so it also detects bimodal departures that the Rayleigh test misses; with small n it has modest power against any single alternative.
- Statistic
- 1.604
- p-value
- 0.1085
Kuiper test on Directions (°): n = 30: V* = 1.60, p = .108. The p-value is above α = .050, so the data are compatible with H₀.
Question and hypotheses
H0: a specified continuous circular distribution, often 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=F0(θ(i)) mapped to [0,1] after choosing an origin; Kuiper’s sum is rotation invariant for uniformity.
Structure of the method
Order transformed circular observations, calculate maximum positive and negative empirical-CDF discrepancies from the specified null, and sum them. For circular uniformity the combined discrepancy is insensitive to the arbitrary origin; this is why an ordinary linear KS calculation is not the same procedure.
Estimated and nuisance parameters
Estimate the empirical distribution only for a fully specified null. If mean direction, concentration, or other null-distribution parameters are fitted from the sample, they become nuisance estimates and invalidate unmodified simple-null calibration. A probability-integral transform does not remove parameter-estimation effects by itself.
Settings and design choices
Choose null distribution, units/origin convention, treatment of ties, finite-sample modification, and exact/table/simulation reference. The circular package’s kuiper.test is specifically a uniformity implementation and can report a p-value range from tabulated critical values; do not present that interval as an exact numeric p value.
Fitting and adaptation
For a fitted nonuniform null, simulate from the fitted model, refit its parameters within replicates when justified, and recalculate the complete transformed statistic. For discretized angle data, simulate the measurement process or use a suitable discrete-null method. No neural fitting is part of the classical uniformity test.
Sensitivity and robustness
Inspect sample size, rounding/heaping, repeated-subject dependence, and departures concentrated in different angular regions. Kuiper can detect more than a mean-direction change; its power pattern differs from Rayleigh’s. Use Kuiper-specific rather than KS thresholds and state whether any parameter fitting or multiple null-model comparison occurred.
How to use and calibrate
Use Kuiper-specific finite/asymptotic critical values or simulate the complete null procedure.
Example application
Detect any angular nonuniformity, including multiple modes.
Interpretation and pitfalls
Watch out
Do not use ordinary KS critical values; fitted circular parameters require refitting in simulation.
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::kuiper.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::kuiper.test(a))
Output
Kuiper's Test of Uniformity Test Statistic: 1.4629 P-value > 0.15
Sources
- circular — circular · kuiper.testAuthor documentation/source reviewed: circular 0.5-2.search.r-project.org
- kuiper.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 260, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT260.