# Kruskal-Wallis and Homogeneity of Variance

## Correct for violating the assumption of homogeneity of variance for ANOVA

The Kruskal-Wallis test is the non-parametric equivalent of an ANOVA (analysis of variance). Kruskal-Wallis is used when researchers are

**comparing three or more independent groups**on a continuous outcome, but the**assumption of homogeneity of variance between the groups is violated in the ANOVA analysis**. The Kruskal-Wallis test is**robust**to violations of this statistical assumption. Researchers will need to report**medians and interquartile ranges**instead of means and standard deviations when using the Kruskal-Wallis test.This figure depicts the use of a Kruskal-Wallis test when homogeneity of variance is violated. The statistical assumptions of independence of observations and normality have been met. There are three or more independent groups being compared in a between-subjects fashion. However, the statistical assumption of homogeneity of variance has been not met. A Kruskal-Wallis test is used when homogeneity of variance is not met for an ANOVA.

### The steps for conducting a Kruskal-Wallis test when homogeneity of variance is not met

1. The data is entered in a between-subjects fashion.

2. Click

3. Drag the cursor over the

4. Drag the cursor over the

5. Click

6. Click on the continuous outcome variable to highlight it.

7. Click on the

8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the

9. Click on the

10. Enter the

11. Enter the

12. Click

13. Click

2. Click

**.**__A__nalyze3. Drag the cursor over the

**drop-down menu.**__N__onparametric Tests4. Drag the cursor over the

**drop-down menu.**__L__egacy Dialogs5. Click

**.**__K__Independent Samples6. Click on the continuous outcome variable to highlight it.

7. Click on the

**arrow**button to move the outcome variable into the**box.**__T__est Variable List:8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the

**box.**__G__rouping Variable:9. Click on the

**button.**__D__efine Range10. Enter the

**categorical value for your independent group that has the smallest value**into the**Mi**box. Example:__n__imum:**"0"**11. Enter the

**categorical value for your independent group that has the largest value**into the**Ma**box. Example:__x__imum:**"2"**12. Click

**Continue**.13. Click

**OK**.### The steps for interpreting the SPSS output for a Kruskal-Wallis test

1. In the

If it is

If the

**Test Statistics**table, look at the*p*-value associated with**Asymp. Sig.**row. This is the*p*-value that is interpreted.If it is

**LESS THAN .05**, then researchers have evidence of a statistically significant difference in the continuous outcome variable between the two independent groups.If the

*p*-value is**MORE THAN .05**, then researchers have evidence that there is**NOT**a statistically significant difference in the continuous outcome variable between the two independent groups.If the

*p*-value is**LESS THAN .05**, subsequent**Mann-Whitney U tests**should be used in a**post hoc**fashion to explain the significant main effect. Significant differences found from the Mann-Whitney U post hoc tests are interpreted in the context of medians and interquartile ranges. This figure depicts post hoc Mann-Whitney U tests after a significant main effect has been found between three groups with Kruskal-Wallis.### The steps for conducting post hoc Mann-Whitney U tests in SPSS

1. The data is entered in a between-subjects fashion.

2. Click

3. Drag the cursor over the

4. Drag the cursor over the

5. Click

6. Click on the continuous outcome variable to highlight it.

7. Click on the

8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the

9. Click on the

10. Enter the

11. Enter the

12. Click

13. Click

2. Click

**.**__A__nalyze3. Drag the cursor over the

**drop-down menu.**__N__onparametric Tests4. Drag the cursor over the

**drop-down menu.**__L__egacy Dialogs5. Click

**.**__2__Independent Samples6. Click on the continuous outcome variable to highlight it.

7. Click on the

**arrow**button to move the outcome variable into the**box.**__T__est Variable List:8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the

**box.**__G__rouping Variable:9. Click on the

**button.**__D__efine Groups10. Enter the

**categorical value for the first independent group**into the**Group**box. Example:__1__:**"0"**11. Enter the

**categorical value for the second independent group**into the**Group**box. Example:__2__:**"1"**12. Click

**Continue**.13. Click

**OK**.### The steps for interpreting the SPSS output for post hoc Mann-Whitney U tests

1. In the

If it is

If the

**Test Statistics**table, look at the*p*-value associated with**Asymp. Sig. (2-tailed)**row. This is the*p*-value that is interpreted.If it is

**LESS THAN .05**, then researchers have evidence of a**statistically significant difference**in the continuous outcome variable between the two independent groups.If the

*p*-value is**MORE THAN .05**, then researchers have evidence that there is**NOT**a statistically significant difference in the continuous outcome variable between the two independent groups.Click on the

**Download Database**and**Download Data Dictionary**buttons for a configured database and data dictionary for a Kruskal-Wallis test.**Click on the****Adjusting for Multiple Comparisons**button to learn more about Bonferroni, Tukey's HSD, and Scheffe's test. Click on the**Validation of Statistical Findings**button to learn more about bootstrap, split-group, and jack-knife validation methods.## Hire A Statistician - Statistical Consulting for Students

**DO YOU NEED TO HIRE A STATISTICIAN?**

Eric Heidel, Ph.D.** **will provide the following statistical consultingservices for undergraduate and graduate students at $50/hour. Secure checkout is available with Stripe or PayPal.

- Statistical Analysis
- Research Design
- Sample Size Calculations
- Diagnostic Testing and Epidemiological Calculations
- Survey Design and Psychometrics