Written and maintained by CASRAI Editorial Board
Last updated
Nonparametric statistics is a branch of statistical theory that evaluates data without assuming observations follow a specific probability distribution, such as a normal distribution. Often termed distribution-free methods, these techniques analyze ordinal scores, ranked categories, or skewed continuous variables using order statistics, rank sums, signs, or permutations rather than estimating parameters like mean (μ) or variance (σ²). Because nonparametric methods make minimal distributional assumptions, they provide robust inferences across research disciplines.
Definition in One Paragraph
Nonparametric statistics in simple terms allows researchers to analyze data without assuming a bell-shaped curve. While a traditional parametric statistical test compares group means using estimated population variances, a non-parametric test converts raw scores into ranks (from 1 to N) to evaluate whether scores in one condition systematically outrank another. This ranking mechanism prevents extreme outliers from distorting results and enables valid hypothesis testing on ordinal scales.
When to Use Nonparametric vs Parametric Tests
Selecting between parametric and non-parametric tests depends on measurement scale, distribution shape, and sample size. Parametric tests achieve optimal power when continuous data meet normality, verified using diagnostic plots or tests like the Shapiro-Wilk test in R. When data exhibit heavy skewness, contain severe outliers, or represent ordinal measurements, nonparametric tests prevent inflated error rates. When deciding between frameworks, consult our comprehensive guide on parametric vs. non-parametric tests.
| Analysis Goal | Parametric Test | Nonparametric Equivalent | Scale | Null Hypothesis (H0) |
|---|---|---|---|---|
| Two Independent Groups | Independent Two-Sample t-Test | Mann-Whitney U Test (Wilcoxon Rank-Sum) | Ordinal / Continuous | Distributions are identical (stochastic equality) |
| Two Paired Samples | Paired Samples t-Test | Wilcoxon Signed-Rank Test | Ordinal / Continuous | Median of paired differences equals zero |
| Three or More Groups (k ≥ 3) | One-Way ANOVA | Kruskal-Wallis H Test | Ordinal / Continuous | All k population distributions are identical |
| Repeated Measures (k ≥ 3) | Repeated Measures ANOVA | Friedman Test | Ordinal / Continuous | No treatment differences across repeated conditions |
| Bivariate Correlation | Pearson Correlation (r) | Spearman Rank Correlation (ρ) | Ordinal / Monotonic | No monotonic association between variables |
Formula and Test Statistic: The Mann-Whitney U Test
The Mann-Whitney U test evaluates whether two independent groups with sample sizes n₁ and n₂ originate from identical populations. All N = n₁ + n₂ observations are combined and ordered from lowest to highest, assigning rank 1 to the smallest value and mid-ranks to ties. Ranks are summed for group 1 (R₁) and group 2 (R₂).
The U statistics for each group are calculated using:
U₁ = n₁n₂ + [n₁(n₁ + 1) / 2] − R₁
U₂ = n₁n₂ + [n₂(n₂ + 1) / 2] − R₂
Where:
- n₁: Number of observations in sample 1.
- n₂: Number of observations in sample 2.
- R₁: Sum of ranks for observations in sample 1.
- R₂: Sum of ranks for observations in sample 2.
- U: The test statistic, defined as min(U₁, U₂).
The sum of the two U statistics satisfies the algebraic equality U₁ + U₂ = n₁n₂. For conceptual details on sampling distributions, see our overview of the test statistic in hypothesis testing.
For moderate to large samples (n₁, n₂ > 10), the sampling distribution of U approaches normality with expected mean E(U) and variance Var(U):
E(U) = (n₁n₂) / 2
Var(U) = [n₁n₂(n₁ + n₂ + 1)] / 12
When ties occur, variance is adjusted: Var(U)_corrected = [n₁n₂ / 12] × [(N + 1) − Σ(t³ − t) / (N(N − 1))], where t is the number of observations tied at a given value. The large-sample test statistic is z = (U − E(U)) / √Var(U).
Worked Example with Real Numbers: Step-by-Step Calculation
To demonstrate calculation mechanics, consider an experiment comparing task completion times (in seconds) between an intervention group (Group A, n₁ = 5) and a standard training group (Group B, n₂ = 5):
- Group A (Intervention): 12, 15, 18, 20, 22
- Group B (Standard): 8, 11, 12, 14, 16
Step 1: Combine and Assign Ranks
Pooling all 10 observations in ascending order yields the sequence below. The tied value of 12 at positions 3 and 4 receives the mid-rank (3 + 4) / 2 = 3.5:
| Position | Value | Group | Assigned Rank |
|---|---|---|---|
| 1 | 8 | Group B | 1.0 |
| 2 | 11 | Group B | 2.0 |
| 3 | 12 | Group A | 3.5 (tie) |
| 4 | 12 | Group B | 3.5 (tie) |
| 5 | 14 | Group B | 5.0 |
| 6 | 15 | Group A | 6.0 |
| 7 | 16 | Group B | 7.0 |
| 8 | 18 | Group A | 8.0 |
| 9 | 20 | Group A | 9.0 |
| 10 | 22 | Group A | 10.0 |
Step 2: Calculate Rank Sums
- R₁ (Group A): 3.5 + 6.0 + 8.0 + 9.0 + 10.0 = 36.5
- R₂ (Group B): 1.0 + 2.0 + 3.5 + 5.0 + 7.0 = 18.5
Check: R₁ + R₂ = 36.5 + 18.5 = 55.0 = 10 × 11 / 2.
Step 3: Calculate U Statistics
U₁ = (5 × 5) + [5 × 6 / 2] − 36.5 = 25 + 15 − 36.5 = 3.5
U₂ = (5 × 5) + [5 × 6 / 2] − 18.5 = 25 + 15 − 18.5 = 21.5
Check: U₁ + U₂ = 3.5 + 21.5 = 25 = n₁n₂.
The test statistic is U = min(U₁, U₂) = 3.5.
Step 4: Statistical Decision
For a two-tailed test with n₁ = 5, n₂ = 5 at α = .05, standard critical tables specify U_crit = 2. H0 is rejected only if U ≤ U_crit. Because observed U = 3.5 > 2 (exact two-sided p = .075), we fail to reject the null hypothesis at α = .05.
Interpretation and Reading Guidance
Interpreting a non-parametric test depends on distribution shape. When groups share similar distribution shapes, the Mann-Whitney U test evaluates differences between medians. If distribution shapes differ, the test assesses stochastic dominance: whether an observation from one population is more likely to exceed an observation from the other, denoted P(X > Y) + 0.5 × P(X = Y).
| Metric | Value | Meaning |
|---|---|---|
| Group A Median (IQR) | 18.0 (IQR = 5.0) | Intervention group center; scores cluster around 18.0. |
| Group B Median (IQR) | 12.0 (IQR = 3.0) | Standard group center; scores cluster around 12.0. |
| Mann-Whitney U | U = 3.5 (U₁ = 3.5, U₂ = 21.5) | Pairwise count where Group B exceeded Group A. |
| Rank-Biserial Correlation (r) | r = 1 − (2 × 3.5 / 25) = 0.72 | Substantial effect favoring Group A despite p > .05. |
| p-Value (Two-Sided) | p = .075 | Not statistically significant at α = .05 given n = 5 sample size. |
Assumptions and Common Mistakes
Although nonparametric statistics do not assume normality, they require essential methodological conditions:
- Independence of Observations: Data points within and between groups must be mutually independent. Clustering or repeated measures violate this assumption.
- Ordinal Scale or Higher: Data must possess sufficient ordering to allow meaningful ranking without ambiguous ties.
- Shape Similarity for Median Shifts: To conclude that a significant U statistic reflects a difference in medians, sample distributions must exhibit similar dispersion and shape. Otherwise, the test indicates stochastic dominance.
- Power Considerations: The Central Limit Theorem ensures parametric t-tests remain robust under moderate non-normality in larger samples (n > 30). In large datasets, nonparametric tests sacrifice slight power (ARE = 95.5% under normality). When distributional form is ambiguous, computational resampling via bootstrap in R offers an effective distribution-free alternative.
How to Report It (APA Example)
Under APA 7th edition guidelines, report medians (Mdn) and interquartile ranges (IQR) instead of means and standard deviations, alongside test statistic U, sample sizes, z-score, exact p-value (without leading zero), and effect size:
A Mann-Whitney U test was performed to determine whether task completion scores differed between training conditions. Task completion times in the intervention group (Mdn = 18.00, IQR = 5.00, n = 5) were higher than in the standard group (Mdn = 12.00, IQR = 3.00, n = 5); however, this difference was not statistically significant at the conventional alpha level, U = 3.50, z = −1.89, p = .075, r = .72.
How to Calculate It in Excel, R and Python
Excel Calculation
Excel computes the Mann-Whitney U test using worksheet rank functions:
1. Place Group A in A2:A6 and Group B in B2:B6.
2. In C2:C11, list all 10 pooled values; in D2:D11, record group labels ("A" or "B").
3. In E2, compute mid-ranks: =RANK.AVG(C2, $C$2:$C$11, 1) and fill down to E11.
4. Calculate Rank Sum for Group A: =SUMIF($D$2:$D$11, "A", $E$2:$E$11) [Result: 36.5]
5. Calculate U1: =5*5 + (5*6)/2 - SUMIF($D$2:$D$11, "A", $E$2:$E$11) [Result: 3.5]
6. Two-tailed asymptotic p-value: =2*(1 - NORM.S.DIST((21.5 - 12.5)/4.77, TRUE))
R Snippet
# Mann-Whitney U test (Wilcoxon rank-sum) in R
group_a <- c(12, 15, 18, 20, 22)
group_b <- c(8, 11, 12, 14, 16)
# Execute test
res <- wilcox.test(group_a, group_b, alternative = "two.sided", exact = TRUE)
print(res)
Python Snippet
import numpy as np
from scipy import stats
group_a = np.array([12, 15, 18, 20, 22])
group_b = np.array([8, 11, 12, 14, 16])
# Two-sided Mann-Whitney U test
res = stats.mannwhitneyu(group_a, group_b, alternative="two-sided")
print(f"Mann-Whitney U: {res.statistic}, p-value: {res.pvalue:.4f}")
Frequently Asked Questions
What is an example of non-parametric statistics?
A standard example is applying the Mann-Whitney U test to evaluate patient-reported pain scores (rated on a 1-to-10 visual analog scale) between two analgesic protocols. Because pain ratings represent ordinal data with unequal perceptual intervals and skewness, parametric t-tests are invalid. The Mann-Whitney U test ranks the combined pain ratings and tests whether one protocol yields lower pain ranks.
What’s the difference between parametric and nonparametric statistics?
The distinction centers on distributional assumptions. Parametric tests assume observations follow a specific distribution (such as a normal curve) and evaluate parameters like the mean. Nonparametric tests make no distribution assumptions, evaluating hypotheses using ranks, orderings, or counts.
What are nonparametric statistics in simple terms?
Nonparametric statistics are distribution-free methods used when data do not follow a bell curve. Instead of estimating population parameters, they evaluate value orderings to test whether groups differ or variables correlate.
When should researchers prioritize nonparametric tests over parametric tests?
Researchers should prioritize non-parametric tests when the outcome variable is measured on an ordinal scale, when sample sizes are small and strongly skewed, when extreme outliers cannot be trimmed, or when formal tests of normality indicate severe violations of parametric modeling assumptions.
Sources
- NIST/SEMATECH. (2012). e-Handbook of Statistical Methods, Section 7.3.5: “Do two arbitrary processes have the same central tendency?” National Institute of Standards and Technology. URL: https://www.itl.nist.gov/div898/handbook/prc/section3/prc35.htm (verified 2026-11-07).
- Nahm, F. S. (2016). Nonparametric statistical tests for the continuous data: the basic concept and the practical use. Korean Journal of Anesthesiology, 69(1), 8–14. PMCID: PMC4754273. DOI: 10.4097/kjae.2016.69.1.8 (verified 2026-11-07).
- Wasserman, L. (2006). All of Nonparametric Statistics. Springer Texts in Statistics. Springer, New York. ISBN: 978-0-387-25145-5 (verified 2026-11-07).
- Conover, W. J. (1999). Practical Nonparametric Statistics (3rd ed.). John Wiley and Sons, New York. ISBN: 978-0-471-16068-7 (verified 2026-11-07).







