2. Non parametric test - Kruskal-wallis test for the following data
24,32,39,34,30,40,36,38
28,31,35,22,38,28,32,28
34,31,28,24,31,26,28,34, Significance Level `alpha=0.05` and  One-tailed  testSolution:Step-1: Take the hypothesis
Null Hypothesis `H_0` : All groups are equal
Alternative Hypothesis `H_1` : Atleast one group is not equal
Step-2: Ranking all group values
| Size in Ascending Order | Rank | Name of related sample A for sample-1
 B for sample-2
 C for sample-3
 | Rank for A | Rank for B | Rank for C | 
| 22 | 1 | B |  | 1 |  | 
| 24 | 2.5 | C |  |  | 2.5 | 
| 24 | 2.5 | A | 2.5 |  |  | 
| 26 | 4 | C |  |  | 4 | 
| 28 | 7 | C |  |  | 7 | 
| 28 | 7 | C |  |  | 7 | 
| 28 | 7 | B |  | 7 |  | 
| 28 | 7 | B |  | 7 |  | 
| 28 | 7 | B |  | 7 |  | 
| 30 | 10 | A | 10 |  |  | 
| 31 | 12 | C |  |  | 12 | 
| 31 | 12 | C |  |  | 12 | 
| 31 | 12 | B |  | 12 |  | 
| 32 | 14.5 | B |  | 14.5 |  | 
| 32 | 14.5 | A | 14.5 |  |  | 
| 34 | 17 | C |  |  | 17 | 
| 34 | 17 | C |  |  | 17 | 
| 34 | 17 | A | 17 |  |  | 
| 35 | 19 | B |  | 19 |  | 
| 36 | 20 | A | 20 |  |  | 
| 38 | 21.5 | B |  | 21.5 |  | 
| 38 | 21.5 | A | 21.5 |  |  | 
| 39 | 23 | A | 23 |  |  | 
| 40 | 24 | A | 24 |  |  | 
| Total |  |  | 132.5 | 89 | 78.5 | 
The rank total for A is `R_1=132.5`
The rank total for B is `R_2=89`
The rank total for C is `R_3=78.5`
Step-3: Compute test statistic
`sum R_j^2/n_j=(132.5)^2/8+(89)^2/8+(78.5)^2/8=3954.9375`
n = total number of samples = 24
`H=12/(n(n+1)) sum R_j^2/n_j - 3(n+1)`
`=12/(24(24+1)) (3954.9375) - 3(24+1)`
`=12/600 * (3954.9375) - 75`
`=4.0987`
Step-4: `alpha=0.05`
Step-5: Compute the degrees of freedom (df).
`df=(3-1)=2`
Step-6:The Critical value of chi-square is `chi^2(0.05,2)=5.9915`
Since the computed `H`(4.0987) < critical `chi^2`(5.9915)
So we accept the null hypothesis (`H_0`) and conclude that all groups are identical.
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then