> For the complete documentation index, see [llms.txt](https://docs.predicteasy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.predicteasy.com/statistical-test/kruskal-wallis-h-test.md).

# Kruskal-Wallis H Test

**Use:** The Kruskal-Wallis test is a non-parametric method used to determine if there are statistically significant differences between three or more independent groups. It's suitable for <mark style="color:green;">**non-normally distributed data or ordinal data.**</mark>

**Example:** Assessing whether there is a difference in pain relief among three different painkillers in a clinical trial.

<figure><img src="/files/jTCqZs4kWhFHKOVmSZ3J" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Column Requirement:** Continuous data for the response variable and a categorical variable for groups.
{% endhint %}

**Steps:**

1. Select a continuous variable (e.g., scores) and a categorical variable (e.g., treatments).
2. Check for assumptions such as independence and ordinal data.
3. Perform the Kruskal-Wallis test to compare medians.
4. Evaluate the p-value. A low p-value indicates significant differences between groups.
5. Conduct post-hoc tests for pairwise comparisons if the Kruskal-Wallis test is significant.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.predicteasy.com/statistical-test/kruskal-wallis-h-test.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
