AI Glossary / Statistics and probability / Advanced
Lepage test
Definition
The Lepage test is a two-sample rank test that combines evidence about location and scale differences. Its classical statistic adds the squared standardized Wilcoxon rank-sum statistic and the squared standardized Ansari-Bradley statistic. It tests a common-distribution null against alternatives that can involve a shift in location, a change in spread or both. It is useful when a comparison should consider these two aspects together rather than focusing only on a central tendency. Its interpretation depends on sampling, continuity and location-scale assumptions.
What it means
Two groups can differ without a large difference in their averages. One may be more variable, or both its position and spread may change. The Lepage statistic combines two complementary rank summaries into one nonnegative measure. A large value indicates that the joint pattern is unusual under the null calibration. It does not identify a unique cause of the difference, measure its business importance or establish which component changed. Location and scale language is clearest within an appropriate family of distributions; arbitrary shape changes require more careful interpretation.
How it works
Pool two independent samples and rank the observations. Compute a location rank sum for one group and an Ansari-Bradley score sum that assigns larger scores near the center of the pooled ordering. Standardize each sum using its null mean and variance, then add their squares. Determine significance using an exact permutation distribution, Monte Carlo approximation or justified large-sample approximation. With continuous no-tie data under the common-distribution null, labels are exchangeable. Ties and dependence require suitable handling rather than blindly applying no-tie formulas or unrestricted permutations.
Three practical examples
- Process comparison: examine whether a new operating condition changes typical output, variability or both.
- Service analysis: compare response-time samples when both speed and consistency matter.
- Model monitoring: investigate changes in a continuous measurement distribution across two independent samples. Repeated monitoring needs its own false-alarm strategy, and serial observations cannot automatically be treated as independent samples.
Think of it this way
Think of a dashboard with two needles: one responds to a positional shift, while the other responds to a spread-related change. The Lepage statistic combines the standardized movements of both needles. The combined alarm says that the overall pattern deserves attention; it does not tell you that both needles moved or that a particular operational cause has been established.
Worked example
Take sample X = (1,2,6) and sample Y = (3,4,5), with no ties. X occupies pooled ranks 1,2,6, so its Wilcoxon sum is 9. Under the null, the mean is 10.5 and variance is 5.25. The Ansari-Bradley scores along ranks 1 through 6 are 1,2,3,3,2,1. X's score sum is 4, compared with null mean 6 and variance 1.2. The Lepage statistic is (9-10.5) squared/5.25 + (4-6) squared/1.2 = 79/21, approximately 3.7619. Enumerating all twenty ways to assign three of the six pooled observations to X gives six statistics at least this large. The exact upper-tail p-value is therefore 6/20 = 0.30. This original calculation illustrates why a seemingly large component difference in a tiny sample need not provide strong evidence against the null.
Illustrative case study
In a fictional case, Pine Service Labs compares completion-time samples from two independently assigned workflow conditions. The analysts prespecify a joint location-scale comparison because consistency matters as well as speed. They report the Lepage result alongside group summaries and distribution plots. When the combined statistic is notable, they investigate the component patterns and practical differences without treating the joint test as proof that both location and spread changed. A later study is planned to assess whether the observed differences persist.
Common misconceptions and mistakes
The Lepage test is not a test only of means, nor is it simply two separate tests each judged at an unadjusted threshold. Squaring component scores removes direction from the combined statistic. A nonsignificant result does not establish equivalent distributions. Distribution-free does not mean assumption-free: independence and the null randomization structure matter. Ties can alter the reference distribution. Large-sample chi-square calibration may be poor for small samples, and a joint rejection alone does not justify a specific location or variance effect claim.
Business use
Business users should choose the joint question before examining results and describe the response distribution in units that decision-makers understand. Report sample sizes, statistic, calibration method and handling of ties. Pair the test with effect summaries relevant to the application rather than replacing practical interpretation with a p-value. If many segments or time windows are tested, account for the resulting multiplicity. Where observations are paired, clustered or serially dependent, use a method and resampling scheme matched to that structure.
People also ask
Does rejection mean both location and scale changed?
No. Either component, or their combined evidence, can produce rejection.
Is the test nonparametric?
Yes in its classical rank-based form, but the sampling and calibration assumptions still apply.
Can exact and asymptotic p-values differ?
Yes. Exact enumeration uses the finite permutation distribution, whereas the asymptotic approximation relies on a limiting distribution and may be inaccurate with very small samples.
Check your understanding
Why is the example's exact p-value 0.30 rather than the fraction of observations in an extreme tail?
Answer: It is the fraction of valid group-label allocations whose complete joint statistic is at least as large as observed. The reference unit is a possible allocation under the null, not an individual measurement.
Related terms
- Ansari-Bradley test
- Permutation test
- Wilcoxon rank-sum test
- location-scale test
- rank statistic
- exchangeability
- exact p-value
- distributional comparison
Learn next
Study the component rank scores and how their null moments are derived. Then compare exact, Monte Carlo and asymptotic calibration, including the effects of ties and dependent observations. Learn how a joint test differs from estimating interpretable changes in location and spread.
More in Statistics and probability
- Least squares estimate - A least squares estimate is a parameter value obtained by minimizing a sum of squared discrepancies between observed data and a specified model.
- Least squares regression - Least squares regression fits a relationship between predictors and a response by minimizing the sum of squared response residuals.
- Least-squares support vector machine - A least-squares support vector machine, or LS-SVM, is a kernel-based learning formulation that uses squared errors and equality constraints in place of the...
- Leptokurtic - Leptokurtic describes a distribution whose kurtosis exceeds that of a normal distribution: Pearson kurtosis greater than 3, or excess kurtosis greater than...
- Levene test - The Levene test assesses whether two or more groups have equal variances by comparing their absolute deviations from a group-specific center.
- Leverage - Leverage is a regression diagnostic that measures how unusual an observation's predictor configuration is relative to the fitted design and how strongly its...
Sources
NSM3 authors' pLepage implementation: https://rdrr.io/cran/NSM3/src/R/pLepage.R . NSM3 manual: https://ftp.eenet.ee/pub/cran/web/packages/NSM3/NSM3.pdf . These provide the statistic and calibration procedures. The finite enumeration and fictional case above are original illustrations.
Previous: Lens-profile correction Next: Leptokurtic