Nonparametric Methods

Tests built on signs and ranks instead of a normal model. The sign test and the Wilcoxon signed-rank test for paired data, the Wilcoxon rank-sum (Mann-Whitney) test for two independent groups and the Kruskal-Wallis test for several, each with its exact null distribution by counting, its normal or chi-squared approximation and corrections for ties; what each test actually tests, and its efficiency and robustness against the t and F tests. Worked on Student's sleep data and NHANES blood pressures.

Ten patients each took two sleeping drugs, and the paired t-test found that the second drug added sleep, with $p = 0.0028$. That $p$-value rests on a model: the differences are a sample from a normal population. The $t$-tests and the analysis of variance of the previous units all rest on such a model, with normal populations that share a variance. The tests hold up well when the model is roughly right. Small skewed samples, wild values and measurements that are only ordinal (a pain score, a stage of disease) strain them. Can we test the same questions without assuming any shape for the population at all?

Nonparametric methods do it by replacing the measurements with their signs or their ranks. If the groups are the same, every assignment of the signs or ranks is equally likely. The null distribution of the test statistic can then be found by counting, and it does not depend on the shape of the population. The tests are exact for any sample size and any continuous population.

They are not free. A test that uses only ranks gives up some information. When the data really are normal it is slightly less powerful, and the unit measures how much: about 5% more observations for the rank tests, and over half again as many for the sign test. When the data have heavy tails or skewness the comparison reverses, often by a wide margin.

A rank test also answers a question of its own:

  • the sign test asks whether positive and negative differences are equally common;
  • the signed-rank test asks whether the differences are symmetric about zero;
  • the rank-sum and Kruskal–Wallis tests ask whether values in one group tend to exceed those in another.

Each of these coincides with "are the centers equal?" only under further assumptions. The sign test needs continuous data, the signed-rank test symmetric differences, and the others populations of the same shape. The unit shows examples in which a rank test and a test of means reach different conclusions, and both are correct.

The unit follows the earlier designs in turn:

  1. Paired data: the sign and signed-rank tests, and with them the unit's tools of exact counting and tie corrections.
  2. Two independent groups: the rank-sum test, which is Mann and Whitney's $U$.
  3. Several groups: the Kruskal–Wallis test, the analysis of variance of the ranks.
  4. Efficiency: the asymptotic relative efficiency of all these tests against the $t$ and $F$ tests.

The examples continue those of the earlier units. Student's (1908) sleep data serve the paired tests. Blood pressures from the National Health and Nutrition Examination Survey (NHANES) of 2017 to 2018 serve the comparisons of independent groups, including the four age groups of the analysis of variance. The notation is the standard one of the original papers:

  • $W^+$ and $W^-$ for the signed-rank sums;
  • $W$ and $U$ for the rank-sum statistics;
  • $H$ for Kruskal and Wallis's statistic;
  • $n$ (or $n_1$, $n_2$, $N$) for sample sizes.

Every number comes from a script in the site's repository, and each article ends with worked problems solved in full.

Articles

  • The Sign Test and the Wilcoxon Signed-Rank Test: paired differences tested by their signs alone, and by their signs and ranks. The sign test as an exact binomial test. Wilcoxon's signed-rank statistic and its exact null distribution from the $2^n$ equally likely sign patterns, with the proof that sign and size are independent under symmetry, enumerated for drug 1 of the sleep data ($p = 0.359$). Its mean $n(n+1)/4$ and variance $n(n+1)(2n+1)/24$ derived, its normal limit from Lyapunov's condition, and the corrections for ties and zero differences, worked on repeated NHANES readings. Wilcoxon's (1945) maize example recomputed. What each test tests, shown on a population whose median difference is zero but whose positive differences outnumber the negative ones. Efficiencies $3/\pi$ and $2/\pi$ under normality stated, and power for five shapes by simulation.
  • The Wilcoxon Rank-Sum Test: two independent groups compared by ranks. The rank sum $W$ and Mann and Whitney's (1947) $U$ proved to be the same test, ties included, with $U/(n_1 n_2)$ as an estimate of $P(X > Y)$. The exact distribution from Mann and Whitney's recurrence and the normal approximation with ties, worked on 8 men and 8 women from NHANES. What a rejection shows, stated. Its efficiency stated ($3/\pi = 0.955$ for normal data), power for seven shapes by simulation, and the effect of one gross error.
  • What the Rank-Sum Test Tests: what a rejection by the rank-sum test means. The proof that the test compares medians and means under a shift model, and only then. Simulations of equal medians with different shapes and of equal centers with unequal spreads, the variance of $U$ when the two distributions differ with the rejection rates it predicts, and the Hodges–Lehmann estimate and interval for a shift.
  • The Kruskal-Wallis Test: several groups compared by ranks. $H$ derived as the analysis of variance of the ranks, with its computing formula and tie correction, and its exact null mean $k - 1$ proved. Its chi-squared approximation, checked by exact enumeration of Kruskal and Wallis's (1952) example and by simulation, and its reduction to the rank-sum test for two groups. The four NHANES age groups worked by hand ($H = 9.141$, $p = 0.027$). Its behavior when spreads differ, its power against the classical and Welch $F$ tests, and Dunn's (1964) comparisons of mean ranks with their variance derived.
  • Asymptotic Relative Efficiency of Rank Tests: how much power a rank test gives up or gains against the $t$ and $F$ tests. The measure defined, the cited theorem that reduces it to a ratio of slopes, and the slopes of the $t$, sign, signed-rank and rank-sum tests derived. Efficiencies $3/\pi$ and $2/\pi$ under normality, tables for other shapes, the lower bound $108/125$, and the cited result for the Kruskal–Wallis test.

Each test has a counterpart in an earlier unit:

The binomial distribution behind the sign test returns in the next unit, Inference on Proportions, which begins with the normal approximation to the binomial. In information retrieval, Significance Testing applies the sign and signed-rank tests to comparisons of search engines over the same queries. It sets them beside the randomization test, which computes a null distribution by the same reasoning from the original values instead of their ranks.

References

  • Dunn, O. J. (1964). Multiple comparisons using rank sums. Technometrics, 6(3), 241–252. record · 2 pages
  • Fay, M. P., and Proschan, M. A. (2010). Wilcoxon–Mann–Whitney or t-test? On assumptions for hypothesis tests and multiple interpretations of decision rules. Statistics Surveys, 4, 1–39. record · 4 pages
  • Kruskal, W. H., and Wallis, W. A. (1952). Use of ranks in one-criterion variance analysis. Journal of the American Statistical Association, 47(260), 583–621. record · 4 pages
  • Mann, H. B., and Whitney, D. R. (1947). On a test of whether one of two random variables is stochastically larger than the other. The Annals of Mathematical Statistics, 18(1), 50–60. record · 4 pages
  • NIST/SEMATECH. e-Handbook of Statistical Methods, §7.4.1 (the Kruskal-Wallis test). National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/ record · 37 pages
  • Pagano, M., Gauvreau, K., and Mattie, H. (2022). Principles of Biostatistics (3rd ed.). CRC Press. The course text. record · 48 pages
  • Student (1908). The probable error of a mean. Biometrika, 6(1), 1–25. record · 17 pages
  • Wilcoxon, F. (1945). Individual comparisons by ranking methods. Biometrics Bulletin, 1(6), 80–83. record · 6 pages

Reviewed: verified, 16 Nov 2026 · citations checked, 16 Nov 2026 · editorial review, 16 Nov 2026 · 6 revisions