0% found this document useful (0 votes)
79 views18 pages

Kruskal Wallis Test

This document discusses the Kruskal-Wallis H test, a nonparametric method for comparing three or more independent groups. The Kruskal-Wallis H test is the nonparametric equivalent of the ANOVA F-test and is used when the data is not normally distributed or when the sample sizes are small. It works by ranking all the data from lowest to highest and then calculating a test statistic H based on the ranks to determine if there are statistically significant differences between the groups being compared. An example is provided demonstrating how to perform the Kruskal-Wallis H test to compare satisfaction ratings between lower, middle, and upper socioeconomic classes.

Uploaded by

Trisha Lorenzo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views18 pages

Kruskal Wallis Test

This document discusses the Kruskal-Wallis H test, a nonparametric method for comparing three or more independent groups. The Kruskal-Wallis H test is the nonparametric equivalent of the ANOVA F-test and is used when the data is not normally distributed or when the sample sizes are small. It works by ranking all the data from lowest to highest and then calculating a test statistic H based on the ranks to determine if there are statistically significant differences between the groups being compared. An example is provided demonstrating how to perform the Kruskal-Wallis H test to compare satisfaction ratings between lower, middle, and upper socioeconomic classes.

Uploaded by

Trisha Lorenzo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Another

nonparametric which
is used to compare 3
or more independent.

This is the counterpart


of F-test (ANOVA
TEST).
Use of ranks.
SLIDESMANIA.COM
SLIDESMANIA.COM
When do we use Kruskal-Wallis Test?
1. When the distribution is abnormal
2. When comparing the means of three or more
independent groups
3. When each sample has at least 5 observations
SLIDESMANIA.COM
How do we formulate the Ho and Ha?
NULL HYPOTHESIS ALTERNATIVE HYPOTHESIS
• The k - independent ● The k - independent
samples have been samples have been
drawn from populations drawn from populations
which are identically which are not identically
distributed distributed
• 𝑲𝟏 = 𝑲𝟐 = 𝑲𝟑 = ⋯ = 𝑲𝒊 • 𝑲𝟏 ≠ 𝑲𝟐 = 𝑲𝟑 = ⋯ = 𝑲𝒊
SLIDESMANIA.COM

𝑲𝟏 ≠ 𝑲𝟐 ≠ 𝑲𝟑 ≠ ⋯ ≠ 𝑲𝒊
Formula
𝟏𝟐 𝑹𝒊𝟐
𝑯= ෍ −𝟑 𝒏+𝟏
𝒏 𝒏+𝟏 𝒏𝒊

H = Kruskal Wallis Test


n = Total number of observation
i = 1, 2, … K
Ri = Sum of the ranks of ith sample
SLIDESMANIA.COM
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
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

RANK SUM 51.5 35 33.5


n 5 5 5
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.
If the H computed value is greater than the 𝑋 2 is greater
than 5.991, reject the null hypothesis
LOWER MIDDLE UPPER LOWER MIDDLE UPPER

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

RANK SUM 51.5 35 33.5


n 5 5 5 Do not reject the null hypothesis
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 LOWER MIDDLE UPPER
If 𝑋 2 is greater than 5.99, reject the Ho
Do not reject the null hypothesis
𝐻=7 −43 𝑛 + 1 10 11 5.5 15
12 𝑅𝑖
σ
𝑛 𝑛+1 𝑛𝑖

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

RANK SUM 51.5 35 33.5


n 5 5 5
See
You!
Thank you for listening!
Do you have any
questions?
Prepared by:
Maria Victrisha M. Lorenzo
SLIDESMANIA.COM

BSED-MATH

You might also like