The Kruskal-Wallis H Test
Lecture 55
The Kruskal-Wallis H test, commonly known as the one-way ANOVA on ranks, is a non-parametric test alternative to one-way ANOVA. The null hypothesis tested that the population medians are equal against the alternative that the population medians are not equal. The Kruskal-Wallis H test is the extension of the Mann-Whitney U test, which is employed to compare two population medians. To perform the test, arrange all the sample observations, assign ranks denoted by rij and assign average ranks to the tied observations. The observations are replaced by their respective ranks, and the sum of ranks of each sample is denoted by Ri. Then compute the following quantities:
If there is no tie, then
Then the Kruskal-Wallis H statistic can be computed as:
Where C is the correction factor and can be obtained as:
If there are no ties, the H statistic is simplified to
|
Rank of Growth of Plant |
||
|
High Sun Light |
Medium Sun Light |
Low Sun Light |
|
8 |
4 |
1 |
|
7 |
5 |
3 |
|
9 |
6 |
5 |
|
2 |
4 |
3 |
|
Drug A |
Drug B |
Drug C |
|
23 |
22 |
59 |
|
26 |
27 |
66 |
|
51 |
39 |
38 |
|
49 |
29 |
49 |
|
58 |
46 |
56 |
|
37 |
48 |
60 |
|
29 |
49 |
56 |
|
44 |
65 |
62 |
|
Observation |
22 |
23 |
26 |
27 |
29 |
29 |
37 |
38 |
|
Rank |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
|
Avg. Rank |
|
|
|
|
5.5 |
|
|
|
|
Observation |
39 |
44 |
46 |
48 |
49 |
49 |
49 |
51 |
|
Rank |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
|
Avg. Rank |
|
|
|
|
14 |
|
||
|
Observation |
56 |
56 |
58 |
59 |
60 |
62 |
65 |
66 |
|
Rank |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
|
Avg. Rank |
17.5 |
|
|
|
|
|
|
|
|
Rank of Drug A |
Rank of Drug B |
Rank of Drug C |
|
|
2 |
1 |
20 |
|
|
3 |
4 |
24 |
|
|
16 |
9 |
8 |
|
|
14 |
5.5 |
14 |
|
|
19 |
11 |
17.5 |
|
|
7 |
12 |
21 |
|
|
5.5 |
14 |
17.5 |
|
|
10 |
23 |
22 |
|
|
Total |
R1 = 76.5 |
R2 = 79.5 |
R3=144 |
Dunn’s Test
The Dunn’s test is a post hoc test alternative to the Kruskal-Wallis H test.
In the Kruskal-Wallis H test, when the null hypothesis is significant. The pairwise comparison is made by Dunn’s test. The pairwise treatments can also be compared
by the Mann-Whitney U test and Wilcoxon rank sum.
The Dunn’s statistic
is given by:
Where:
N represents the
total number of observations.
ni, nj represent the
sample observations.
The pair of means
will be significant if the Q value exceeds Dunn’s critical table value.
|
A |
B |
C |
D |
|
57 |
43 |
87 |
60 |
|
81 |
61 |
69 |
70 |
|
67 |
42 |
58 |
75 |
|
64 |
45 |
82 |
72 |
|
96 |
39 |
90 |
79 |
|
80 |
|
91 |
76 |
|
68 |
|
|
|
|
56 |
|
|
|
Use the Kruskal-Wallis H test to decide whether the four
groups are taken from populations with the same median. Apply Dunn's test, if applicable.
Solution:
|
Rank
of A |
Rank
of B |
Rank
0f C |
Rank
of D |
|
6 |
3 |
22 |
8 |
|
20 |
9 |
13 |
14 |
|
11 |
2 |
7 |
16 |
|
10 |
4 |
21 |
15 |
|
25 |
1 |
23 |
18 |
|
19 |
|
24 |
17 |
|
12 |
|
|
|
|
5 |
|
|
|
|
R1
= 108 |
R2
= 19 |
R3
= 110 |
R4
= 88 |
* Significant
- Read More: Friedman Test
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)

%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
%20-%20Copy.png)
No comments:
Post a Comment