What are non-parametric tests? When to use them and which to choose
Non-parametric tests analyse ranks instead of raw values, so they work with ordinal outcomes and when normality cannot be assumed. This guide explains how they work, when a rank-based test is the right choice, why a small sample is not a rule on its own, and which test matches each parametric test.
12 min read Non-parametric Tests Beginner
01What is a non-parametric test?
A parameter is a number that describes a whole population, such as its average or its standard deviation. Parametric tests, such as the t-test and ANOVA, are built around those numbers. They assume the outcome follows a particular shape, usually the bell-shaped normal curve, and they test claims about averages.
Non-parametric tests make fewer assumptions about the shape of the data, which is why many are called distribution-free. Most of them work by replacing each value with its rank, its position when all the values are lined up from smallest to largest, and then analysing the ranks.
They are not assumption-free. Observations still need to be independent, the outcome needs at least an order, and to read a result as a difference in medians the groups need distributions of similar shape. What a non-parametric test usually asks is whether one group tends to have higher values than another, and not whether the averages differ.
02How rank-based tests work
Take five people with monthly incomes of 1,200, 1,500, 1,700, 2,000, and 25,000. The average is 6,280, a figure that describes none of them, and the spread is huge. Replace the incomes with ranks and the picture changes.
Figure 1. Five incomes as raw values and as ranks
On the ranks, the person earning 25,000 is simply the top rank, 5, one step above the person earning 2,000. The extreme value has lost its power to distort the result. Two further consequences follow:
Any change that keeps the order, such as taking logarithms, leaves the ranks unchanged, so the result does not depend on the scale of measurement.
The size of the gaps is thrown away. A test on ranks cannot tell that one value is twelve times another, only that it is higher.
Once the data are ranked, the tests compare rank totals between groups (Mann-Whitney U and Kruskal-Wallis), the signed ranks of the changes within pairs (Wilcoxon signed-rank), or ranks within each subject (Friedman test). Each guide shows the calculation with a worked example.
03When to use a non-parametric test
Situations that call for one
The outcome is ordinal. Likert items, grades, severity ratings, and income bands have an order but no reliable distances between values, so averages are not well defined. Ranks are, and this holds at any sample size.
The sample is small and normality cannot be relied on. With few cases, the central limit theorem gives little protection, and a histogram cannot reliably show the shape. If the values also look skewed or contain outliers, ranks are the safer choice.
A numeric outcome is strongly skewed or has extreme values. Income, waiting times, and counts with a long tail are typical. If the sample is not large enough for averages to settle down, use ranks.
Situations where a parametric test is the better choice
The sample is large. With about 30 or more cases per group, more if the skew is strong, averages are close to normal whatever the data look like, and the t-test and ANOVA hold up well.
The sample is small but the data are clearly symmetric, with no outliers. The parametric test is then more powerful. In large samples a rank-based test is about 95% as efficient when the data really are normal, and in small samples the gap matters more.
The question is about averages. A rank test does not estimate the difference in means, so if a decision depends on the average, report the average.
The small-sample convention
Many people learn to use a non-parametric test whenever the sample is small. The reasoning is sound: with few cases you cannot check normality, and you cannot count on the central limit theorem. But the rule only works in one direction. Small samples are also where rank-based tests are weakest. With only a few cases, the number of possible rank arrangements is small, so the smallest achievable p-value can sit above 0.05 however large the real difference is.
Smallest possible two-sided p-value when every difference points the same way (no tied values)
Test
Sample size
Smallest possible p-value
Can reach 5%?
Wilcoxon signed-rank
4 pairs
0.1250
No
Wilcoxon signed-rank
5 pairs
0.0625
No
Wilcoxon signed-rank
6 pairs
0.0312
Yes
Wilcoxon signed-rank
7 pairs
0.0156
Yes
Mann-Whitney U
3 per group
0.1000
No
Mann-Whitney U
4 per group
0.0286
Yes
Mann-Whitney U
5 per group
0.0079
Yes
So sample size is one input to the choice and not the trigger. The type of outcome and the shape of the data matter more. With fewer than about 5 or 6 cases per group, neither kind of test gives much evidence, and it is better to describe the values than to rely on a p-value.
A way to decide
Figure 2. Choosing between a parametric and a rank-based test
When you are unsure, run both tests. If they agree, your conclusion does not depend on the assumption. If they disagree, look at the data, because an outlier or a skewed distribution is usually the reason. Decide which test you will report before you look at the results, and report both if you ran both.
04Parametric and non-parametric tests compared
How the two families differ
Feature
Parametric (t-test, ANOVA)
Non-parametric (rank-based)
Works with
The values themselves
The ranks of the values
Assumes
A roughly normal outcome within groups and similar spread
No particular shape, only independence, and similar shapes for a reading in medians
Outcome type
Numeric
Ordinal or numeric
Extreme values
Can dominate averages and spreads
An extreme value counts as just the top rank
Power when data are normal
Highest
Slightly lower, about 95% in large samples
Power when data are skewed or have outliers
Can be poor
Often higher
What it tests
Differences in means
Whether one group tends to be higher, which reads as medians when shapes match
AnalyZ Solutions has no rank-based counterpart for the one-sample t-test or the two-way ANOVA. The chi-square test makes no normality assumption either, because it works on counts of categories.
06Checking whether data are roughly normal
Look at a histogram or boxplot for each group. Skew and outliers are usually plain to see.
Think about the variable. Income, waiting times, and counts are usually skewed. Bounded scales pile up at the ends. Heights and large-exam scores are roughly symmetric.
Use formal tests such as Shapiro-Wilk only as a supplement. In small samples they rarely flag a problem when you most need them to, and in large samples they flag differences too small to matter.
Check the right thing. For a t-test or ANOVA, look at the outcome within each group. For regression, look at the residuals.
07How to find these tests in AnalyZ Solutions
Open Inferential Analysis. The Non-parametric Tests category holds the Mann-Whitney U, Wilcoxon signed-rank, Kruskal-Wallis, and Friedman tests, and Spearman correlation is in the Correlation category. Each guide covers the steps. Use the Descriptive Analysis module first to look at the distributions and counts per group.
The Wilcoxon module asks for at least 5 pairs. As the table above shows, at least 6 pairs are needed before a result can reach 5% significance, so treat results from 5 pairs as untestable.
08Interpreting the result
The figures below are invented to show why the choice matters. They compare the monthly incomes of 8 people who completed a training course with 8 who did not. One person in the second group earns 14,000.
Descriptives
Group
N
Mean
SD
Median
Completed the course
8
2,937.5
366.2
2,950
Did not complete it
8
3,600.0
4,208.2
2,150
Two tests on the same data
Test
Statistic
p-value
Sig
Independent t-test
t = -0.444
0.6641
ns
Mann-Whitney U
U = 55
0.0148
*
Independent t-test without the 14,000 income
t = 5.055
< 0.001
***
Reading it step by step
Compare the means with the medians The comparison group has the higher mean (3,600 against 2,938), but the lower median (2,150 against 2,950). When the mean and the median point in opposite directions, an extreme value is usually responsible. The standard deviation of the second group, 4,208, is more than eleven times that of the first.
Read the t-test The p-value of 0.6641 is far above 0.05, so the t-test finds nothing. The single income of 14,000 has inflated both the average and the spread of its group, which swamps the real gap between the others.
Read the rank test The rank totals are 91 for the first group and 45 for the second. U is 55 out of a possible 64, so in 86% of all pairs the person who completed the course earns more. The p-value is 0.0148, significant at the 5% level, and the effect size r is 0.72, a large effect. The result does not depend on any single person.
Check the cause Without the 14,000 income, the t-test gives a p-value of 0.00022 and agrees with the rank test. Before reporting anything, check whether 14,000 is a data entry error. If it is real, say so and report both tests.
In plain words. People who completed the course earned more than those who did not, with a median of 2,950 against 2,150. The difference is large and significant at the 5% level on a rank-based test. A t-test missed it because one very high income in the comparison group distorted the averages. The data cannot show that the course caused the gap, since the groups may have differed before it.
09Common mistakes
Using a rank test only because the sample is small. If the data are clearly symmetric, the t-test is more powerful, and with a handful of cases a rank test may be unable to reach significance at all.
Treating non-parametric as assumption-free. Independence and a meaningful order are still required, and similar shapes are needed for a reading in medians.
Describing the result as a difference in means. A rank test compares ranks. Report medians and mean ranks.
Choosing the test after seeing which one is significant. Decide in advance, or report both.
Relying on a normality test alone. Look at the data and think about the variable.
Reading a non-significant result in a small sample as no difference. It means the data gave too little evidence.
Frequently Asked Questions
Are non-parametric tests only for small samples?
No. For an ordinal outcome, a rank-based test is appropriate at any sample size. Small samples are one reason to choose one, since normality cannot be checked or relied on, but small samples are also where the tests lose power. Large samples with strongly skewed data are usually fine with parametric tests.
Do non-parametric tests compare medians?
Only when the groups have distributions of similar shape. In general, a rank-based test asks whether one group tends to have higher values than the other. The medians are reported because they describe the difference in a way readers understand.
Is it a mistake to use a non-parametric test on normal data?
It is valid, and it costs little in large samples, where the rank-based test is about 95% as efficient. In very small samples the cost is larger, because the smallest achievable p-value can sit above 0.05.
What should I do if my sample is very small?
With fewer than about 5 or 6 cases per group, no test provides much evidence. Describe the values, show them in a chart, and say that the sample is too small for a reliable test. Collecting more data is better than choosing a cleverer test.
Which should I report, the mean or the median?
With a rank-based test, report the median and the mean rank for each group, together with the effect size. With a parametric test, report the means and standard deviations.
Is there a non-parametric version of regression or two-way ANOVA?
Not in AnalyZ Solutions. For outcomes that are not numeric and normal, a different family of regression models handles the data type directly, such as ordinal regression for ordered outcomes, logistic regression for yes or no outcomes, and Poisson regression for counts.
Is the chi-square test a non-parametric test?
In the sense that it makes no normality assumption, yes. It works on counts of categories and is used for categorical variables, where the questions about averages and ranks do not arise.
Choose and run the right test
Open Non-parametric Tests in AnalyZ Solutions. Free to sign up, free to analyze.