Compare › Non-parametric

Friedman test

The Friedman test compares k ≥ 2 within-subject conditions by ranking within each subject — the non-parametric counterpart to repeated-measures ANOVA.

What is Friedman test?

Within each block (subject), rank the k conditions from 1 to k, then test whether the rank sums per condition differ via a χ²(k − 1) statistic. Because ranks are computed within-block, between-subject variability is removed by construction — the same intuition as rm-ANOVA.

The post-hoc Nemenyi test compares all pairs of conditions using a studentised-range distribution; pairs whose mean-rank difference exceeds the critical value are flagged. Friedman + Nemenyi is the standard non-parametric counterpart to rm-ANOVA + Tukey HSD.

When should I use Friedman test?

  • Repeated-measures design with 3+ conditions, when rm-ANOVA's normality or sphericity assumption is clearly violated.
  • Within-subject rankings (panel evaluations, taste tests).

What data does it need?

Long format: response + treatment factor + block (subject) factor.

What does it report?

χ² statistic, df, p, Kendall's W effect size. Optional Nemenyi pairwise comparisons.

What does it assume?

  • Independent blocks.
  • Within each block, observations are at least ordinal and exchangeable under H₀.
  • Same number of observations per block (the long format has to be balanced).

How do I interpret the result?

Kendall's W runs from 0 (no agreement on rankings across subjects) to 1 (perfect agreement). Large W with significant Friedman ⇒ the conditions are reliably ordered.

See also