The Friedman test is a non-parametric alternative to ANOVA with repeated measures. No normality assumption is required. The test is similar to the Kruskal-Wallis Test. We will use the terminology from Kruskal-Wallis Test and Two Factor ANOVA without Replication.
Property 1: Define the test statistic
where k = the number of groups (treatments), m = the number of subjects, Rj is the sum of the ranks for the jth group. If the null hypothesis that the sum of the ranks of the groups are the same, then
when k ≥ 5 or m > 15. The null hypothesis is rejected when Q > .
Example 1: A winery wanted to find out whether people preferred red, white or rosé wines. They invited 12 people to taste one red, one white and one rose’ wine with the order of tasting chosen at random and a suitable interval between tastings. Each person was asked to evaluate each wine with the scores tabulated in the table on the left side of Figure 1.
Figure 1 – Friedman’s test for Example 1
The ranks of the scores for each person were then calculated and the Friedman statistic Q was calculated to be 1.79 using the above formula. Since p-value = CHITEST(1.79, 2) = 0.408 > .05 = α, we conclude there is no significant difference between the three types of wines.
Observation: Just as for the Kruskal Wallis test, an alternative expression for Q is given by
where is the sum of squares between groups using the ranks instead of raw data.
For Example 1, we can obtain from the ranked scores (i.e. range F3:I15) using Excel’s Anova: Two-Factor Without Replication data analysis tool (see Figure 2), and then use this value to calculate Q as described above.
Figure 2 –Alternative way of calculating Friedman’s statistic
Real Statistics Excel Function: The Real Statistics Resource Pack contains the following supplemental function:
FRIEDMAN(R1) = value of Q on the data (without headings) contained in range R1 (organized by columns).
FrTEST(R1) = p-value of the Friedman’s test on the data (without headings) contained in range R1 (organized by columns).
For Example 1, FRIEDMAN(B5:D14) = 1.79 and FrTEST(B5:D14) = .408.