Flat shoulders and a corrected cutoff for the dip test: where the uniform distribution is not the worst case

The dip test of Hartigan and Hartigan (1985) is the standard nonparametric test of whether data come from a distribution with a single peak or with several (unimodality against multimodality). A single flat top also counts as one peak. The test measures how far the empirical distribution function of a sample lies from the nearest unimodal distribution function. Its critical values are taken from the uniform distribution, which was believed to produce the largest dip among unimodal laws. We show that some unimodal laws produce larger dips. Suppose the density is flat over most of its range and then jumps up to a narrow peak. Every close unimodal fit must then curve upward over the whole flat stretch, so it can no longer bend to follow random bumps in the data. In large samples the random error of the sample's distribution function on the flat stretch looks like a Brownian bridge, and the dip behaves like half the largest gap between that bridge and the smallest concave curve above it (its concave majorant). Balabdaoui and Pitman (2011) found the law of this gap. It tends to be larger than the dip under the uniform (it is stochastically larger), so the uniform critical values are too small. With 90% of the mass on the flat stretch, the nominal 5% test rejects about one sample in four, however large the sample. Over unimodal laws on a bounded interval that have no point masses and a finite density at the peak, we prove that the worst limiting rejection rate of the standard test lies between 28.4% and 33.2% at the 5% level, and between 12.7% and 16.8% at the 1% level. These are ranges, not single numbers, because the large-sample critical value of the uniform calibration is itself known only to lie in a narrow, rigorously computed range. The repair is a constant cutoff on the √n scale: reject when the dip exceeds cα/√n, where cα is half the (1 − α) quantile of the Balabdaoui–Pitman gap (c0.05 ≈ 0.7314, c0.01 ≈ 0.8599). In large samples this keeps the false-alarm rate at or below the stated level for every law in the class. No smaller cutoff can do this: any cutoff rule fixed in advance that settles below cα fails for some law. The same ranges hold when the worst law may change with the sample size and may be any continuous unimodal law. This part uses a computer-assisted argument with Monte Carlo certificates: simulations whose decision rule is fixed beforehand and whose chance of a wrong conclusion is bounded. We also give cutoffs for small samples, each checked by such a certificate. On symmetric normal mixtures the corrected test needs about twice as many observations as the uniform-calibrated one to reach the same power. Code, deposited outputs, frozen run protocols and Lean 4 files: https://doi.org/10.5281/zenodo.24537718 (also at https://github.com/MomenAhmed05/dip-test-calibration).

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-26
DOI
https://doi.org/10.5281/zenodo.24571369
Primary Topic
Statistical Distribution Estimation and Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Flat shoulders and a corrected cutoff for the dip test: where the uniform distribution is not the worst case

Moemen Ahmed
Zenodo (CERN European Organization for Nuclear Research)
Statistical Distribution Estimation and Applications
preprint

Flat shoulders and a corrected cutoff for the dip test: where the uniform distribution is not the worst case

Moemen Ahmed
preprint en

Abstract

The dip test of Hartigan and Hartigan (1985) is the standard nonparametric test of whether data come from a distribution with a single peak or with several (unimodality against multimodality). A single flat top also counts as one peak. The test measures how far the empirical distribution function of a sample lies from the nearest unimodal distribution function. Its critical values are taken from the uniform distribution, which was believed to produce the largest dip among unimodal laws. We show that some unimodal laws produce larger dips. Suppose the density is flat over most of its range and then jumps up to a narrow peak. Every close unimodal fit must then curve upward over the whole flat stretch, so it can no longer bend to follow random bumps in the data. In large samples the random error of the sample's distribution function on the flat stretch looks like a Brownian bridge, and the dip behaves like half the largest gap between that bridge and the smallest concave curve above it (its concave majorant). Balabdaoui and Pitman (2011) found the law of this gap. It tends to be larger than the dip under the uniform (it is stochastically larger), so the uniform critical values are too small. With 90% of the mass on the flat stretch, the nominal 5% test rejects about one sample in four, however large the sample. Over unimodal laws on a bounded interval that have no point masses and a finite density at the peak, we prove that the worst limiting rejection rate of the standard test lies between 28.4% and 33.2% at the 5% level, and between 12.7% and 16.8% at the 1% level. These are ranges, not single numbers, because the large-sample critical value of the uniform calibration is itself known only to lie in a narrow, rigorously computed range. The repair is a constant cutoff on the √n scale: reject when the dip exceeds cα/√n, where cα is half the (1 − α) quantile of the Balabdaoui–Pitman gap (c0.05 ≈ 0.7314, c0.01 ≈ 0.8599). In large samples this keeps the false-alarm rate at or below the stated level for every law in the class. No smaller cutoff can do this: any cutoff rule fixed in advance that settles below cα fails for some law. The same ranges hold when the worst law may change with the sample size and may be any continuous unimodal law. This part uses a computer-assisted argument with Monte Carlo certificates: simulations whose decision rule is fixed beforehand and whose chance of a wrong conclusion is bounded. We also give cutoffs for small samples, each checked by such a certificate. On symmetric normal mixtures the corrected test needs about twice as many observations as the uniform-calibrated one to reach the same power. Code, deposited outputs, frozen run protocols and Lean 4 files: https://doi.org/10.5281/zenodo.24537718 (also at https://github.com/MomenAhmed05/dip-test-calibration).

Zenodo (CERN European Organization for Nuclear Research)
Statistical Distribution Estimation and Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon