A Kruskal-Wallis test indicates whether a numeric column’s values tend to differ in size across three or more categories. If the values are drawn from distributions having the same shape but different locations across categories, the Kruskal-Wallis test can be interpreted as a test of whether the group medians are equal. It is an extension of the Mann-Whitney test (which applies to only two categories).
To perform a Kruskal-Wallis test:
Note that even if the observed medians are equal across categories, the Kruskal-Wallis test can indicate that the population medians are not equal. This is most likely due to the distribution of values differing across categories.
See also: