17.5.6.2 Algorithms (Kruskal-Wallis ANOVA)
The procedure below draws on NAG algorithms.
- 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 /math-4ef08e127bbc112d645d462efa9f3b5d.png?v=0)
- 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.
For more details of the algorithm, please refer to nag_kruskal_wallis_test (g08afc)