Kruskal Wallis Test
Kruskal Wallis Test
nonparametric which
is used to compare 3
or more independent.
𝑲𝟏 ≠ 𝑲𝟐 ≠ 𝑲𝟑 ≠ ⋯ ≠ 𝑲𝒊
Formula
𝟏𝟐 𝑹𝒊𝟐
𝑯= −𝟑 𝒏+𝟏
𝒏 𝒏+𝟏 𝒏𝒊
9 22 6
Df = 2
Example: Ordinal data is displayed in the table below. Is there a
difference between Groups 1, 2, and 3 using alpha = 0.05
GROUP 1 GROUP 2 GROUP 3 Ho: There is no difference between the three groups.
27 20 34 Ha: There is a difference between the three groups.
Step 3: Calculate Degrees of Freedom and 𝑿𝟐
2 8 31 α = 0.05
4 14 3 𝟐
𝑿
18 36 23
7 21 30 Df = k - 1
Df = 3 - 1 𝑋 2 = 5.991
SLIDESMANIA.COM
9 22 6
Df = 2
RANK ORIGINAL SCORE
1 2
2 3
3 4 GROUP 1 GROUP 2 GROUP 3 R GRP 1 R GRP 2 R GRP 3
4 6
27 20 34 14 10 17
5 7
6 8 2 8 31 1 6 16
7 9
4 14 3 3 8 2
8 14
9 18
18 36 23 9 18 13
10 20 7 21 30 5 11 15
11 21
12 22
9 22 6 7 12 4
13 23 RANK SUM 39 65 67
14 27 n 6 6 6
15 30
SLIDESMANIA.COM
16 31
17 34
18 36
Example: Ordinal data is displayed in the table below. Is there a
difference between Groups 1, 2, and 3 using alpha = 0.05
GROUP GROUP GROUP R GRP R GRP R GRP
1 2 3 1 2 3
𝟏𝟐 𝑹𝒊𝟐
2712 𝑅𝑖
20 34 14 10 17 𝐇= σ −𝟑 𝒏+𝟏
𝐻=
𝑛 𝑛+1
σ
𝑛𝑖
−3 𝑛+1 𝒏 𝒏+𝟏 𝒏𝒊
2 8 31 1 6 16
𝟏𝟐 𝟑𝟗𝟐 𝟔𝟓𝟐 𝟔𝟕𝟐
4 14 3 3 8 2 𝐇= + + − 𝟑 𝟏𝟖 + 𝟏
𝟏𝟖 𝟏𝟖+𝟏 𝟔 𝟔 𝟔
18 36 23 9 18 13
7 21 30 5 11 15 𝐇 = 𝟐. 𝟖𝟓𝟒
9 22 6 7 12 4
SLIDESMANIA.COM
RANK SUM 39 65 67
n 6 6 6
Example: Ordinal data is displayed in the table below. Is there a
difference between Groups 1, 2, and 3 using alpha = 0.05
GROUP GROUP GROUP R GRP R GRP R GRP
1 2 3 1 2 3 If the H computed value is greater than the 𝑋 2 is greater
27 20 34 14 10 17 than 5.991, reject the null hypothesis
𝐻=
2 12 σ
𝑅𝑖 8
−3 𝑛+1
31 1 6 16
𝑛 𝑛+1 𝑛𝑖
4 14 3 3 8 2
18 36 23 9 18 13
7 21 30 5 11 15
9 22 6 7 12 4
RANK SUM 39 65 67 H = 2.854 𝑋 2 = 5.99
SLIDESMANIA.COM
n 6 6 6
Do not reject the null hypothesis
Example: Ordinal data is displayed in the table below. Is there a
difference between Groups 1, 2, and 3 using alpha = 0.05
GROUP GROUP GROUP R GRP R GRP R GRP
1 2 3 1 2 3
If 𝑋 2 is greater than 5.99, reject the Ho
27 20 34 14 10 17
2 12 8 31 1 6 16
Do not reject the null hypothesis
𝑅𝑖
𝐻= σ −3 𝑛+1
𝑛 𝑛+1 𝑛𝑖
4 14 3 3 8 2
18 36 23 9 18 13
7 21 30 5 11 15
There is no significant difference among
9 22 6 7 12 4 the three groups
RANK SUM 39 65 67
SLIDESMANIA.COM
n 6 6 6
Example: In a research title statisfaction Rating in Assistance during COVID
19 Lockdown. Use Kruskal-Wallis test to determine at 5% level of significance if the
three are the same.
Ho: The satisfaction ratings of lower, middle and
upper class are the same
LOWER MIDDLE UPPER
Step 3: Calculate Degrees of Freedom and 𝑿𝟐
Ha: The satisfaction ratings of lower, middle and
7 4 10 upper class are the same groups.
6 1 5 α = 0.05
8 3 2 𝑿𝟐
Df = k - 1
SLIDESMANIA.COM
7 7 3
5 9 4 Df = 3 - 1 𝑋 2 = 5.991
Df = 2
Example: Ordinal data is displayed in the table below. Is there a
difference between Groups 1, 2, and 3 using alpha = 0.05
GROUP 1 GROUP 2 GROUP 3 Ho: There is no difference between the three groups.
27 20 34 Ha: There is a difference between the three groups.
Step 3: Calculate Degrees of Freedom and 𝑿𝟐
2 8 31 α = 0.05
4 14 3 𝟐
𝑿
18 36 23
7 21 30 Df = k - 1
Df = 3 - 1 𝑋 2 = 5.991
SLIDESMANIA.COM
9 22 6
Df = 2
RANK ORIGINAL SCORE
1 1
2 2
3.5
3 3
4
3.5 3 LOWER MIDDLE UPPER RLOWER RMIDDLE RUPPER
5.5
5 4
5.5
6 4 7 4 10 11 5.5 15
7
7.5 5 6 1 5 9 1 7.5
8
7.5 5
9 6
8 3 2 13 3.5 2
11
10 7 7 7 3 11 11 3.5
11 7
5 9 4 7.5 14 5.5
12
11 7
13 8 RANK SUM 51.5 35 33.5
14 9 n 5 5 5
15 10
SLIDESMANIA.COM
Example: In a research title statisfaction Rating in Assistance during COVID
19 Lockdown. Use Kruskal-Wallis test to determine at 5% level of significance if the
three are the same.
LOWER MIDDLE UPPER RLOWER RMIDDLE RUPPER
𝟏𝟐 𝑹𝒊𝟐
12 𝑅𝑖 𝐇= σ −𝟑 𝒏+𝟏
𝐻=7
𝑛 𝑛+1
σ
𝑛𝑖
−43 𝑛 + 1 10 11 5.5 15 𝒏 𝒏+𝟏 𝒏𝒊
6 1 5 9 1 7.5 𝟏𝟐 𝟓𝟏.𝟓𝟐 𝟑𝟓𝟐 𝟑𝟑.𝟓𝟐
𝐇= + + − 𝟑 𝟏𝟓 + 𝟏
𝟏𝟓 𝟏𝟓+𝟏 𝟓 𝟓 𝟓
8 3 2 13 3.5 2
7 7 3 11 11 3.5 𝐇 = 𝟏. 𝟗𝟗𝟓
5 9 4 7.5 14 5.5
SLIDESMANIA.COM
12 𝑅𝑖
𝐻=7 σ −43 𝑛 + 1 10 11 5.5 15
𝑛 𝑛+1 𝑛𝑖
6 1 5 9 1 7.5
8 3 2 13 3.5 2
7 7 3 11 11 3.5
5 9 4 7.5 14 5.5
H = 1.995 𝑋 2 = 5.99
SLIDESMANIA.COM
6 1 5 9 1 7.5
8 3 2 13 3.5 2
7 7 3 11 11 3.5 The satisfaction ratings of lower, middle
5 9 4 7.5 14 5.5
and upper class are the same
SLIDESMANIA.COM
BSED-MATH