The ANOVA analysis of variance test is a fantastic tool when your data follows the normal distribution. Should your data fall outside of this category, you have the Kruskal-Wallis test.

## Overview: What is Kruskal-Wallis?

The Kruskal-Wallis test is a nonparametric test that is an analog of the one-way analysis of variance. It is utilized when the measurement variable does not meet the assumptions of the ANOVA test or when a comparison is needed for the outcomes of three or more non-identical groups.

## 3 benefits of Kruskal-Wallis

There are some key benefits to the Kruskal-Wallis test:

### 1. Nonparametric

One benefit of the Kruskal-Wallis test is that it is nonparametric, as in data can be pulled from a sample that is not adherent to a specific distribution.

### 2. Multiple groups

With the Kruskal-Wallis test, multiple group samples can be tested together.

### 3. Box-plot comparison

The test has the advantage that the overall levels of samples can be compared with boxplots visually.

## Why is Kruskal-Wallis important to understand?

Understanding a Kruskal-Wallis test is important for the following reasons:

### Applicable to any industry

It is worth understanding the Kruskal-Wallis test in any industry since it is applicable to all whenever there is a need to understand the dependent variable should it have at least three independent groups.

### ANOVA is not always the best option

Understanding how to use the Kruskal-Wallis test is important because you cannot always rely on the ANOVA test. An example would be when the data is skewed.

### Determining if a group originates from the others

Having a working knowledge of the Kruskal-Wallis test provides you with a helpful tool that you can utilize when you need to determine if a group comes from a different origin.

## An industry example of Kruskal-Wallis

A manufacturing company has four different plants. Teams of operators from all four locations are given safety tests in relation to a new machine that will be utilized at all four branches of the company. The hope is that the teaching methods are the same at all locations and that the scores will fall within the same range. Once the scores come in, the Kruskal-Wallis test is utilized, and it is determined that there is likely some variance in testing scores and that there was some differentiation in the teaching method at at least one of the plants.

## 3 best practices when thinking about Kruskal-Wallis

Here are some tips to keep in mind when working with the Kruskal-Wallis test:

### 1. Groups and sample size

The Kruskal-Wallis test is typically used with at least three groups. It can, however, work with only two. There should be a sample size of 5 or more for each group.

### 2. Reject the null hypothesis

Kruskal-Wallis can tell you that at least one group originates from a different distribution if there is a different median, but it is unable to tell you which of the groups are.

### 3. Failure to reject the null hypothesis

If all your groups have the same median, it is safe to say that all groups originate from the same distribution.

### Is Kruskal-Wallis sensitive to outliers?

Since it is a rank-based nonparametric test, Kruskal-Wallis is insensitive to outliers.

### What is a limitation of the Kruskal-Wallis test?

If a researcher does not find a significant difference in data, then they are unable to say the samples are the same.

### What are the assumptions needed for using Kruskal-Wallis test?

The samples are random, they are mutually independent, the variable is continuous, and the scale of measurement is ordinal.

## Having Kruskal-Wallis as one of your tools

Having the Kruskal-Wallis test as part of your toolbox is absolutely essential for when the ANOVA test does not apply. After the Kruskal-Wallis test, you have several options when it comes to posthoc tests. The most common would be the Dunn test, the Pairwise Wilcoxon test, the Conover test, or the Nemenyi test.