# 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="https://2063668468-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9RcwqzNNsjo496JLJ2Ob%2Fuploads%2FtVL0ZR3dQt6wDnko2tHZ%2Fimage.png?alt=media&#x26;token=f7fb7038-d48a-4104-8dfb-468610ffd925" 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.
