Skip to content
Omnikalc

Friedman test calculator

Enter the number of subjects, the number of treatments and the sum of ranks of each treatment to get the Friedman statistic, its p-value and Kendall’s W.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Value out of range

Results

Friedman statistic Q

3.800

Degrees of freedom
2
p-value
0.1496
No evidence of a difference between treatments
Kendall’s W (agreement between subjects)
0.1900
Weak agreement
Expected sum of all rank sums
60.0
Difference with the entered sums
0.0
The rank sums add up

The Friedman test calculator compares three to five treatments measured on the same subjects from the rank sums, and gives the statistic, the p-value and Kendall’s W.

How the calculation works

  • Enter the number of subjects and the number of treatments.
  • Enter the sum of ranks of each treatment.
  • The calculator gives Q, the degrees of freedom, the p-value, Kendall’s W and a check of the rank sums.

Example

Ten tasters rank three recipes, and the rank sums are 15, 22 and 23, which add up to 60 = 10 × 3 × 4 / 2. Then Q = 12 / (10 × 3 × 4) × (15² + 22² + 23²) − 3 × 10 × 4 = 3.800. With 2 degrees of freedom, p = 0.1496, so the tasters do not clearly prefer one recipe. Kendall’s W is 0.1900, a weak agreement.

Why it matters

The calculator helps students and researchers in psychology, food science, medicine and user research who rank conditions on the same people and want a test without normality assumptions.

Good to know

Rank within each subject before summing, and never rank across subjects. Ties are allowed through average ranks, but many ties call for a correction that raises Q slightly, so the result here is then a little conservative. The chi-square approximation works when there are at least about 10 subjects, or about 5 with three treatments with exact tables as an alternative. The Friedman test needs complete data: a subject with a missing treatment must be removed. Kendall’s W runs from 0 for no agreement to 1 for identical rankings and is equal to Q / (n × (k − 1)).

The Kruskal-Wallis calculator handles independent groups, the chi-square distribution calculator gives p-values, the ANOVA calculator covers normal data and the Wilcoxon signed-rank calculator handles two conditions.

Frequently asked questions

When do I use the Friedman test?

Use it when the same subjects are measured under three or more conditions and the data are ordinal or not normal. It is the non-parametric counterpart of a repeated-measures ANOVA. For two conditions, use the Wilcoxon signed-rank test.

How do I get the rank sums?

For each subject, rank the treatments from 1 to k, giving the average rank for ties. Then add up the ranks of each treatment over all subjects. The total of all rank sums must equal n × k × (k + 1) / 2, which the calculator checks.

What does a significant result mean?

That at least one treatment tends to rank differently from the others. It does not say which, so follow it with pairwise comparisons, such as Wilcoxon tests with a Bonferroni correction or the Nemenyi test.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.