Skip to content

FTime to event · Guide test 131

Meintanis–Iliopoulos exponentiality tests

Use characteristic function characterizations to assess exponential fit.

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

Do it in CodeSplash

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

In Exponentiality tests (battery), choose Test = Meintanis–Iliopoulos, exponential weight.

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 · Meintanis–Iliopoulos exponentiality tests

25
1.60

1 is the exponential (constant hazard); above 1 wear-out, below 1 early failures.

2.0

Weight function

0.050

Your data

Weibull lifetimes; shape 1 is exponential
Lifetimes · n = 25 · mean 2.07

If H₀ were true

T = 3.45
  1. The reference: how T varies across samples when H₀ is true, simulated: 999 exponential samples of 25 (simulated null on the shared Wichmann–Hill stream).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .005).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

T=n∫0∞(Sn(t)−tCn(t))2w(t) dtT=n\int_0^\infty\left(S_n(t)-tC_n(t)\right)^2w(t)\,dt

With your numbers

T=3.45,n=25T = 3.45,\qquad n = 25
Cn, SnC_n,\ S_n
empirical cosine and sine transforms
w(t)w(t)
weight function

The verdict

T = 3.45, p = .005

p ≤ α = .050: reject H₀

Uses a differential equation the exponential's characteristic function satisfies; the integral has a closed form over pairs. H0 fixes no scale: every statistic uses x / x̄.

Statistic
3.448
p-value
0.0050
Meintanis–Iliopoulos exponentiality tests on Lifetimes: n = 25: T = 3.45, p = .005. The p-value is below α = .050, so the data are hard to reconcile with H0.

Meintanis–Iliopoulos exponentiality tests on Lifetimes: n = 25: T = 3.45, p = .005. 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

Ta=n∫0∞[Sn(t)−tCn(t)]2wa(t) dtT_a=n\int_0^\infty[S_n(t)-tC_n(t)]^2w_a(t)\,dt

Parameters and notation

Cn(t)=n⁻¹Σcos(tYi), Sn(t)=n⁻¹Σsin(tYi); wa(t)=e^(−at) or e^(−at²), a>0. This is the sine–cosine characterization used by EWGoF’s MI-labeled implementation.

Structure of the method

Compute empirical sine and cosine transforms of standardized lifetimes and integrate their squared deviation from the exponential relation. EWGoF T1/T2 denotes particular weighted versions; the characterization and finite-sample implementation, rather than author names alone, define the procedure.

Estimated and nuisance parameters

Estimate the common exponential scale through the sample mean. Sine/cosine averages are empirical transform estimates. The weight decay a and transform variant are algorithm settings, not learned parameters.

Settings and design choices

Prespecify positive a, exponential versus Gaussian weighting, exact implementation normalization, significance level and simulation count. If numerical quadrature replaces a closed form, document truncation and accuracy tolerances separately from statistical tuning.

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

Rounding can change oscillatory transform discrepancies, particularly when high frequencies receive weight. Adaptive choice of a may manufacture apparent power unless included in null simulation. Nonpositive times, censoring and serial dependence violate the basic data model; a calibrated null cannot repair an undefined input population.

How to use and calibrate

Use upper-tail null simulation, repeating scale normalization; hold the selected weight and tuning parameter fixed.

Example application

Assess the exponential characteristic-function relation Im φ(t)=t Re φ(t) after standardizing scale.

Interpretation and pitfalls

Watch out

Attribution/labels vary across sources in this literature. The Meintanis–Iliopoulos characterization also underlies the squared-modulus family in entry 130; equations, not labels alone, identify the procedure.

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

EWGoF labeling: W1 for the squared-modulus HM family; T1 for the sine–cosine MI family. Tuning parameter a=1 is fixed in advance. Only 199 simulations are used for a quick demonstration; increase for final inference.

Python · invokes R

Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: EWGoF

# 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(20,rate=2)
print(EWGoF::CF.test(x,type="T1",a=1,nsim=199))
"""
# 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

Not run — Syntax checked; runtime not verified in the final environment · needs EWGoF

set.seed(2026)
x<-rexp(20,rate=2)
print(EWGoF::CF.test(x,type="T1",a=1,nsim=199))

Sources

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 131, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT131.