- Introduced by
- Milton Friedman
- Year
- 1937
- Type
- Nonparametric repeated-measures comparison (by ranks)
What does it do?
The Friedman test is a nonparametric hypothesis test that compares three or more related conditions measured on the same blocks or subjects, serving as the rank-based alternative to repeated-measures ANOVA.
It was introduced by Milton Friedman in 1937 and works on ordinal or continuous data without assuming normality.
The intuition behind the method
Suppose each subject is measured under several conditions, such as the same patients assessed at three time points, and the values may not be normally distributed. The test ranks the conditions separately within each subject, so every subject acts as its own block. If the conditions were equivalent, the rank totals summed across subjects should be roughly similar. A large imbalance among those totals indicates that at least one condition differs from the others.
History
Milton Friedman proposed the test in his 1937 paper in the Journal of the American Statistical Association, presenting ranks as a way to avoid the normality assumption implicit in the analysis of variance. The test is also called the Friedman two-way analysis of variance by ranks, reflecting its blocking and condition factors.
When to use it
Use the Friedman test when the same subjects or blocks are measured under three or more conditions, as in a repeated-measures or randomised block design, and the outcome is at least ordinal. It is a natural choice when the normality assumption of repeated-measures ANOVA is doubtful or when its sphericity assumption is violated. Do not use it for independent groups; in that case the Kruskal-Wallis test is the appropriate rank-based alternative. When only a few blocks are available, the chi-square approximation is unreliable and an exact or permutation-based p-value is preferable.
Limitations and considerations
- Indicates only that the conditions differ overall, not which pairs differ; pairwise post-hoc tests are needed to locate the differences.
- The chi-square approximation requires a reasonable number of blocks; with few blocks the p-value can be misleading.
- Because it works on ranks, it can be less powerful than repeated-measures ANOVA when the parametric assumptions actually hold.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Makes no normality assumption, so it can be applied to ordinal ratings as well as continuous measurements.
- Uses a within-subject blocking design, so each subject serves as its own reference when the conditions are compared.
- Ranks the values within each block, so an extreme value for one subject affects only that subject's ranks rather than the scale of the statistic.
Applications
- Comparing the same patients across three or more treatment time points in clinical studies.
- Evaluating several conditions rated by the same panel of judges in sensory or quality assessment.
- Comparing how the same respondents rank or score multiple products or designs.
- Analysing repeated ordinal measurements within subjects in psychology and education research.
How it works
How it works
The null hypothesis states that all k related conditions come from the same distribution, so no condition tends to produce higher values than the others. The alternative states that at least one condition differs systematically.
Formula
H_0:\ \text{all } k \text{ conditions share the same distribution} \quad H_1:\ \text{at least one differs}Within each of the n subjects (blocks), the k conditions are ranked from 1 to k. The ranks given to each condition are summed across subjects to give the rank totals R_j. The Friedman statistic combines these rank totals and is approximately chi-square distributed with k − 1 degrees of freedom when the number of blocks is sufficiently large. Larger differences among the rank totals produce a larger statistic.
Formula
\chi_F^2 = \dfrac{12}{n\,k\,(k+1)} \sum_{j=1}^{k} R_j^2 - 3\,n\,(k+1)The statistic is referred to the chi-square distribution with k − 1 degrees of freedom. If the resulting p-value falls below 0.05, the null hypothesis is rejected, indicating that the conditions are not all equivalent. A significant overall result is normally followed by pairwise post-hoc comparisons and an effect-size measure.
Formula
\text{reject } H_0 \text{ if } p < 0.05 \ \text{ from } \chi^2 \text{ with } k-1 \text{ df}Common pitfalls
- Applying it with few blocks, where the chi-square approximation becomes unreliable; an exact or permutation-based p-value is the usual alternative.
- Stopping at a significant omnibus result without running pairwise post-hoc comparisons.
- Reporting only the p-value without an effect size such as Kendall's W.
- Using it on independent groups rather than repeated measures, which calls for the Kruskal-Wallis test.
- Working with many tied values within blocks, which is common for ordinal ratings. The formula shown assumes no ties within blocks; with tied values a tie-corrected form of the statistic should be used, and the software's choice of statistic should be checked before the result is interpreted.
Frequently asked questions
How is the Friedman test different from the Kruskal-Wallis test?
Both are rank-based and nonparametric, but the Kruskal-Wallis test compares three or more independent groups, while the Friedman test compares three or more related conditions measured on the same blocks or subjects. Choose the Friedman test when the design is repeated-measures or blocked.
What post-hoc test should follow a significant result?
A significant Friedman test shows only that the conditions are not all equal. Follow it with pairwise comparisons among the conditions to identify which specific conditions differ. The Nemenyi test is a post-hoc procedure built for this purpose and controls the family-wise error rate across all pairs. If pairwise Wilcoxon signed-rank tests are used instead, apply a Bonferroni or Holm correction; uncorrected pairwise p-values do not control the family-wise error rate.
How do I report effect size?
Kendall's W (the coefficient of concordance) is the usual effect-size measure. It ranges from 0 to 1, and higher values indicate stronger agreement in how the conditions are ranked across blocks. Report it alongside the test statistic and p-value.
How many blocks do I need?
The chi-square p-value is an asymptotic approximation and becomes unreliable when there are few blocks. When the number of blocks is small, compare the asymptotic p-value with an exact or permutation-based p-value and report which one was used.
Related methods
Sources
Friedman, M. (1937). The use of ranks to avoid the assumption of normality implicit in the analysis of variance. Journal of the American Statistical Association, 32(200), 675–701.
Open DOI reference