2. Friedman two way ANOVA By Rank
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 and k columns.
The data is ranked horizontally or across the rows and
the mean rank for each column is compared.
This test is very useful when the data are ordinal
(i.e., ranked)
3. History
Friedman test is a non parametric statistical method
developed by Dr. Milton Friedman
4. History
Friedman test is a non parametric statistical method
developed by Dr. Milton Friedman
6. Friedman Formula
2
2
1
12 ( 1)
( 1) 2
k
r j
j
b k
R
bk k
2 2
1
12
3 ( 1)
( 1)
k
r j
j
R b k
bk k
EQUATION 1
EQUATION 2
EQUATION 3
8. 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 clean
up, 1 month later and a year after clean up.
Aqualytic sensor system AL606
9. Hypothesis Testing Steps
1. Data
Site BOD (biological oxygen demand)
Before After 1
month
After 1
year
1 17.4 13.6 13.2
2 15.7 10.1 9.8
3 12.9 9.7 9.7
4 9.8 9.2 9.0
5 13.4 11.1 10.7
6 18.7 20.4 19.6
7 13.9 10.4 10.2
8 11 11.4 11.5
9 5.4 4.9 5.2
10 10.4 8.9 9.2
11 16.4 11.2 11.0
12 5.6 4.8 4.6
11. Hypothesis Testing Steps
1. Data
2. Assumption
The observations appearing in a given block are independent of the observations appearing in
each of the other blocks, and within each block measurement on at least an ordinal scale is
achieved.
3. Hypothesis
H0 : The clean up procedure has had no effect on the BOD.
HA : The clean up procedure has affected the BOD.
4. Decision Rule: Reject H0 if M > critical value at 5% level of
significance
5. Calculation of Test Statistic
12. Calculating of test statistic……
Friedman’s magic formula!!!!
Where, k = number of columns (treatments)
n = number of rows (blocks)
Rj = sum of the ranks
13. BOD (biological oxygen demand)
Site Before After 1 month After 1 year
Sum of ranks 32 22.5 17.5
2
(sum of ranks) 1024 506.25 306.25
Number of columns, k 3
Solution:Number of rows, n 12
1836.5 = (1024 + 506.25 + 306.25)
__12__
nk(k+1)
0.083 = ___12___
12 x 3 x 4
3n(k+1) 144 = 3 x 12 x 4
Test Statistic M 8.43 = 0.083 x 1836.5 - 144
14. 6. Statistical decision
Compare computed M value to critical value at 5% level of significance.
M(computed value) = 8.43
critical value at 5% level of significance is = 6.17
• 7. Conclusion M is > than critical value
Reject the null hypothesis
Alternative hypothesis:
HA : The clean up procedure has affected the BOD.