Kruskal Wallis test is non parametric version of one way variance of anova. It’s also the extension of Wilcox’s rank sum test for more than 2 populations. Basic idea is very similar to rank sum test. We just sort all observation, and see if mean rank sum is different depending on classes.

In the example below, as p-value = 0.7835 > 0.05, we can not reject , thus we conclude that mean is the same for class a, b, and c.

> kruskal.test(list(a=c(1, 3, 2, 7, 4, 6, 8, 2), b=c(2, 3, 2, 4, 5), c=c(1, 2, 2, 4, 6, 4))) Kruskal-Wallis rank sum test data: list(a = c(1, 3, 2, 7, 4, 6, 8, 2), b = c(2, 3, 2, 4, 5), c = c(1, 2, 2, 4, 6, 4)) Kruskal-Wallis chi-squared = 0.4879, df = 2, p-value = 0.7835

References)

1. 배도선 외, 통계학 이론과 응용, 청문각.

2. 임동훈, R을 이용한 비모수 통계학, 자유아카데미.

3. Wikipedian entry on Kruskal Wallis Test.

## Post a Comment