*60*

A Kruskal-Wallis Test is used to determine whether or not there is a statistically significant difference between the medians of three or more independent groups. It is considered to be the non-parametric equivalent of the One-Way ANOVA.

This tutorial explains how to conduct a Kruskal-Wallis Test in Excel.

**Example: Kruskal-Wallis Test in Excel**

Researchers want to know if three different fertilizers lead to different levels of plant growth. They randomly select 30 different plants and split them into three groups of 10, applying a different fertilizer to each group. At the end of one month they measure the height of each plant.

Use the following steps to perform a Kruskal-Wallis Test to determine if the median growth is the same across the three groups.

**Step 1: Enter the data.**

Enter the following data, whichÂ shows the total growth (in inches) for each of the 10 plants in each group:

**Step 2: Rank the data.**

Next, we will use theÂ **RANK.AVG()Â **function to assign a rank to the growth of each plant out of all 30 plants. The following formula shows how to calculate the rank for the first plant in the first group:

Copy this formula to the rest of the cells:

Then, calculate the sum of the ranks for each column along with the sample size and the squared sum of ranks divided by the sample size:

**Step 3: Calculate the test statistic and the corresponding p-value.**

The test statistic is defined as:

H = 12/(n(n+1)) *Â Î£R_{j}^{2}/n_{j}Â â€“ 3(n+1)

where:

- n = total sample size
- R
_{j}^{2}Â =sum of ranks for the j^{th}Â group - n
_{j}Â =sample size of j^{th}Â group

Under the null hypothesis, H follows a Chi-square distribution with k-1 degrees of freedom.

The following screenshot shows the formulas used to calculate the test statistic, H, and the corresponding p-value:

Â

The test statistic is H =Â **6.204Â **and the corresponding p-value is p =Â **0.045**. Since this p-value is less than 0.05,Â we can reject the null hypothesis that the median plant growth is the same for all three fertilizers. We have sufficient evidence to conclude that the type of fertilizer used leads to statistically significant differences in plant growth.

**Step 4: Report the results.**

Lastly, we want to report the results of the Kruskal-Wallis Test. Here is an example of how to do so:

A Kruskal-Wallist Test was performed to determine if median plant growth was the same for three different plant fertilizers. A total of 30 plants were used in the analysis. Each fertilizer was applied to 10 different plants.

Â

The test revealed that the median plant growth was not the same (H = 6.204, p = 0.045) among the three fertilizers. That is, there was a statistically significant difference in median plant growth among two or more of the fertilizers.