Learn
Interactive·

Nonparametric Tests

Groups can still be compared when means and normal distributions are poor summaries.

Suppose two distribution centers are compared on delivery delay. Most delays are between 5 and 15 minutes, but an accident can create a delay of two hours or more.

In such data, means and standard deviations can be dominated by a few extreme values. Nonparametric tests often compare ranks or signs instead of relying directly on the raw scale.

Compare ranks instead of raw values

When delivery delays are strongly skewed, ranking prevents one very large value from dominating the comparison.

Observed value3456791145
Rank12345678
Forty-five is more than four times eleven, but it is only one rank higher. The influence of the extreme value is reduced.

Key question

Can we compare which group tends to have larger values without relying heavily on the exact distances between them?

1

Concept

Why replace values with ranks?

Ranks reduce the leverage of extreme observations

Parametric tests are built around means and variances. Rank tests order the observations and ask which group occupies the higher ranks more often.

This can make them more stable under severe skew or outliers. The tradeoff is that some information about the original distances is discarded, so a well-specified parametric test can be more powerful.

Nonparametric does not mean assumption-free

Independence, study design, and the shapes of the distributions still matter.

2

Why It Matters

Which nonparametric test fits the design?

Match the test to the data structure

Data structureParametric methodNonparametric alternative
Two independent groupsIndependent t-testMann–Whitney U
Same people measured twicePaired t-testWilcoxon signed-rank
Three or more independent groupsOne-way ANOVAKruskal–Wallis
Three or more repeated conditionsRepeated-measures ANOVAFriedman

The core choice

Use Mann–Whitney U for two independent groups and Wilcoxon signed-rank for paired observations. Kruskal–Wallis and Friedman extend the same logic to three or more conditions.

3

How It Works

What do rank tests actually compare?

A rank test is not always a pure test of medians

Mann–Whitney U tests whether the two rank distributions differ. When the distributions have similar shapes, the result is often interpreted as a location or median difference.

If one distribution is narrow and the other is much wider, significance may reflect a shape difference rather than a simple shift in medians.

Mann–Whitney U test

Delivery delay at centers A and B

Significant

Median A

6 min

Median B

11 min

U

214

p-value

.012

Reporting results

Report medians and interquartile ranges with the test statistic and p-value. A rank-biserial correlation or another suitable effect size can also be included.

4

Example

When are they appropriate?

Situations where a rank test may help

  • The sample is small and the distribution is strongly skewed.
  • Extreme values dominate the mean and standard deviation.
  • The response is ordinal, such as a single 1–5 rating.
  • Transformations still do not make a parametric model reasonable.

Do not switch automatically

A normality-test p-value below 0.05 is not, by itself, a reason to abandon a t-test or ANOVA. Sample size, outliers, distribution shape, and the target estimand should be considered together.

SituationMethod to consider
Large sample, mild skewt-test or ANOVA may be sufficiently robust
Small sample, severe skewRank-based or robust method
Single ordinal itemNonparametric test
Mean difference is the research targetRobust mean test or transformation
5

Interactive

Change an outlier and watch the ranks

Change an outlier and watch the ranks

Increase one observation below and compare how much the mean difference and the rank-based summary move.

Mean difference

6.13

Median difference

2.00

Avg rank A

6.75

Avg rank B

10.25

A

3 · 4 · 5 · 6 · 7 · 8 · 9 · 10

B

5 · 6 · 7 · 8 · 9 · 10 · 11 · 45

As the extreme value grows, the mean difference changes sharply, while the median and average ranks move much less.

What to observe

  • How much does the mean change as the outlier grows?
  • How much do the median and average rank change?
  • Why is the rank result more stable when the ordering barely changes?
  • Is ranking always desirable when the size of the extreme value is itself important?

Key lesson

A nonparametric test does not delete outliers. It places more emphasis on order than on exact distance.

Key takeaways

  • Nonparametric tests commonly use ranks or signs.
  • They can be less sensitive to severe skew and extreme values.
  • Independent, paired, and multi-group designs require different tests.
  • Mann–Whitney U is not always only a test of medians.
  • Rank tests still have assumptions about independence and design.
  • Do not choose a method from a normality test alone.

Nonparametric tests are not merely backups for failed normality. They are useful when ranks match the scientific question better than raw distances.

Now run a nonparametric test on real dataOpen in Lab

Go Deeper

Multiple Comparisons