StatTools : Friedman's Two Way Analysis of Variance Explained

Links : Home Index (Subjects) Contact StatTools

Related link :
Friedman's Two Way Analysis of Variance Program Page

Explanation References
Friedman's Two Way Analysis of Variance is a method to compare matched samples in multiple groups, where the data is nonparametric. It is the nonparametric equivalent of the Two Way Analysis of Variance, and similar to Wilcoxon's Matched Pair Ranks Test, except that there is usually more than 2 matched groups.

The advantage of Friedman's Test over unpaired comparison such as Kruskall Wallace One Way Analysis of Variance is that the comparison between groups are carried out within each case, so that variance between cases are bypassed.

The data to be entered consists of a multiple column table, where the columns represent groups, and the rows individual cases. The number in each cell is the ranking from the row subject to the column group.

Actual measurements can be used, providing the units measure the same thing across the groups, and the data in each trow are ranked before the statistics are calculated.

Example

The use of the method and interpretation of results are best demonstrated by the example provided in the Friedman's Two Way Analysis of Variance Program Page .

A1A2A3A4
2413
1324
3124
1123
1234
2314
1234
1243
2314
3142
1134
3124
3412
3412
2134
1143
1243

We want to compare pain relieve medication for chronic arthritis sufferers. We have 4 analgesics (A1, A2, A3, and A4). We recruited 17 arthritis sufferers, and treat them with the 4 medications in random order, then ask each sufferer to comparatively rate the effectiveness of pain relief, from 1 for poorest to 4 the best. If a sufferer cannot distinguish between medications, then the same rating can be given to more than one medication.

The table to the left show the rating provided by the 17 sufferers to the 4 analgesics.

2413
1324
3124
1.51.534
1234
2314
1234
1243
2314
3142
1.51.534
3124
3412
3412
2134
1.51.543
1243
2.5412.5
1432
1243
1432
Sum Ranks3851.55367.5
Mean Ranks1.80952.45242.52383.2143

The program firstly re-ranks the data, as shown in the table to the right to the right. Each row is ranked from 1 to 4 for the 4 groups. Where there are ties, the ranks are averaged.

The table is then summarised as a table of counts, where the numbers for each rank in each group are shown. This provides a better visual interpretation of how the preferences are distributed, and the numbers can be used to produce graphics such as bar charts.

The first statistics is to test the data against the null hypothesis that there is no difference between the groups. From this set of data, F=12.7136, df = 3, p=0.0053, so the differences between the groups are statistically significant.

The second analysis should be carried out only if a significant difference is found. It is a post hoc analysis to see which pair of groups are significantly different.

The calculation produces the least significant difference in sum of ranks between the groups. From this set of data, this is 22.1 at the p=0.05 level, and 26.3 at the p=0.01 level. Differences between any two groups exceeding these values are statistically significant.

From our data, the only pair that is different is between analgesic 1 and 4. The sum of ranks for A1 is 38 and for A4 is 67.5, a difference of 29.5, which is larger than the least significant difference at the p=0.01 level of 26.3. We can therefore conclude that arthritis sufferers prefer analgesic 4 more than analgesic 1, but no conclusions can be drawn on other comparisons.