FTime to event · Guide test 137
Atkinson exponentiality test
Uses an inequality based statistic to test the composite exponential distribution hypothesis.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Exponentiality tests (battery) — Could these lifetimes be exponential, with a constant failure rate?
In Exponentiality tests (battery), choose Test = Atkinson.
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 · Atkinson exponentiality test
1 is the exponential (constant hazard); above 1 wear-out, below 1 early failures.
Your data
Weibull lifetimes; shape 1 is exponentialIf H₀ were true
- The reference: how z varies across samples when H₀ is true, simulated: 999 exponential samples of 25 (simulated null on the shared Wichmann–Hill stream).
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .030).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- the moment order (0.99)
The verdict
z = 2.07, p = .030
p ≤ α = .050: reject H₀
Compares a power mean with the exponential's; the statistic is non-negative, so only the upper tail is extreme. H0 fixes no scale: every statistic uses x / x̄.
- Statistic
- 2.074
- p-value
- 0.0300
Atkinson exponentiality test on Lifetimes: n = 25: z = 2.07, p = .030. The p-value is below α = .050, so the data are hard to reconcile with H₀.
Question and hypotheses
H0: Xi are exponential with some common mean θ>0; H1: a departure detectable by this statistic.
Assumptions
Independent identically distributed positive, uncensored observations. The null is an exponential distribution with unknown scale and known origin zero. Censored, shifted or dependent samples need specialized versions.
Formula
Parameters and notation
p is a prespecified nonzero tuning parameter; require p>−1/2 for the stated variance and exclude the degenerate p=1. σp²=Γ(1+p)^(2/p)[−1−1/p²+Γ(1+2p)/(p²Γ(1+p)²)].
Structure of the method
Compare a generalized power mean with the arithmetic mean after subtracting the exponential-null ratio. Standardize the discrepancy using its specified asymptotic variance or simulate the full scale-free statistic. Different powers emphasize different parts of the lifetime distribution.
Estimated and nuisance parameters
The arithmetic mean estimates scale, while the empirical power moment estimates the generalized-mean functional. The power p is a design setting; the null does not estimate a flexible shape family.
Settings and design choices
Choose p before analysis, avoid zero without using its separate logarithmic limit, exclude the degenerate value one and respect p>−1/2 for the displayed variance. State how near-zero observations are handled without arbitrary offsets.
Fitting and adaptation
There is no neural fitting or fine-tuning stage. For an unknown-scale exponential null, exploit scale invariance or re-estimate the mean in every simulated unit-exponential sample, exactly matching the observed-data algorithm. Calibrate the prespecified tail and repeat the entire procedure after changing a tuning rule. Report simulation count and Monte Carlo uncertainty; use a plus-one randomized p-value convention for newly implemented Monte Carlo tests.
Sensitivity and robustness
Negative powers emphasize very small observations and can be unstable under rounding; positive powers emphasize long tails. Powers near a degenerate limit can suffer cancellation. A targeted ratio can match the exponential null under other distributions, and selecting p post hoc requires a calibrated search or independent validation.
How to use and calibrate
Use the |N(0,σp²)| upper tail or null simulation; p→0 has a separate limiting form.
Example application
Compare a generalized mean with the arithmetic mean expected under exponentiality.
Interpretation and pitfalls
Watch out
Negative powers amplify near-zero values. The tuning parameter changes power and may require careful numerical evaluation.
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
Uses exptest 1.2 (archived CRAN package); see installation notes. Complete positive uncensored lifetimes, unknown exponential scale and known origin zero. Defaults and tail calibration follow the cited function.
Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: exptest
# 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)
x<-rexp(24,rate=2)
print(exptest::atkinson.exp.test(x))
"""
# 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()
Not run — Syntax checked; runtime not verified in the final environment · needs exptest
set.seed(2026)
x<-rexp(24,rate=2)
print(exptest::atkinson.exp.test(x))
Sources
- exptest — exptest · atkinson.exp.testAuthor documentation/source reviewed: exptest 1.2.rdrr.io
- atkinson.exp.testrdrr.io
- Statistics guide v4 (historical):
- Python: Python launcher syntax checked; R backend runtime not verified · R: Syntax checked; runtime not verified in the final 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 137, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT137.