## Thursday, June 16, 2016

### How To... Perform a Kruskal-Wallis H Test (By Hand) @YouTube #ILoveStats #199

The Kruskal-Wallis H test (sometimes also called the "one-way ANOVA on ranks") is a rank-based nonparametric test that can be 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. When you have more than two samples to compare you would usually attempt to use analysis of variance (ANOVA). However, if the data are not normally distributed (i.e. not parametric) then an alternative must be sought. This is where the Kruskal-Wallis H test comes in.

The formula I use to calculate the H statistic in the video is as follows:

where "n" is the total number of values, "R" is the sum of the ranks for each sample, and "n with an i" is the number in each sample. The key to performing this test is ranking each value from the smallest to the largest. Once this is done the test is straight-forward to complete.