Kruskal-Wallis Calculator

Compare three or more independent groups with the nonparametric Kruskal-Wallis H test

Example Results

1 examples

Compare three independent groups by ranks

Use Kruskal-Wallis when ANOVA normality assumptions are questionable

{
  "result": {
    "hStatistic": 9.5816,
    "degreesOfFreedom": 2,
    "pValue": 0.0083,
    "rejectNull": true
  }
}
View input parameters
{ "groupData": "Control: 8, 9, 6, 7\nA: 12, 10, 11, 13\nB: 14, 15, 13, 16", "alpha": 0.05, "decimalPlaces": 4 }

Key Facts

Category
Math, Date & Finance
Input Types
textarea, number
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

The Kruskal-Wallis Calculator is a statistical tool designed to compare three or more independent groups using a nonparametric rank-based test. It serves as a robust alternative to the one-way ANOVA when data does not meet normality assumptions, allowing researchers to determine if there are statistically significant differences between group medians.

When to Use

  • When comparing three or more independent groups with non-normally distributed data.
  • When your dependent variable is measured on an ordinal scale or contains significant outliers.
  • When the assumption of homogeneity of variance is violated in a standard parametric ANOVA.

How It Works

  • Input your raw data for each group, separating groups by lines and values by commas or spaces.
  • Set your significance level (alpha) and preferred decimal precision for the calculation results.
  • The tool ranks all observations across all groups and calculates the H-statistic based on the sum of ranks.
  • The calculator determines the p-value and indicates whether to reject the null hypothesis based on your alpha.

Use Cases

Comparing customer satisfaction scores across four different retail store locations.
Analyzing the effectiveness of three different medication dosages on patient recovery times.
Evaluating student performance across multiple teaching methods where test scores are skewed.

Examples

1. Evaluating Agricultural Yields

Agricultural Researcher
Background
A researcher is testing three different fertilizers on crop growth across several plots.
Problem
The growth data is not normally distributed, making a standard ANOVA unreliable for comparing the fertilizers.
How to Use
Enter the yield data for Fertilizer A, B, and C into the Group Data field and set alpha to 0.05.
Example Config
Fertilizer A: 20, 22, 19
Fertilizer B: 30, 35, 32
Fertilizer C: 25, 27, 24
Outcome
The tool generates an H-statistic and p-value to confirm if fertilizer type significantly impacts crop yield.

2. Website Usability Testing

UX Designer
Background
A designer wants to compare the time spent on a specific task across three different UI layouts.
Problem
The time data contains extreme outliers that would skew a parametric mean-based test.
How to Use
Input the task completion times for Layout 1, Layout 2, and Layout 3 into the calculator and run the test.
Example Config
Layout 1: 45, 50, 120
Layout 2: 30, 35, 40
Layout 3: 55, 60, 65
Outcome
The calculator provides a p-value to determine if the layout choice significantly affects user efficiency based on ranks.

Try with Samples

math-&-numbers

FAQ

What is the null hypothesis for the Kruskal-Wallis test?

The null hypothesis states that the population medians of all groups are equal.

How many groups can I compare with this tool?

You can compare three or more independent groups; for exactly two groups, the Mann-Whitney U test is typically used.

Does this tool perform post-hoc testing?

No, this tool calculates the H-statistic and p-value for the overall group comparison only.

What does a 'Reject Null: True' result mean?

It indicates that there is a statistically significant difference between at least two of the groups at your chosen alpha level.

Can I use this for paired or dependent data?

No, the Kruskal-Wallis test is specifically designed for independent samples. For paired data, use the Friedman test.

API Documentation

Request Endpoint

POST /en/api/tools/kruskal-wallis-calculator

Request Parameters

Parameter Name Type Required Description
groupData textarea No -
alpha number No -
decimalPlaces number No -

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-kruskal-wallis-calculator": {
      "name": "kruskal-wallis-calculator",
      "description": "Compare three or more independent groups with the nonparametric Kruskal-Wallis H test",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=kruskal-wallis-calculator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]