Friedman Test Calculator
Run the Friedman test for repeated-measures designs. Enter either raw data (one row per subject/block, one column per treatment) or rank sums, and get the Friedman chi-square statistic, p-value and Kendall’s W effect size.
Suitable for nonparametric analysis of k ≥ 3 related conditions when assumptions for repeated-measures ANOVA are doubtful.
Input mode
Each row corresponds to one subject, block or matched set.
Number of related conditions to compare (k ≥ 3).
Enter numeric responses only. Each row = one block/subject; each column = one treatment. Higher values will receive higher ranks within each row.
Used for the reject / do not reject decision.
Use dot or comma as decimal separator. Empty cells are treated as missing values and will cause an error.
What is the Friedman test?
The Friedman test is a nonparametric alternative to one-way repeated-measures ANOVA. It tests whether k related treatments (e.g. three or more time points, experimental conditions or methods) have the same distribution when measured on the same blocks or subjects.
Instead of using the raw values directly, the Friedman test:
- Ranks observations within each block.
- Sums ranks for each treatment \( R_j \).
- Compares these rank sums via a chi-square statistic.
Friedman test formula
Let \(n\) be the number of blocks (subjects) and \(k\) the number of treatments. Denote by \(R_j\) the sum of ranks for treatment \(j\) across all blocks.
\( Q = \dfrac{12}{n k (k+1)} \sum_{j=1}^{k} R_j^2 - 3n(k+1) \)
Under the null hypothesis of equal treatment distributions and for reasonably large \(n\), \(Q\) approximately follows a chi-square distribution with \(k - 1\) degrees of freedom.
Kendall’s W effect size
A convenient effect size associated with the Friedman test is Kendall’s W, defined as:
\( W = \dfrac{Q}{n (k - 1)} \)
The coefficient \(W\) ranges from 0 (no agreement / no effect) to 1 (perfect agreement / maximal effect). Very roughly:
- \(W \approx 0.1\): small effect
- \(W \approx 0.3\): medium effect
- \(W \ge 0.5\): large effect
These thresholds are only guidelines; always interpret effect sizes in the context of your field.
When to use the Friedman test
You typically choose the Friedman test when:
- You have k ≥ 3 related conditions (e.g. repeated measures or matched sets).
- The outcome is ordinal or strongly non-normal with outliers.
- Parametric assumptions (normality, sphericity) of repeated-measures ANOVA are violated.
Friedman vs. Kruskal–Wallis vs. repeated-measures ANOVA
- Friedman test: nonparametric, for related samples (within-subjects or blocks), works on within-block ranks.
- Kruskal–Wallis test: nonparametric, for independent groups, works on ranks across the full sample.
- Repeated-measures ANOVA: parametric, assumes normality of residuals and sphericity.