The Kruskal–Wallis ANOVA test is a non-parametric method used to compare three or more independent groups when the assumptions of normality or equal variances are violated. It ranks all data points and analyzes the differences in rank sums between groups. It is an alternative to one-way ANOVA for ordinal or non-normally distributed data.