In: Statistics and Probability
A shoe company wants to test if three groups of workers have different salaries.
Group (1): 23, 41, 54, 66, 78
Group (2): 45, 55, 60, 70, 72
Group (3): 18, 30, 34, 40, 44
Use kruskall Wallis test with α = 0.05.
Solution:
Kruskal Wallis test with α = 0.05.
H0: The median of three groups of workers salaries are equal
H1: The median of three groups of workers salaries are not all equal.
Step 2:Computation of test statistics
The test statistic for the Kruskal Wallis test is denoted H and is defined as follows:
,
where k=the number of comparison groups, N= the total sample size, nj is the sample size in the jth group and Rj is the sum of the ranks in the jth group.
Here the given samples are already arranged in ascending order.
Samples ordered from smallest to largest | ||
Group 1 | Group 2 | Group 3 |
23 | 45 | 18 |
41 | 55 | 30 |
54 | 60 | 34 |
66 | 70 | 40 |
78 | 72 | 44 |
Samples ordered from smallest to largest | Ranks | ||||
Group 1 | Group 2 | Group 3 | Group 1 | Group 2 | Group 3 |
18 | 1 | ||||
23 | 2 | ||||
30 | 3 | ||||
34 | 4 | ||||
40 | 5 | ||||
41 | 6 | ||||
44 | 7 | ||||
45 | 8 | ||||
54 | 9 | ||||
55 | 10 | ||||
60 | 11 | ||||
66 | 12 | ||||
70 | 13 | ||||
72 | 14 | ||||
78 | 15 | ||||
R1=44 | R2=56 | R3=20 |
Here the sum of the ranks will be always equal to n(n+1)/2=15(15+1)/2=120 which is also equal to 44+56+20=120
=(12 /(15(15+1)) [(442/5)+(562/5)+(202/5)]-[3*(15+1)]
=[0.05*1094.4]-48
=54.72-48
=6.72
Step 3: Determination of critical value
For k=3,n1=5,n2=5,n3=5 and =0.05. the critical value is 5.780.
Step 4: Conclusion
Since observed value=6.72 is greater than critical value=5.780, we reject the null hypothesis and conclude that the three groups of workers have different salaries.