Opens in a new tab

STATISTICAL METHOD

Kruskal-Wallis Test Analysis
Statistical Consulting for Rank-Based Group Comparisons

We apply the Kruskal-Wallis test within your study design, stating what the rank comparison does and does not show, following a significant result with adjusted Dunn comparisons, and reporting epsilon squared in publication-ready form.

No Commitment Required

Strictly Confidential

In-House PhD-Level Statisticians

Fixed Project Fee

Same-Day Response

METHOD OVERVIEW

What Is the Kruskal-Wallis Test?

The Kruskal-Wallis test is a nonparametric one-way ANOVA alternative that compares an outcome across three or more independent groups using ranks, extending the Mann-Whitney U test beyond two groups. All observations are ranked together, and the test asks whether the groups’ rank distributions differ, meaning that values in one group tend to be larger than in another. It suits ordinal outcomes, and continuous outcomes when the normality or equal-variance assumptions of one-way ANOVA are not tenable, and it is read as a comparison of medians only when the groups have similar distribution shapes. Epsilon squared expresses the magnitude, and a significant result is followed by adjusted pairwise comparisons. OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, provides Kruskal-Wallis test analysis within your study design, with the relevant checks, effect estimates, uncertainty measures, interpretation and publication-ready reporting.

WHEN TO ENGAGE

When Is the Kruskal-Wallis Test Appropriate?

The Kruskal-Wallis test fits an ordinal or awkwardly distributed outcome across three or more independent groups, and these are the situations in which researchers most often ask us to apply it.

Graded Severity Across Arms Patients in three or more treatment arms are scored on a severity grade or disability scale, and ranking the grades is more defensible than averaging them.

Skewed Outcomes Across Sites Length of stay, recovery time or cost is compared across several hospitals or programs, and a few extreme cases would dominate any comparison of means.

Small or Unequal Groups Some groups are small or badly unbalanced, such as a rare diagnosis compared with common ones, and the comparison still has to be reported.

Reviewing a Completed Analysis A Kruskal-Wallis result was reported as a test of medians, or pairwise tests were left uncorrected, and a reviewer objected. Independent Statistical Review examines the conclusions.

ANALYTICAL APPROACH

How We Apply the Kruskal-Wallis Test

Within the family of Comparative & Hypothesis Testing, the Kruskal-Wallis test is chosen only after the grouping, the outcome scale and the group distributions have been examined.

Independent Groups and Design We confirm that each participant belongs to one group and contributes one observation. Repeated measurements on the same people need a different test, and clustered data need a model that handles the dependence.

What the Test Addresses The test compares rank distributions, not medians, unless the group shapes are similar. We examine the shapes first, then word the hypothesis to match, before any group is called higher in median.

Dunn Post Hoc Comparisons A significant result does not say which groups differ. We apply Dunn's post hoc test on the same ranks, with a Holm or Bonferroni adjustment, and report adjusted p-values for each pair.

Ties and Magnitude We use the tie-corrected statistic, note very unequal group sizes, and report epsilon squared with a bootstrap interval alongside group medians, so readers see how far the distributions separate.

DELIVERABLES

What You Receive

As part of our Quantitative Data Analysis service, the rank-based group comparison is delivered with the estimates, checks and files needed to report and defend it.

Data & Variable Review Group coding, the independence of observations, unequal group sizes, missing data and tied values are reviewed, and any repeated or clustered records are resolved before testing.

Method-Specific Checks Group distributions are compared through plots to see whether shapes are similar, and a Welch ANOVA or an ordinal model is run as a sensitivity analysis where the data permit.

Statistical Results Medians and interquartile ranges by group, the Kruskal-Wallis H with degrees of freedom, epsilon squared with its interval, and Dunn's pairwise comparisons with adjusted p-values.

Publication-Ready Tables & Figures Group summary tables, box or violin plots and the adjusted pairwise results, formatted to APA 7, STROBE or the journal's requirements, ready to insert.

Interpretation The Kruskal-Wallis interpretation is written as a difference in rank distributions, with medians described only where shapes allow, and with the multiplicity decisions stated.

Reproducible Analysis Files Syntax or scripts in SPSS, R or Stata, provided where applicable, show each step from ranking to adjusted comparisons and can be rerun if the data change.

ALTERNATIVE METHODS

When Another Method May Be More Appropriate

We choose the method by design and outcome type. The Kruskal-Wallis test compares independent groups on ranks, and these methods fit other questions or data structures.

01
One-Way ANOVA

When the outcome is continuous and mean differences are the scientific question, the Welch version handles unequal variances and estimates differences with intervals.

02
Ordinal Regression

When an ordinal outcome needs covariate adjustment or effects as odds ratios, a proportional odds model goes beyond a comparison of ranks across groups.

03
Friedman Test

When the same participants are measured under three or more conditions, the observations are dependent, and the rank-based test is Friedman, not Kruskal-Wallis.

04
Mann-Whitney U Test

With only two independent groups, the rank comparison is Mann-Whitney, which the Kruskal-Wallis test reduces to, and it offers a probability of superiority.

CASE EXAMPLE

How We Work in Practice

An illustration of how a multi-group rank comparison moves from a planned test to a reportable, defensible result.

ILLUSTRATIVE EXAMPLE · SOCIAL SERVICES POLICY RESEARCH · UNITED STATES

A state agency's policy analysis unit wanted to compare application processing times across three regional offices before deciding where to direct staffing support.

Processing times are typically right-skewed, with a few very long cases, and the offices differed in caseload, so before the processing times were examined we specified the Kruskal-Wallis test as primary and a Welch ANOVA on log times as a sensitivity analysis. Plots showed similar shapes across the three offices, so differences could be described as shifts in typical processing time, with a note that this reading rested on the plots. Times were recorded in whole days, producing many ties, which the corrected statistic handled. Dunn’s post hoc test with a Holm adjustment compared each pair of offices, and epsilon squared with a bootstrap interval described the magnitude.

Outcome: The unit received group medians with interquartile ranges, the tie-corrected Kruskal-Wallis statistic, epsilon squared with its bootstrap 95% confidence interval, Holm-adjusted Dunn comparisons, the log-time sensitivity result, tables and the analysis syntax.

View Case Examples

This example does not describe a real client or project. We never share details of actual client work, in line with the confidentiality we promise every researcher. This illustrative example is included to show the type, scope, and standard of work involved in this kind of analysis.

SOFTWARE

Statistical Software for Rank-Based Group Tests

Kruskal-Wallis tests and Dunn comparisons are run in the statistical software researchers already use, with syntax or scripts provided where applicable.

RESEARCH DISCIPLINES

Rank-Based Group Comparisons Across Research Fields

The Kruskal-Wallis test appears wherever several groups are compared on ordinal or skewed outcomes, each field with its own measures and reporting conventions.

Explore Research Disciplines
HOW IT WORKS

A Defined Process for Your Analysis

We review your dataset, research question and design before any work begins, so the scope, deliverables, timeline and fixed project fee are clear from the outset.

01

Share Your Research Materials

Send your dataset, research question, study design and any existing analysis plan or output. We will let you know if anything else is needed to assess the project.

02

Receive Your Assessment

Your statistically trained Research Coordinator reviews the project and confirms the required analysis, deliverables, timeline and fixed project price before work begins.

03

Analysis & Delivery

Once you confirm the scope, an in-house statistician completes the agreed analysis and delivers the outputs, interpretation and reporting files.

See the Full Process

RESEARCHER VOICE

What Researchers Say

Feedback from a researcher who wanted a second review of multiple comparisons and a result that was easy to explain to the team.

“I wanted a second set of statistical eyes on our Kruskal-Wallis Test, mainly because of how to handle multiple comparisons without inflating false positives. The review was practical and specific, and the final results were much easier to explain to the rest of the research team. The final output was concise, clearly interpreted, and ready to use in our research reporting.”

Independent reviews

4.5/5.0

Excellent rating

Read All Reviews

RESEARCH RESPONSIBILITY

Statistical Support Without Taking Over Your Research

We provide the statistical work for your group comparison, and the study, its meaning and its authorship stay entirely with you.

Agreed Statistical Support We provide the agreed methodological, analytical and statistical reporting support for your rank-based group comparison, within the scope confirmed before work begins.

No Intellectual Contribution OnlineSPSS claims no intellectual contribution to your research. Our work is statistical support, and authorship remains yours.

Your Research Decisions The research question, the definition of the groups, interpretation and conclusions remain with you, and our statistical interpretation stays within what the ranks and the design support.

Confidential Handling Research data and project details are handled confidentially and are not published. An NDA is available where required, and can be arranged before sensitive materials are shared.

FREQUENTLY ASKED QUESTIONS

Questions About the Kruskal-Wallis Test

Short answers to what researchers ask before a rank-based group comparison, from medians and post hoc tests to confidentiality and the assessment process.

Not in general. The test addresses whether the groups’ rank distributions differ, that is, whether observations from one group tend to be larger than those from another. It describes a difference in medians only when the distributions have similar shapes and spreads, and equal medians can still produce a significant result. We examine the shapes and word the hypothesis and the conclusion to match.

The omnibus test does not say which groups differ, so pairwise follow-up is needed. Dunn’s test is the usual choice because it uses the same ranks as the omnibus test, and its p-values are adjusted, for example by Holm or Bonferroni, for the number of comparisons. Pairwise Mann-Whitney tests rank each pair separately and can be used with an adjustment, but we state which approach is reported.

It depends on the outcome and the question, not on a single normality test. Kruskal-Wallis fits an ordinal outcome, or a continuous one whose distribution makes means a poor summary, while a Welch ANOVA, which tolerates unequal variances, fits a continuous outcome when differences in means are the question. The two answer different hypotheses, so the choice is stated in the methods.

Yes, we can review a completed Kruskal-Wallis analysis before submission or a response to reviewers. We check the independence of the groups, how ties and unequal sizes were handled, the post hoc adjustment, whether medians were described correctly, the effect size and the reporting, and confirm what stands or needs to change.

Your dataset, output files and any protocol or analysis plan are handled confidentially, and project information is not published. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.

You share your research question, design and relevant materials, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are then confirmed before any work begins, so the timeline follows from the agreed scope.

Still have a question? Find more answers in our full FAQ.

View All FAQs →

NEXT STEP

Need Support With a
Kruskal-Wallis Test?

Share your research question, study design and data. We assess whether the test fits your group comparison and confirm the approach before any work begins.

No Commitment Required

Strictly Confidential

Fixed Project Fee

In-House PhD-Level Statisticians

Same-Day Response

Serving Researchers Since 2014