Linear Rank Statistics and Locally Most Powerful Rank Tests
Anchor (Master): Hájek & Šidák 1967 Theory of Rank Tests (Academic Press) Ch. II (rank distribution theory), Ch. V (the projection / Hájek-projection lemma and asymptotic normality under alternatives), Ch. VI (contiguity), Ch. VII (locally most powerful rank tests and asymptotically optimal scores); Hájek, Šidák & Sen 1999 Theory of Rank Tests 2e (Academic Press); van der Vaart 1998 Asymptotic Statistics (Cambridge) Ch. 13-14 (rank tests and their asymptotic efficiency); Hájek 1968 Asymptotic normality of simple linear rank statistics under alternatives (Ann. Math. Statist. 39)
Intuition Beginner
Suppose you measure something and you do not trust the scale. The numbers might be off by some unknown stretch or warp, but the order of the numbers — who came first, who came last — you trust completely. Rank methods throw away the raw measurements and keep only this order. Each observation is replaced by its position in the sorted list: the smallest gets rank one, the next gets rank two, and so on. A great deal of honest inference can be done with the ranks alone.
Why is that a good idea? Because the ranks of a shuffled deck do not know what the deck is made of. If the data are just noise with no real signal, then every ordering of the observations is equally likely, no matter what shape the noise has. That single fact — every order equally likely under "nothing is going on" — lets you compute exact error rates for a test without ever knowing the distribution behind the data. A test built this way is called distribution-free: its false-alarm rate is the same whether the noise is bell-shaped, heavy-tailed, or lopsided.
A linear rank statistic is the simplest useful thing you can build from ranks. You attach a weight to each observation (which group it is in, or where it sits along some predictor) and a score to each rank position, then add up weight times score across the sample. Different choices of score give different classic tests: Wilcoxon's test, the normal-scores test, the sign test. The art is choosing the score that is most sensitive to the kind of departure you care about.
The takeaway: replace data by ranks, exploit that all orderings are equally likely under the null, and combine ranks linearly with well-chosen weights and scores to get an exact, distribution-free, and tunable test.
Visual Beginner
Picture eight measurements from two groups, group A and group B, four each. Sort all eight together and read off who lands where. The rank-sum statistic for group B is the total of the rank positions occupied by the B observations. If B tends to be larger, B grabs the high positions and the rank sum is big; if the groups are alike, B lands in the middle and the rank sum is moderate.
| sorted position (rank) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| which group landed here | A | A | B | A | B | B | A | B |
| score (Wilcoxon = the rank) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Here group B occupies positions , so the rank sum for B is . The largest it could be is (B takes the top four), the smallest is . A value of leans toward "B is larger," and you can count how many of the equally likely arrangements give a rank sum that extreme to get an exact p-value.
The picture is the whole idea: forget the measured values, keep the sorted positions, weight each observation by its group, score each position by its rank, and add. The result is a linear rank statistic.
Worked example Beginner
We compute a Wilcoxon two-sample rank statistic by hand and find its exact null mean. Two small groups: group A has values and group B has values . So group sizes are and , four observations in all.
Step 1. Pool and sort. The pooled, sorted values are , getting ranks .
Step 2. Read off the ranks of group B. Group B's values and sit at ranks and .
Step 3. Form the rank sum for B. The Wilcoxon statistic is the sum of B's ranks: .
Step 4. Find the null mean. Under the null that all four observations come from the same source, every choice of which two ranks belong to B is equally likely. There are six such choices. Their rank sums are: ranks ; ; ; ; ; . The average of is . So the null mean of is .
Step 5. Compare. The observed is the largest possible value, achieved by exactly one of the six arrangements. So the one-sided exact p-value for "B is larger" is .
What this tells us: we computed both the statistic and its exact reference distribution using only counting — no formula for the underlying spread or shape was ever needed. The null mean matches the simple formula "average rank times group size," namely , and the whole reference distribution is the list of six equally likely rank sums.
Check your understanding Beginner
Formal definition Intermediate+
Let be observations and let denote the rank of in the pooled sample, so when the values are distinct. The vector is a random permutation of . The convergence modes and the calculus are as in 45.04.07; the Hájek-projection method is the rank-statistic instance of the U-statistic projection of 45.05.05; contiguity and Le Cam's third lemma are as in 45.04.07.
Definition (distribution-freeness of ranks). Under the hypothesis of randomness — i.i.d. from a continuous distribution, equivalently exchangeable with no ties almost surely — the rank vector is uniformly distributed on the symmetric group :
Consequently any statistic that is a function of alone has a null distribution free of the underlying continuous .
Definition (simple linear rank statistic). Fix regression constants and a score function assigning a score to the rank positions. The simple linear rank statistic is
The constants encode the design (group membership or a covariate); the scores encode the alternative shape one is tuned against. Writing and , the two-sample (Wilcoxon) case takes and ; the regression case takes equal to a covariate value and a chosen score.
Definition (scores from a score-generating function). A score function is generated by when or, in the smoothed form, with the -th uniform order statistic. The canonical examples are Wilcoxon scores (so ), normal / van der Waerden scores , and sign / median scores .
Counterexamples to common slips Intermediate+
- Distribution-freeness is a null property only. Under an alternative the rank vector is no longer uniform on , and the statistic's distribution does depend on ; the exact null calibration is what survives, not the alternative law.
- The summands are not independent. The ranks are a permutation, hence strongly dependent (their sum is fixed at ). The exact variance is therefore the sampling-without-replacement variance, not , and the correction is the content of the variance formula below.
- Centring matters. If neither the constants nor the scores are centred, has a nonzero null mean ; the genuinely informative object is the centred statistic , whose null mean is zero.
- The "best" score depends on the alternative shape. Wilcoxon scores are optimal for a logistic shift, normal scores for a Gaussian shift, sign scores for a Laplace shift. Using Wilcoxon scores against a Gaussian alternative is consistent but not locally most powerful; the score must be matched to .
Key theorem with proof Intermediate+
The exact null moments of a simple linear rank statistic are pure combinatorics — they follow from the uniform law on — and the asymptotic normality follows by projecting onto sums of independent terms, the rank-statistic form of the Hájek projection of 45.05.05 [van der Vaart — Asymptotic Statistics].
Theorem (exact null moments and asymptotic normality of a simple linear rank statistic). Let with uniform on under the null.
(i) Exact mean.
(ii) Exact variance.
(iii) Asymptotic normality. If the scores are generated by a square-integrable that is not constant, , and the Noether condition
holds, then .*
Proof. (i). Each is marginally uniform on , so for every , and by linearity.
(ii). Centre both sequences: write and , so and , and . Under the uniform law on , the variance and covariance of the score variables are those of sampling without replacement: , and for , , since the row sums of the doubly-centred score table force the off-diagonal covariance to be . Therefore
Because , one has , so the bracket equals . Substituting gives , the claimed formula.
(iii). Let be the pooled empirical distribution function and recall . The projection of onto sums of independent terms — the Hájek projection of 45.05.05 — replaces by its conditional expectation given . To leading order , and the projection is
where are i.i.d., mean (after centring) zero, variance with . Hájek's lemma gives : the difference between using and is a higher-order empirical-process remainder, controlled because is square-integrable. The leading term is a weighted sum of i.i.d. variables; under the Noether condition no single weight dominates, so the Lindeberg condition holds and the Lindeberg-Feller central limit theorem (used in 45.05.05) gives a normal limit. Slutsky's lemma 45.04.07 absorbs the remainder, yielding .
Bridge. This projection argument builds toward the contiguous-alternative limit and the optimal-score theory of the Master tier, and the very same one-coordinate conditional expectation appears again in the U-statistic asymptotics of 45.05.05, where it linearises a non-linear functional of the sample. The foundational reason the theorem works is that a rank statistic, though built from the dependent permutation , is in dominated by its projection onto sums of the independent scores : the dependence among ranks contributes only a vanishing-relative-variance remainder, and the central limit theorem then operates on the surviving i.i.d. average. This is exactly the Hájek-projection method, and it generalises the U-statistic linearisation of 45.05.05 from symmetric kernels to the rank transform. Putting these together, the exact null variance from sampling-without-replacement combinatorics and the asymptotic normality from projection are two readings of one fact — that centred is a near-linear functional of the empirical distribution — and the bridge to local power is Le Cam's third lemma 45.04.07, which tilts this null Gaussian into its alternative form by a single covariance with the log-likelihood ratio.
Exercises Intermediate+
Advanced results Master
The exact null moments come from the uniform law on ; the asymptotics come from the projection of onto sums of independent scores; the local power comes from Le Cam's third lemma 45.04.07; and the optimal scores come from differentiating the log-likelihood of the order statistics at the null. These four facts assemble into the complete asymptotic theory of rank tests.
Theorem 1 (Hájek's projection / asymptotic-linearity representation). Let with scores generated by a square-integrable of bounded variation (or absolutely continuous with ). Then
so is asymptotically linear in the i.i.d. scores ; this is the rank-statistic instance of the Hájek projection of 45.05.05. The leading sum drives both the null central limit theorem and, after a contiguous change of measure, the alternative limit [Hájek, J. — Asymptotic normality of simple linear rank statistics under alternatives].
Theorem 2 (limit under contiguous alternatives via the third lemma). In the location-shift family with second-group shift , the local alternatives are contiguous to the null (LAN log-ratio , 45.04.07). The standardised statistic and are jointly asymptotically Gaussian under the null, and Le Cam's third lemma 45.04.07 gives, under the alternative,
with the alternative's log-derivative score. The limiting power is maximised over , by Cauchy-Schwarz, exactly when [Hájek, Šidák & Sen — Theory of Rank Tests (2nd ed.)].
Theorem 3 (locally most powerful rank tests and the optimal score). Among all rank tests of the location alternative against the null of randomness, the test maximising the slope of the power function at the null — the locally most powerful rank test — rejects for large values of with scores
The score is the conditional expectation, given the ranks, of the derivative of the log-likelihood at the null shift; it is the projection of the efficient score onto rank-measurable functions. The canonical specialisations are Wilcoxon scores for the logistic, normal / van der Waerden scores for the Gaussian, and sign / median scores for the Laplace [Hájek & Šidák — Theory of Rank Tests].
Theorem 4 (asymptotic relative efficiency and asymptotic optimality). The ARE of the -score rank test relative to the -test against a location alternative with density is
the ratio of limiting noncentralities of 45.04.05. With the optimal score this equals , the product of variance and Fisher information, which is with equality only at the Gaussian; the normal-scores test has ARE against the -test for every (the Chernoff-Savage theorem), and the Wilcoxon-to- ARE is at the normal and unbounded for heavy tails [van der Vaart — Asymptotic Statistics].
Synthesis. The foundational reason rank-test theory is tractable is that a simple linear rank statistic, though built from the strongly dependent permutation , is asymptotically linear in the independent scores , so its null variance is the without-replacement combinatorial formula and its limit law is the central limit theorem applied to the projection. This is exactly the Hájek-projection method, and it generalises the U-statistic linearisation of 45.05.05 from symmetric kernels to the rank transform; the central insight is that both are the -orthogonal projection of a near-linear functional of the empirical measure onto sums of single-coordinate functions, with the dependence relegated to a vanishing-relative-variance remainder. The alternative theory is dual to the null theory: where the null analysis fixes the uniform law on , the contiguous-alternative analysis tilts the resulting Gaussian by one covariance through Le Cam's third lemma 45.04.07, and putting these together the local power is the null distribution translated, never recomputed.
The optimal-score theory is the third reading of the same object — the score that maximises the tilt is, by Cauchy-Schwarz, the alternative's own log-derivative , so Wilcoxon, normal, and sign scores are the logistic, Gaussian, and Laplace cases of a single formula, and the asymptotic relative efficiency of 45.04.05 is the squared cosine between the chosen and the optimal score. The bridge from the empirical-process viewpoint of the chapter is that centred is the empirical measure integrated against , so the Hájek projection is the rank-test shadow of the Donsker linearisation, and the whole theory is one functional read at the null, at the alternative, and at the optimum.
Full proof set Master
Proposition 1 (exact null mean and variance). For with uniform on , and .
Proof. Marginal uniformity of each gives , hence . Centre , . Exchangeability of makes common to all and common to all . Since has zero variance, , so . Then
using . Substituting gives the stated formula.
Proposition 2 (Hájek asymptotic linearity). Let scores be generated by a square-integrable with (or of bounded variation). Then with .
Proof (load-bearing steps). Write with the pooled empirical c.d.f., and compare with . The Hájek projection is, by the i.i.d. structure, where . As , in because the conditional rank concentrates at and is square-integrable, so the projection's leading term is . The residual is orthogonal to all sums of single-coordinate functions (a conditional expectation is an -orthogonal projection, as in 45.05.05); its variance is the higher-order empirical-process fluctuation of integrated against , of order when has the stated smoothness. By Pythagoras . Setting collects both vanishing pieces.
Proposition 3 (asymptotic normality under the Noether condition). If is non-constant and square-integrable and , then under the null.
Proof. By Proposition 2, . The summands are independent (the are i.i.d. uniform under the null), mean zero, with . The Lindeberg ratio is controlled by (the Noether condition), since has a fixed finite variance and the weights' maximal relative contribution vanishes. The Lindeberg-Feller central limit theorem (the version used in 45.05.05) gives a standard normal limit for the leading sum, and Slutsky's lemma 45.04.07 absorbs the remainder.
Proposition 4 (contiguous-alternative limit and local power). In the two-sample location-shift LAN family with shift , under the contiguous alternative with and the standardised inner product of ; the limiting power is .
Proof. The LAN log-ratio satisfies under the null 45.04.07, and by Proposition 2 the pair converges jointly to a bivariate Gaussian, since both are asymptotically linear in the i.i.d. scores: in and in (the latter by the LAN expansion, whose efficient score is the log-derivative ). Their limiting covariance is by the bilinearity of covariance on the projections. Le Cam's third lemma 45.04.07 tilts the null law of to under the contiguous alternative, so , and the one-sided power is .
Proposition 5 (optimal score and ARE). The score maximising the local power over the unit sphere is , giving the locally most powerful rank test; the ARE relative to the -test is , maximised at .
Proof. From Proposition 4, . By the Cauchy-Schwarz inequality with equality iff ; hence the LMP score is , and its smoothed form is the rank-measurable projection of the efficient score. The ARE is the squared ratio of the two tests' limiting noncentralities 45.04.05: the -rank test has noncentrality and the -test has noncentrality , giving . At this is , the variance-times-Fisher-information product, by Cauchy-Schwarz with equality only at the Gaussian.
Connections Master
The Hájek-projection method that linearises the rank statistic is the same device proved for symmetric kernels in U-statistics and their asymptotics 45.05.05: there a non-degenerate U-statistic is dominated in by its projection onto sums of single-coordinate conditional expectations, and here the simple linear rank statistic is dominated by its projection onto the independent scores ; both reduce a dependent statistic to an i.i.d. average whose central limit theorem furnishes the limit law, and the orthogonality of the residual is the -projection identity common to both.
Contiguity and Le Cam's three lemmas 45.04.07 supply the entire alternative-distribution theory: the location-shift alternatives are contiguous to the null of randomness, the joint null limit of the standardised rank statistic with the LAN log-likelihood ratio is bivariate Gaussian, and Le Cam's third lemma tilts the null normal law of the statistic into its alternative form by the single covariance , which is exactly the local-power noncentrality and the quantity the optimal score maximises.
Asymptotic relative efficiency 45.04.05 is the metric that ranks rank tests: the ARE of the -score test relative to the -test is the squared cosine between the chosen score and the optimal score times the variance-Fisher-information factor, so the Pitman-efficiency comparisons computed there — Wilcoxon's at the Gaussian, the unbounded gain at heavy tails, the Chernoff-Savage lower bound for normal scores — are corollaries of the optimal-score theorem of this unit.
The empirical distribution function and the Glivenko-Cantelli theorem 45.05.02 underlie the projection step: the rank is times the empirical c.d.f. at , and the replacement of by is controlled by the uniform closeness of to , so the asymptotic linearity of the rank statistic is the empirical-process linearisation specialised to the rank transform.
The Donsker classes and the empirical process 45.05.03 generalise the fixed-score rank statistic to rank processes indexed by the score function or by a threshold: the leading term is the empirical measure integrated against , and the higher-order remainder is governed by the modulus of continuity of the empirical process, so the weak convergence of rank statistics is a corollary of the Donsker theory there.
Historical & philosophical context Master
Rank tests entered statistics through Frank Wilcoxon's 1945 note proposing the rank-sum and signed-rank procedures, and through the equivalent Mann-Whitney form of 1947; the idea of replacing measurements by ranks to obtain a distribution-free test was already implicit in the sign test and in Spearman's rank correlation of 1904. The decisive theoretical advance was the recognition that, under the hypothesis of randomness, the rank vector is uniform on the symmetric group, so any rank statistic has an exactly computable, distribution-free null law.
The general asymptotic theory is the achievement of Jaroslav Hájek and Zbyněk Šidák, whose 1967 monograph Theory of Rank Tests [Hájek & Šidák — Theory of Rank Tests] systematised the exact null distribution theory, the projection lemma for asymptotic normality, the use of contiguity for local power, and the theory of locally most powerful and asymptotically optimal scores. Hájek's 1968 Annals of Mathematical Statistics paper on the asymptotic normality of simple linear rank statistics under alternatives [Hájek, J. — Asymptotic normality of simple linear rank statistics under alternatives] isolated the projection of a rank statistic onto sums of independent terms as the key device, the same projection later seen to drive U-statistic asymptotics.
The optimal-score theory — that the locally most powerful rank score is the log-derivative of the assumed density pushed through the quantile transform, yielding Wilcoxon scores for the logistic, van der Waerden's normal scores for the Gaussian, and sign scores for the Laplace — was developed by Hájek and Šidák building on the score-function programme of Erich Lehmann and others; the second edition with Pranab K. Sen [Hájek, Šidák & Sen — Theory of Rank Tests (2nd ed.)] is the standard modern reference. Herman Chernoff and I. Richard Savage proved in 1958 that the normal-scores test is at least as efficient as the -test against every alternative, and the synthesis within the empirical-process and Le Cam frameworks is due to van der Vaart [van der Vaart — Asymptotic Statistics].
Bibliography Master
@book{HajekSidak1967,
author = {H\'ajek, Jaroslav and \v{S}id\'ak, Zbyn\v{e}k},
title = {Theory of Rank Tests},
publisher = {Academic Press},
address = {New York},
year = {1967}
}
@book{HajekSidakSen1999,
author = {H\'ajek, Jaroslav and \v{S}id\'ak, Zbyn\v{e}k and Sen, Pranab K.},
title = {Theory of Rank Tests},
edition = {2},
publisher = {Academic Press},
address = {San Diego},
year = {1999}
}
@article{Hajek1968,
author = {H\'ajek, Jaroslav},
title = {Asymptotic normality of simple linear rank statistics under alternatives},
journal = {Annals of Mathematical Statistics},
volume = {39},
number = {2},
year = {1968},
pages = {325--346}
}
@book{vanderVaart1998,
author = {van der Vaart, Aad W.},
title = {Asymptotic Statistics},
publisher = {Cambridge University Press},
series = {Cambridge Series in Statistical and Probabilistic Mathematics},
year = {1998}
}
@book{Lehmann1975,
author = {Lehmann, Erich L.},
title = {Nonparametrics: Statistical Methods Based on Ranks},
publisher = {Holden-Day},
address = {San Francisco},
year = {1975}
}
@article{Wilcoxon1945,
author = {Wilcoxon, Frank},
title = {Individual comparisons by ranking methods},
journal = {Biometrics Bulletin},
volume = {1},
number = {6},
year = {1945},
pages = {80--83}
}
@article{ChernoffSavage1958,
author = {Chernoff, Herman and Savage, I. Richard},
title = {Asymptotic normality and efficiency of certain nonparametric test statistics},
journal = {Annals of Mathematical Statistics},
volume = {29},
number = {4},
year = {1958},
pages = {972--994}
}