You are on page 1of 21

Kruskal-Wallis H Test

Prepared by: Villafranca, Judy Ann G.


Kruskal-Wallis H Test (One-way ANOVA on
Ranks)

-The Kruskal-Wallis H test, named after William Kruskal and


W. Allen Wallis, is a non-parametric method for testing
whether samples originate from the same distribution.

-an extension for the Mann-Whitney U test.

-One way ANOVA: Parametric test and Kruskal-wallis Test:


Non-parametric test.
COMMON USE AND PURPOSE

 The Kruskal-Wallis H test is a rank-based nonparametric test used to


determine if there are statistically significant differences between two
or more groups of an independent variable on a continuous or
ordinal dependent variable
 is used when the assumptions for ANOVA, such as normality, are not
met
Data Requirements
 The data should consist of one independent variable with two
or more groups and a continuous or ordinal dependent
variable
 The dependent variable should be measured at the ordinal or
continuous level
 The data should be independent.
Steps for Manual Computation of the
Kruskal-Wallis H Test
STEPS:
1. Collect data for the independent variable (groups) and the
dependent variable (continuous or ordinal).
2. Rank the data within each group, assigning the lowest rank to
the smallest value.
3. Calculate the sum of ranks for each group.
4. Calculate the overall mean rank.
5. Use the formula to calculate the Kruskal-Wallis
H-statistic:
12 𝑹𝒊 𝟐
H= ∑ − 3(N + 1)
𝑁(𝑁+1) 𝒏𝒊
Where:
H= Kruskal-Wallis Test
n=number of samples/observations in a Group
N= total number of samples/observations
𝑅𝑖 = 𝑅𝑎𝑛𝑘 𝑠𝑢𝑚 𝑓𝑜𝑟 𝑒𝑎𝑐𝑕 𝑔𝑟𝑜𝑢𝑝
12,3 and 1= constants.
Cont..

6. Calculate the p-value for the Kruskal-Wallis


H-statistic.

7. Interpret the Result

8. Report the Analysis


SAMPLE #1

A teacher wants to compare the reading comprehension scores of


students who have been taught using different methods: Traditional
Instruction, Computer-Assisted Instruction, and Blended Learning.
The teacher randomly assigns 10 students for each method. The
reading comprehension scores of the students are shown below:

Traditional Instruction 75, 80, 85, 90, 95


Computer-Assisted Instruction 65, 70, 75, 80, 85
Blended Learning 55, 60, 65, 70, 75
𝐻𝑜 : There is no significant difference in the reading comprehension
scores among students taught using different methods
(Traditional Instruction, Computer−Assisted Instruction, and
Blended Learning).
Ha: There is a significant difference in the reading comprehension
scores among students taught using different methods
(Traditional Instruction, Computer-Assisted Instruction, and
Blended Learning).
Manual Method
STEP 1.
RANK
THE STEP 2. Traditional Computer- Blended
DATA Assign Instruction Assisted Learning
SCORES RANKIN Supposed Ranks
the Instruction
G
1
Ranks
55 1
8 3.5 1
2
60 2
10.5 5.5 2
3
65 3.5
4
12.5 8 3.5
65 3.5
70 5.5 5 14 10.5 5.5
70 5.5 6
15 12.5 8
7
75 8 RAN 60 40 20
75 8 8 K
75 8 9 SUM
10
80 10.5
80 10.5 11
Traditional 75, 80, 85, 90, 95
85 12.5 12 Instruction
85 12.5 13
Computer-Assisted 65, 70, 75, 80, 85
90 14 14
Instruction
15
95 15 Blended Learning 55, 60, 65, 70, 75
STEP 3.
STEP 5.
Find the df
Find the
and Alpha Critical value= 5.991
critical value
level
df=k-1 (k= # of groups)
=3-1
df =2
ɑ=0.05
STEP 6.
State the
STEP 4. Det Decision
the Ho and Rule
If Hcom≥ 𝐻𝑐𝑟𝑖𝑡, 𝑅𝑒𝑗𝑒𝑐𝑡 𝐻𝑜
Ha.

𝑯𝒐 : There is no significant difference in the reading comprehension scores


among students taught using different methods (Traditional
Instruction, Computer−Assisted Instruction, and Blended
Learning).
Ha: There is a significant difference in the reading comprehension scores
among students taught using different methods (Traditional Instruction,
Computer-Assisted Instruction, and Blended Learning).
STEP 7.
Computation
of the H- 12 𝑹𝒊 𝟐
Value H= ∑ − 3(N + 1)
𝑁(𝑁+1) 𝒏𝒊
Traditio Computer- Blended Where:
nal Assisted Learning N= 15 (total sample)
Instruct Instructio n=5(# of sample per group)
ion n R=60, 40, 20 (rank sum per group)

8 3.5 1
10.5 5.5 2
12.5 8 3.5
14 10.5 5.5
15 12.5 8
RANK
SUM
60 40 20
STEP 8.
Analysis and
Interpretation
of Results
Since Hcom= 8 and Hcrit= 5.991; hence,
Hcom>Hcrit
Therefore, we have to reject the Ho.

STEP 9.
Stating the
Conclusions Since the Hcom value of 8 is greater than the critical value of 5.991
at .05 level of significance with 2 degrees of freedom, the Ho is
rejected. This means that there is a significant difference on the
reading comprehension scores among students taught using
different methods (Traditional Instruction, Computer-Assisted
Instruction, and Blended Learning).
Kruskal-Wallis Test in JAMOVI
STEP 1:
EDIT YOUR
VARIABLES
STEP 2:
Input your Data
STEP 7:
Compare the P-
value and your
alpha level

P-value
To determine which
groups are different.
Take note that the alpha value is 0.05.
TI and CAI (p-value=0.210) > 0.05 ∴ Fail to reject the null
hypothesis
TI and BL (p-value=0.032) < 0.05 ∴ Reject Ho
CAI and BL (p-value=0.210) > 0.05 ∴ Fail to reject the null
hypothesis
POST-HOC TESTS
 a general term used to describe statistical procedures
that are conducted after an initial analysis (such as
ANOVA or Kruskal-Wallis) to further explore
pairwise differences among groups.
 Necessary when you reject the null hypothesis and there
are 3 or more groups.
 Purpose: to determine which specific groups differ
significantly from each other after a significant overall
result.
Dwass-Steel-Critchlow-Fligner pairwise
comparisons(DSCF)
 DSCF Pairwise Comparison (Dunn's Test with Sidak
Correction for Multiple Comparisons):
 Assumption: DSCF is used in non-parametric situations, particularly when
you have non-normally distributed data or ordinal data.
 When to Use: Use DSCF pairwise comparisons after the Kruskal-Wallis
test (non-parametric ANOVA) to identify specific pairs of groups that
exhibit significant differences.
References
 Frost, J. (2023). Using Post Hoc Tests with ANOVA. Statistics by
Jim. https://statisticsbyjim.com/anova/post-hoc-tests-anova/
 Kruskal Wallis H Test: Definition, Examples, Assumptions, SPSS - Statistics
How To. (2023, March 3). Statistics How
To. https://www.statisticshowto.com/probability-and-statistics/statistics-
definitions/kruskal-wallis/
 Lani, J. (2021). Kruskal-Wallis test. Statistics
Solutions. https://www.statisticssolutions.com/kruskal-wallis-test/
 Post hoc Definition and Types of Tests - Statistics How to. (2023, March
3). Statistics How To. https://www.statisticshowto.com/probability-and-
statistics/statistics-definitions/post-hoc/
 Xia, Y. (2020). Correlation and association analyses in microbiome study
integrating multiomics in health and disease. In Progress in Molecular Biology and
Translational Science (pp. 309–
491). https://doi.org/10.1016/bs.pmbts.2020.04.003

You might also like