﻿ Analysis of variance and covariance > Non-Parametric ANOVA > Friedman ANOVA test

# Friedman ANOVA test

The Friedman test (named after its originator, the economist Milton Friedman) is a non-parametric ANOVA test similar to the Kruskal-Wallis test, but in this case the columns, k, are the treatments and the rows are not replicates but blocks. This corresponds to a simple two-way ANOVA without replication in a complete block design (for incomplete designs use the Durbin test, which is very similar), but instead of using the original data the values in each row or block, b, are replaced with their ranking within that row/block, i.e. row-wise ranking as compared with column-wise ranking in the Kruskal-Wallis test. The column totals for these ranks are then computed. The statistic then computed is of the form: where the Ri represent the sum of the ranked values in column i. The statistic is approximately distributed as a chi-square with k-1 degrees of freedom. However, a revised (improved) form of the test, defined by: is widely used, which has an F distribution with (k-1) and (b-1)(k-1) degrees of freedom.

Example: Potato yield data

Using the example provided in the two-way ANOVA section, we have the data shown below, with the row rankings and column sums, followed by the ANOVA table based on the Friedman test statistic provided within MATLab. This form of ANOVA only provides a between columns statistic for evaluation. As with the two-way ANOVA this test does not suggest that any significant column effects exist, i.e. that the different fertilizers have not significantly affected the yield. The test assumes that rows/blocks are independent and that the data can be meaningfully ranked.

Potato yields, in tons — Friedman test

 F1 F2 F3 F4 F5 Var1 1.9 (2) 2.2 (4) 2.6 (5) 1.8 (1) 2.1 (3) Var2 2.5 (4) 1.9 (1) 2.3 (3) 2.6 (5) 2.2 (2) Var3 1.7 (1) 1.9 (2) 2.2 (5) 2.0 (3) 2.1 (4) Var4 2.1 (2) 1.8 (1) 2.5 (5) 2.3 (3) 2.4 (4) Sum 7 8 18 12 13

Potato yields — two-way ANOVA — Friedman test

 Source Sums of squares Degrees of freedom Mean squares Chi-sq Prob>chi-sq Between fertilizers 15.5 4 3.875 6.2 0.1847 Residual 24.5 12 2.042 Total 40 19