Sie sind auf Seite 1von 2

The Friedman test

The Friedman test is a test for comparing three or more related samples and which makes no assumptions about the underlying distribution of the data. The data is set out in a table comprising n rows by k columns. The data is then ranked across the rows and the mean rank for each column is compared. Example. A water company sought evidence the measures taken to clean up a river were effective. Biological oxygen demand (BOD) at 12 sites on the river were compared before cleanup and 1 month and 1 year after cleanup. The results are given below. Site 1 2 3 4 5 6 7 8 9 10 11 12 before 17.4 15.7 12.9 9.8 13.4 18.7 13.9 11 5.4 10.4 16.4 5.6 BOD after 1 month 13.6 10.1 10.3 9.2 11.1 20.4 10.4 11.4 4.9 8.9 11.2 4.8 after 1 year 13.2 9.8 9.7 9.0 10.7 19.6 10.2 11.5 5.2 9.2 11.0 4.6

The Friedman test involves ranking the data in the rows, then comparing the mean rank in each column. Thus the values of BOD would be ranked across each row as shown below. Where two samples have the same value a mean rank is assigned. (site 3) Site 1 2 3 4 5 6 7 8 9 10 11 12 before 3 3 3 3 3 1 3 1 3 3 3 3 BOD after 1 month 2 2 1.5 2 2 3 2 2 1 1 2 2 after 1 year 1 1 1.5 1 1 2 1 3 2 2 1 1

If the cleanup procedure had been ineffective, the ranking of values over time would be randomly distributed at the various sites and the sum of the ranks for each column would be similar. However, if the cleanup procedure were effective, there would be significant differences in the sum of the ranks of at least one column.
The Friedman test.doc

-1 -

GFW, 30/09/02

Null hypothesis H0 : The cleanup procedure has had no effect on the BOD H1 : The cleanup procedure has affected the BOD Decision Rule Reject H0 if M critical value at = 5% Calculation method The differences between the sum of the ranks is evaluated by calculating the Friedman test statistic, M from the formula M= Where: k = number of columns (often called treatments) n = number of rows (often called blocks) Rj = sum of the ranks in column j. If there is no significant difference between the sum of the ranks of each of the columns, then M will be small, but if at least one column shows significant difference then M will be larger. For the BOD example these calculations work out as follows Site Sum of ranks (Sum of ranks)2 No of Columns, k No of Rows, n R2 12/nk(k+1) 3n(k + 1) Test Statistic M before 32 1024 3 12 1836.5 0.083 144 9.042 ( = 1024 + 506.25 + 306.25) ( = 12/12 x 3 x 4) ( = 3 x 12 x 4) ( = 0.083 x 1836.5 144) BOD after 1 month 22.5 506.25 after 1 year 17.5 306.25 12 R 2j 3n (k + 1) nk (k + 1)

The significance of M may then be looked up in tables. The critical value of M for 3 columns and 12 rows at = 5% is 7.5 Thus M > critical value so we can reject H0 and conclude that the treatment has had a significant effect on the BOD for that stretch of river. If the values of k and/or n exceed those given in tables, the significance of M may be looked up in chi-squared (2 ) distribution tables with k-1 degrees of freedom.

The Friedman test.doc

-2 -

GFW, 30/09/02

Das könnte Ihnen auch gefallen