Nonparametric Tests
Analyze → Nonparametric Tests. Use these when the assumptions behind a t-test or ANOVA (normality, equal variances) do not hold, or when your data are ordinal ranks rather than true scale values. They test distributions and medians using ranks, not means. (To drop the assumptions while still testing the mean difference itself, the two-group alternative is the t-test dialog's permutation test.)
The tests at a glance
| Test | Parametric analogue | Use when |
|---|---|---|
| Mann-Whitney U | Independent-samples t | Two independent groups |
| Wilcoxon Signed-Rank | Paired t | Two related measurements |
| Sign test | Paired t | Two related measurements (direction only) |
| Kruskal-Wallis | One-way ANOVA | Three+ independent groups |
| Friedman | Repeated-measures ANOVA | Three+ related measurements |
| Kendall's W | Repeated-measures ANOVA | Agreement among several rankers |
| Runs test | — | Randomness of a sequence |
| Binomial test | — | A proportion vs an expected value |
| Tests of Normality | — | Whether a variable is normally distributed |
How to fill the dialogs
Each test takes the variable(s) it needs and, for the group-comparison tests, a grouping variable:
- Mann-Whitney / Kruskal-Wallis — a test variable and a grouping variable (two groups for Mann-Whitney, three+ for Kruskal-Wallis).
- Wilcoxon / Sign — a pair of related variables.
- Friedman — three or more related variables.
- Kendall's W — two or more related variables (the items each case ranks); reports the coefficient of concordance (0..1 agreement) and its equivalent Friedman chi-square. It is the same statistic as Friedman, rescaled to read as an agreement measure — use it when the question is "how much do the rankers agree?" rather than "do the conditions differ?".
- Runs test — one variable; tests whether values fall in a random order around a cut point, with an optional exact small-sample significance.
- Binomial test — one variable and an expected proportion; reports an exact or asymptotic significance.
- Tests of Normality — one or more variables; reports Shapiro-Wilk and Kolmogorov-Smirnov (Lilliefors) with a reject/retain Decision at your chosen α (set in Options).
Reading the output
The rank-based tests report mean ranks per group, the test statistic (U, W, H, χ²…), and the significance. A small significance means the groups' distributions (or the paired differences) differ more than chance would explain.
Exact small-sample significance
Mann-Whitney, Wilcoxon and Kruskal-Wallis each offer an Exact small-sample significance option (and Runs and Binomial have their own exact paths). The asymptotic (normal / χ²) p-value these tests report is only reliable for reasonably large samples; for small ones, tick Exact to add an Exact Sig. column computed from the statistic's true null distribution by enumeration. An exact value is shown only when it applies — tied data breaks it (the rank arrangements are no longer equally likely) and very large samples are not enumerated — and the output falls back to the asymptotic value with a note when it cannot.
Example
Earlier, Explore suggested FastingGlucose is not normally distributed within groups. Rather than an independent-samples t-test of glucose by Diabetic, run Mann-Whitney U with FastingGlucose as the test variable and Diabetic as the grouping variable — a valid comparison that does not assume normality.
How this is computed
This section names which method each procedure prints — the estimator, the statistic, its degrees of freedom, and the tie, missing-value and weight rules — and links the recorded convention that explains the choice. The full index is the convention inventory; every number here is validated against independent packages per the validation suite.
- Mann–Whitney U — the smaller of U₁ / U₂; the asymptotic z is tie-corrected with no continuity correction; an exact significance when the samples are untied and small; the rank-biserial r is positive when the first group ranks higher (tolerances · validation).
- Wilcoxon signed-rank — zero differences dropped, tie-corrected z, no continuity correction (R's default adds one) (Wilcoxon).
- Sign test / Runs test — the continuity-corrected normal approximation; the runs test cuts at the median and offers an exact significance (sign and runs).
- Binomial test — exact; two-tailed when the test proportion is ½, one-tailed otherwise (the SPSS rule — R's
binom.testis two-sided at any proportion) (binomial). - Kruskal–Wallis — tie-corrected H on k − 1 df, ε² = H/(N − 1), an exact upper-tail significance when untied; Dunn's pairwise z adjusted by Bonferroni (default) or Holm (validation · post hoc).
- Friedman / Kendall's W — W = χ²/(N(k − 1)); Cochran's Q and Jonckheere–Terpstra in their standard forms with the tie-corrected null variance (validation).
- Tests of Normality — Shapiro–Wilk (Royston's AS R94) and Kolmogorov–Smirnov with Lilliefors significance (normality).
- Every test is listwise on its own variables; a frequency weight replicates cases (missing-data policy · case weighting).
See also
- Compare Means — the parametric counterparts.
- Tests of Normality also appear in Explore.