Home / Lean Six Sigma / Basic statistics & tests

Nonparametric tests: medians, ranks and runs

When data are skewed, have extreme values or are too few to check normality, compare medians and ranks: which shift repairs faster, which supplier lasts longer, whether setup met the target and whether production has a trend. Pick the test by the question (the “?” next to Test helps), paste the measurements with each group’s name in the first row and read the verdict; the example button shows the right layout for each test.

Pre-sizing and estimating tool: results do not replace design, calculations or reports signed by a licensed professional, nor verification against the applicable codes and standards.

CheckRevised 11/03/2026
Test
See what was read
Hypotheses

No normality needed: the tests compare medians (or rank positions) and are not affected by extreme values. If the data are normal, the t-test and ANOVA detect differences with fewer samples.

Your inputs stay only on this browser and are not sent anywhere. Untick to delete them.

—Nonparametric test
—

—

Descriptive statistics

Estimation

Test

Pairwise comparisons (Dunn, Bonferroni)

How to read: Median = middle value of each group (half the parts below, half above); mean rank = average position of the group’s values when all are sorted from smallest to largest (a group with high values has a high rank); statistic (H, W, χ²…) measures the departure from “no difference”; P-value < α = real difference. In Dunn’s table, each row is a pair of groups.

Data with median and confidence interval

Each dot is a measurement; box = middle 50%; diamond = median with its CI. Dashed line = tested value or overall median.

How to read: each dot is a real measurement; the box covers the middle half of the data and the diamond with a bar is the median with its uncertainty range. Compare the bars between groups (or with the dashed line of the tested value): bars that do not touch indicate a clear difference. In the runs test, the horizontal axis is the production order.

Tap the chart to see the values.

How the test sees the data

Ranks, signs or counts that go into the test statistic.

How to read: it shows the data the way the test uses them: instead of the values, each one’s position (rank) in the sorted list, or just the sign (above/below), or the count above the median. With no difference, the groups would be balanced around the reference line; a group always at the top or always at the bottom is what produces a small P-value.

Tap the chart to see the values.

Reference distribution: where the statistic fell

Distribution of the statistic if H0 were true. The shaded area is the P-value.

How to read: the curve (or bars) shows the results that appear by chance alone when there is no difference. The label marks where your data fell. If the colored area beyond that point is small (below α), the result is unlikely to be chance; if it is large, the data are consistent with “no difference”.

Tap the chart to see the values.

Hodges-Lehmann estimate

Histogram of the Walsh averages (1 sample) or of the differences between all pairs (2 samples); their median is the estimate and the band the CI.

How to read: the histogram gathers all averages of pairs of values (1 sample) or all differences between one value from each group (2 samples). The middle of that pile is the best estimate of the median (or of the difference) and the blue band is the confidence interval. If the band excludes the tested value (or zero), the difference is real.

Tap the chart to see the values.

Next step

Take this page’s results to another calculator with the fields already filled in.

The calculation report gathers this page's inputs, results, equations, assumptions and references, with fields for project, engineer and revision. The full report also includes the charts and interpretations, in color. In the print dialog, choose Save as PDF.

Method, assumptions and references

Equations used

Sign: S = no. of values > η₀ ~ Binomial(n; 0.5) (n ≤ 50 exact; n > 50 normal with 0.5 correction). CI: X(d) to X(n−d+1) and Hettmansperger-Sheather interpolation
Wilcoxon: W = Σ ranks of |x − η₀| with positive sign; z = (W − n(n+1)/4 ∓ 0.5)/√[n(n+1)(2n+1)/24]; η̂ = median of Walsh averages (xᵢ + xⱼ)/2, i ≤ j
Mann-Whitney: W = Σ ranks of sample 1; μ = n₁(N+1)/2; σ² = n₁n₂(N+1)/12, with ties n₁n₂/12·[(N+1) − Σ(t³−t)/(N(N−1))]; difference = median of xᵢ − yⱼ
Kruskal-Wallis: H = 12/[N(N+1)]·Σnᵢ(R̄ᵢ − (N+1)/2)²; H(adj) = H/[1 − Σ(t³−t)/(N³−N)]; Zᵢ = (R̄ᵢ − (N+1)/2)/√[(N+1)(N/nᵢ − 1)/12]; DF = k − 1
Mood: 2 × k table of values ≤ and > the overall median, Pearson χ², DF = k − 1; Friedman: S = 12/[nk(k+1)]·ΣRⱼ² − 3n(k+1), S(adj) = S/[1 − Σ(t³−t)/(nk(k²−1))]
Runs: E(R) = 2n₁n₂/N + 1; Var(R) = 2n₁n₂(2n₁n₂ − N)/[N²(N − 1)]; Z = (R − E)/√Var

Assumptions and limits

  • Independent observations. Wilcoxon assumes a symmetric distribution; Mann-Whitney and Kruskal-Wallis read as median differences when the groups have similar shape and spread (otherwise, as a tendency to larger values). Mood does not require equal shapes.
  • P-values by normal or chi-square approximation (except the sign test with n ≤ 50, exact). Wilcoxon and Mann-Whitney CIs at the achieved confidence closest to the requested one (normal approximation with continuity correction).
  • Dunn comparisons (Bonferroni) after Kruskal-Wallis and rank plots are interpretive extras.

Standards and technical documents

  • Hollander, M.; Wolfe, D. A.; Chicken, E. Nonparametric Statistical Methods, 3rd ed. Wiley, 2014
  • Conover, W. J. Practical Nonparametric Statistics, 3rd ed. Wiley, 1999
  • Hettmansperger, T. P.; Sheather, S. J. Confidence intervals based on interpolated order statistics. Statistics & Probability Letters 4:75–79, 1986
  • Dunn, O. J. Multiple comparisons using rank sums. Technometrics 6:241–252, 1964
  • Doksum, K. Robust procedures for some linear models with one observation per cell. Annals of Mathematical Statistics 38:878–883, 1967
  • NIST/SEMATECH e-Handbook of Statistical Methods, seção 1.3.5.13 (Runs Test for Detecting Non-randomness)

U.S. regulations

  • ISO 9001:2015, 9.1.3: analysis and evaluation
  • ISO 16269-7: median — estimation and confidence intervals

Frequently asked questions

When should I use a nonparametric test instead of the t-test or ANOVA?

When the data are skewed (repair times, service life, setup time), have extreme values you cannot discard, or are too few to check normality. The tests compare medians or ranks and are not pulled by a single value. If the data are normal, the t-test and ANOVA detect the same difference with fewer samples.

What is the difference between the sign test and Wilcoxon?

The sign test only counts how many values fall above and below the tested value; Wilcoxon also uses the size of the deviations (through ranks), so it has more power, but it assumes a symmetric distribution. For setup times, which usually have a long tail, the sign test is the safe choice; in the example, 15 of the 20 setups were under 30 minutes, 1 exactly at 30 and 4 above (p = 0.010 for “median less than 30”).

How do I compare two suppliers with Mann-Whitney?

Paste one column per supplier. The test sorts all values together and checks whether one supplier’s values typically take the higher positions. The estimated difference (median of all pairwise differences) tells, for example, how many more hours a bearing lasts, with its confidence interval.

Kruskal-Wallis or Mood’s median?

Both compare 3 or more groups. Kruskal-Wallis uses ranks and has more power; Mood only counts values above and below the overall median and copes better with extreme values and groups of different shapes. In the maintenance call example, a 140-minute call does not distort Mood’s test.

What is the Friedman test for?

To compare treatments measured in the same blocks: four inserts tested on the same six machines, three methods applied by the same operators. It ranks the treatments within each block, so the difference between machines does not hide the difference between inserts. It is the nonparametric version of randomized-block ANOVA.

What does the runs test show on a production line?

Whether the order of the values is random. Too few runs above or below the mean point to a trend, tool wear or drift; too many runs point to overcorrection (the operator readjusts after every part). In the diameter example there are far fewer runs than expected: the process drifts.

What is the adjustment for ties and which P-value should I use?

Repeated values, common with low-resolution gages, shrink the variance of the statistic. The adjusted value corrects for this and is the most accurate; the unadjusted one is more conservative. The page’s conclusion uses the adjusted value when there are ties; both versions appear in the table.