Wróć do słownika

Kruskal-Wallis test

The Kruskal-Wallis test is a nonparametric method for comparing three or more independent groups when the assumptions required by conventional analysis of variance are not met. Often described as nonparametric ANOVA, it assesses whether the groups differ in the distribution or typical level of an ordinal or continuous outcome.

In market research, the test is particularly useful when survey ratings are skewed, based on ordinal scales, or affected by outliers. When groups have unequal variability, it can be used to assess distributional differences, but a significant result should not be interpreted solely as a difference in typical level. It indicates whether an observed difference between segments is unlikely to result from random sampling variation.

What is Kruskal-Wallis test?

The Kruskal-Wallis test is a rank-based statistical test used to compare an outcome across three or more independent groups. It was developed by William Kruskal and W. Allen Wallis as an extension of the Mann-Whitney U test, which compares two independent groups. Its purpose is to test the null hypothesis that all groups originate from the same distribution.

Unlike parametric analysis of variance, the Kruskal-Wallis test does not compare group means directly. Instead, it replaces observed values with ranks calculated across the full dataset. It then examines whether the ranks assigned to observations in particular groups are systematically higher or lower than those in other groups. If one segment consistently receives higher ranks, this may indicate higher satisfaction, stronger purchase intent, greater willingness to pay, or another relatively higher measured outcome.

The test is most commonly applied when the dependent variable is:

  • ordinal, such as agreement measured on a Likert-type scale;
  • continuous but clearly non-normally distributed;
  • affected by extreme values that would distort mean-based comparisons;
  • measured independently across respondent groups.


For interpretation focused on differences in central tendency, the compared group distributions should have a broadly similar shape and spread. When distribution shapes differ substantially, a statistically significant result may reflect broader differences in distribution rather than only differences in medians. Therefore, the Kruskal-Wallis test should be interpreted together with descriptive statistics, distribution plots, and the research context.

In survey analytics, the method does not establish why groups differ. It only provides evidence on whether the observed differences are statistically meaningful at the selected significance threshold. Explanation usually requires additional analysis, such as demographic profiling, open-ended response coding, regression modelling, or qualitative interviews.

Application of Kruskal-Wallis test in practice

The Kruskal-Wallis test is used in quantitative market research when researchers need to compare independent customer, consumer, employee, or business respondent groups without relying on the strict assumptions of parametric methods. It is especially valuable in studies where rating scales produce clustered responses, ceiling effects, or asymmetric distributions.

Typical applications include the following situations:

  • comparing brand satisfaction ratings across customer segments;
  • testing whether purchase intention differs between age groups, regions, or income categories;
  • evaluating perceived ease of use of a digital service among user groups with different levels of experience;
  • comparing willingness to recommend across product users, former users, and people who have not yet purchased;
  • assessing differences in retailer evaluations across store formats or geographic markets;
  • analysing B2B decision-maker assessments across company sizes, industries, or procurement roles.


For example, a retail brand may examine whether satisfaction with delivery differs among customers using several fulfilment options. If satisfaction is measured on an ordered response scale and the distributions are not suitable for standard ANOVA, the Kruskal-Wallis test can assess whether at least one delivery group differs from the others. This provides a statistically grounded basis for identifying areas that require closer operational or customer experience review.

The test is also applicable in mixed-methods projects. Quantitative findings from a Kruskal-Wallis test can identify segments with significantly different evaluations, while qualitative interviews or open-ended survey responses can help explain the reasons behind those differences. This sequence is useful when a research team needs both evidence of variation and insight into the mechanisms driving it.

A significant overall result does not identify which specific groups differ. Therefore, the Kruskal-Wallis test is normally followed by post hoc comparisons. Common options include Dunn’s test or Conover-type comparisons, combined with an adjustment for multiple testing. Such adjustment is necessary because testing many group pairs increases the risk of incorrectly identifying a difference as statistically significant.

Kruskal-Wallis test and related methods

The Kruskal-Wallis test belongs to a wider group of nonparametric methods designed for data that do not meet the assumptions of standard parametric procedures. Its selection should depend on the measurement scale, the number of groups, whether observations are independent, and the specific research question.

The most frequent comparison is Kruskal-Wallis vs ANOVA. Standard one-way ANOVA compares mean values across independent groups and is generally appropriate when the outcome is continuous, residuals are sufficiently close to normality, and variance patterns do not seriously violate model assumptions. The Kruskal-Wallis test compares ranks rather than means and is usually preferred for ordinal data or heavily non-normal outcomes.

Neither method is automatically superior. ANOVA can offer more informative estimates of mean differences and supports a broad range of extensions when its assumptions are reasonably met. The Kruskal-Wallis test is more robust to departures from normality and to some effects of outliers, but it provides less direct information about the size and practical meaning of group differences. In both cases, statistical significance should be supplemented with effect size measures and descriptive results.

Other related methods include:

  • Mann-Whitney U test – a nonparametric test for comparing two independent groups;
  • Friedman test – a nonparametric alternative for comparing repeated measurements or related groups;
  • Welch’s ANOVA – a parametric alternative when group variances are unequal but mean comparisons remain appropriate;
  • ordinal regression – a modelling approach used when an ordinal outcome needs to be explained by several predictors simultaneously.


In segmentation studies, the Kruskal-Wallis test is often used after creating groups through demographic variables, behavioural classification, cluster analysis, or customer journey stages. It can verify whether segments differ on key brand or experience indicators. However, it should not be used as evidence that the segmentation itself is valid. Segment quality requires separate assessment based on interpretability, stability, distinctiveness, and business usefulness.

Limitations and interpretation of the Kruskal-Wallis test

The Kruskal-Wallis test requires independent observations. A respondent should not appear in more than one compared group, and repeated assessments from the same person should not be treated as independent records. When measurements are repeated within the same respondents, a method such as the Friedman test is more appropriate.

The test also does not account for confounding variables. If satisfaction differs by region, the difference may partly result from customer tenure, product type, service channel, or respondent profile. Where several factors may influence the outcome, regression-based analysis or a more structured experimental design may be needed.

Finally, statistical significance should not be treated as a business decision by itself. A result can be statistically significant while having limited practical importance. Interpretation should consider the direction of differences, group-level medians or rank patterns, sample structure, effect size, and the implications for the marketing, product, pricing, or customer experience decision under review.