Robust Friedman Test

Statistics
Introduced by
Extension of Friedman (1937); robust variants developed by Wilcox and colleagues
Year
1990s–2000s
Type
Robust nonparametric repeated measures comparison
Family
Classical statistics

What does it do?

The Friedman test is a rank-based procedure for comparing three or more related conditions measured within the same participants.

Robust variants apply trimming or Winsorization to the scores before ranking, to limit the influence of outliers and heavy tails. The test statistic below is the classical Friedman rank-sum statistic, which has no trimming term, so any robust pre-processing must be specified as a separate step and reported explicitly.

The intuition behind the method

The classical Friedman test ranks each participant's scores across the conditions and asks whether the column rank sums differ more than chance would allow. A robust variant first limits the influence of extreme values, either by trimming a fixed proportion of each condition's scores or by Winsorizing them, and then applies the ranking step. Because ranking already restricts how far a single outlier can move a score, the gain from this pre-processing depends on the data and should be named in any report.

History

The rank-based repeated-measures test on which this method builds was introduced by Milton Friedman in 1937 as an alternative to analysis of variance that does not require the assumption of normality. Robust modifications, which apply trimming or Winsorization before ranking, draw on the robust-statistics literature on trimmed means and Winsorized estimation. The specific variant used should be identified in any report.

When to use it

Use this test for a one-way within-subjects design with three or more conditions, continuous or ordinal outcomes, and a concern that a few extreme values or heavy tails could distort a parametric repeated-measures ANOVA. It is most relevant when outliers or skew appear within individual conditions. Assumptions: the blocks (participants) are independent of one another; each block contains all conditions, or incomplete blocks are handled by a rule that is stated in advance; and scores within a block are comparable across conditions. Do not use it when the data are close to normal with no outliers, because repeated-measures ANOVA is then more powerful, or when the blocks are not independent.

Limitations and considerations

  • Slightly less powerful than repeated-measures ANOVA when normality and sphericity-type assumptions genuinely hold.
  • The trimming proportion (10% and 20% are common) must be chosen in advance and can influence the results.
  • With few participants, trimming removes a large share of each condition's data, so the location estimates can become unstable.
  • Differences between trimmed means are less intuitive to applied readers than differences between ordinary means.
  • Software implementations differ, and not every package offers a robust variant by default.
  • Because ranking already limits how far an outlier can move a score, the added benefit of trimming or Winsorization over the classical test is not guaranteed and should be assessed for the data at hand.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Extreme values in a single condition have less influence on the rank-based comparison than on a mean-based analysis.
  • The within-participant ranking keeps each participant as their own block, as in the classical test.
  • Makes fewer distributional assumptions than parametric repeated-measures ANOVA.
  • Trimming or Winsorization can be fixed in advance, giving a clearly specified procedure for reporting.
  • Can be followed by pairwise comparisons with a multiplicity correction to identify which conditions differ.

Applications

  • Reaction-time or response-latency data measured under three or more conditions within the same participants, where occasional very slow responses are expected.
  • Repeated clinical outcome scores across three or more visits, where a few patients may have extreme values at one visit.
  • Ordinal ratings given by the same raters to several products or conditions, where ratings are skewed toward one end of the scale.

How it works

How it works

1

The null hypothesis states that the location parameters of the k conditions are equal. Depending on the version used, the location is a median or a trimmed mean; the chosen one should be named. The alternative is that at least one condition differs. The significance level, typically 0.05, is fixed before the analysis.

Formula
H_0: \theta_1 = \theta_2 = \cdots = \theta_k \quad H_1: \text{at least one } \theta_j \text{ differs}
2

For each condition, the g lowest and g highest observations are removed, where g = floor(trim fraction x n), and the remaining values are averaged. Winsorization instead replaces those extreme values with the g-th and (n-g)-th order statistics, so the sample size is kept constant while the leverage of outliers is limited.

Formula
\bar{X}_{tj} = \frac{1}{n - 2g} \sum_{i=g+1}^{n-g} X_{(i)j}
3

Within each block (participant), the scores are replaced by their ranks from 1 to k, and tied values receive average ranks. When a robust variant is used, the values entering this step are the trimmed or Winsorized scores rather than the raw scores, so the variant must be named. The ranks are then summed by column to give R_j.

4

The statistic is the classical Friedman rank-sum statistic, computed from the column rank sums R_j across n blocks and k conditions. It is referred to a chi-squared distribution with k-1 degrees of freedom. With few blocks this approximation can be inaccurate, so an exact or corrected reference distribution should be checked. The formula contains no trimming term; the robust step acts only through the values that are ranked. Standard implementations apply a tie correction when ties occur within blocks, and the software used should be checked for this.

Formula
F_r = \frac{12}{nk(k+1)} \sum_{j=1}^{k} R_j^2 - 3n(k+1)
5

Reject H0 if p is below alpha, with alpha fixed before the analysis. Kendall's W, computed from the same statistic as W = F_r / (n(k-1)), is reported as the overall effect size. Because W is derived from the ranks actually used, it describes the modified data when pre-processing is applied, not the raw scores. To identify which conditions differ, run pairwise comparisons (for example, Wilcoxon signed-rank tests for each pair of conditions) on the same scores and adjust for multiplicity with Benjamini-Hochberg false discovery rate control or Bonferroni-Holm correction.

Formula
\text{reject } H_0 \text{ if } p < \alpha; \text{ report effect size } W = \frac{F_r}{n(k-1)}

Common pitfalls

  • Choosing the trimming proportion after inspecting the data inflates the Type I error rate; it should be fixed beforehand.
  • Applying a chi-squared reference distribution with few blocks without checking whether an exact or corrected distribution is more appropriate.
  • Stopping after a significant omnibus result without pairwise comparisons, which leaves the reader unable to see which conditions differ.
  • Confusing the robust version with the classical Friedman test and reporting the wrong statistic or degrees of freedom.
  • Running the test with incomplete blocks or unhandled missing values within participants, which can distort the rank sums. Classical implementations usually exclude incomplete blocks; the rule used must be reported.

Frequently asked questions

How does the robust Friedman test differ from the standard Friedman test?

The standard test ranks the raw scores within each block and compares the column rank sums. A robust variant first applies trimming or Winsorization to the scores (or another modification that must be named in the report), so that extreme values are pulled in before ranking. The classical statistic has no trimming term, so the robust step has to be described separately.

What trimming proportion should I use?

Trimming proportions of 10% and 20% are commonly used. Choose one before the data are analysed and report it, because choosing it after inspecting the results inflates false positives.

Is Kendall's W still the correct effect size?

Kendall's W is computed from the classical statistic as W = F_r / (n(k-1)), so it describes the ranks actually used. If pre-processing is applied, W refers to the modified data. If you report a different robust effect size, name it, state how it was computed, and explain why it was chosen.

Can I use this test with ordinal scale data?

Yes, the test is rank-based, so it can be applied to ordinal outcomes. Trimming or Winsorizing ordinal data with few categories may change the ranks very little, so check whether the modification adds anything for your measurement scale.

What post-hoc tests can follow the robust Friedman test?

Pairwise comparisons with a multiplicity correction are the usual follow-up. Benjamini-Hochberg false discovery rate control and Bonferroni-Holm correction are two options. Choose the procedure before the analysis is run.

Related methods

Sources

  1. Wilcox, R. R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Academic Press.

    ISBN: 978-0123869838
  2. 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