Rank all observation in ascending order. Average ranks are assigned to tied scores
Sum up the ranks of observations in each group, to give the ranks sums , for
The Kruskal-Wallis test statistic is computed as: where , i.e. is the total number of observations. If there are tied scores, is corrected by dividing by where is the number of tied scores in a group and the summation is overall tied groups.
The significance level is based on the distribution, with degree of freedom.