Quantitative Analysis/ Non-parametric Tests
Parametric or non-parametric?

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 ranksTwo bar charts of five people. In raw values one bar is far taller than the rest. As ranks the bars rise in equal steps.Raw monthly income1,200Person 11,500Person 21,700Person 32,000Person 425,000Person 5One value dominates the average and the spreadThe same values as ranks1Person 12Person 23Person 34Person 45Person 5The largest value is simply the top rank
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:

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

Situations where a parametric test is the better choice

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)
TestSample sizeSmallest possible p-valueCan reach 5%?
Wilcoxon signed-rank4 pairs0.1250No
Wilcoxon signed-rank5 pairs0.0625No
Wilcoxon signed-rank6 pairs0.0312Yes
Wilcoxon signed-rank7 pairs0.0156Yes
Mann-Whitney U3 per group0.1000No
Mann-Whitney U4 per group0.0286Yes
Mann-Whitney U5 per group0.0079Yes

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 testDecision tree. Ordinal outcomes use rank-based tests. For numeric outcomes, large samples use parametric tests, and small samples depend on whether the distribution is symmetric with no outliers.Is the outcome ordinal?(ratings, grades, income bands)YesRank-based testNo, it is numericIs the sample large?(about 30 or more per group)YesParametric teststill check for extreme outliersNoIs the distribution roughlysymmetric, with no outliers?YesNoParametric test, more powerfulRank-based testFewer than about 5 or 6 cases per group: no test gives much evidence, so describe the data
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
FeatureParametric (t-test, ANOVA)Non-parametric (rank-based)
Works withThe values themselvesThe ranks of the values
AssumesA roughly normal outcome within groups and similar spreadNo particular shape, only independence, and similar shapes for a reading in medians
Outcome typeNumericOrdinal or numeric
Extreme valuesCan dominate averages and spreadsAn extreme value counts as just the top rank
Power when data are normalHighestSlightly lower, about 95% in large samples
Power when data are skewed or have outliersCan be poorOften higher
What it testsDifferences in meansWhether one group tends to be higher, which reads as medians when shapes match
Effect sizeCohen's d, eta-squaredRank-biserial r, eta-squared from H, Kendall's W

05Each parametric test and its rank-based partner

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

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
GroupNMeanSDMedian
Completed the course82,937.5366.22,950
Did not complete it83,600.04,208.22,150
Two tests on the same data
TestStatisticp-valueSig
Independent t-testt = -0.4440.6641ns
Mann-Whitney UU = 550.0148*
Independent t-test without the 14,000 incomet = 5.055< 0.001***

Reading it step by step

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Get started
Related Guides