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 Analyze.
3. Drag the cursor over the Nonparametric Tests drop-down menu.
4. Drag the cursor over the Legacy Dialogs drop-down menu.
5. Click K Independent Samples.
6. Click on the continuous outcome variable to highlight it.
7. Click on the arrow button to move the outcome variable into the Test Variable List: box.
8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the Grouping Variable: box.
9. Click on the Define Range button.
10. Enter the categorical value for your independent group that has the smallest value into the Minimum: box. Example: "0"
11. Enter the categorical value for your independent group that has the largest value into the Maximum: box. Example: "2"
12. Click Continue.
13. Click OK.
2. Click Analyze.
3. Drag the cursor over the Nonparametric Tests drop-down menu.
4. Drag the cursor over the Legacy Dialogs drop-down menu.
5. Click K Independent Samples.
6. Click on the continuous outcome variable to highlight it.
7. Click on the arrow button to move the outcome variable into the Test Variable List: box.
8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the Grouping Variable: box.
9. Click on the Define Range button.
10. Enter the categorical value for your independent group that has the smallest value into the Minimum: box. Example: "0"
11. Enter the categorical value for your independent group that has the largest value into the Maximum: box. Example: "2"
12. Click Continue.
13. Click OK.
The steps for interpreting the SPSS output for a Kruskal-Wallis test
1. In 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 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 Analyze.
3. Drag the cursor over the Nonparametric Tests drop-down menu.
4. Drag the cursor over the Legacy Dialogs drop-down menu.
5. Click 2 Independent Samples.
6. Click on the continuous outcome variable to highlight it.
7. Click on the arrow button to move the outcome variable into the Test Variable List: box.
8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the Grouping Variable: box.
9. Click on the Define Groups button.
10. Enter the categorical value for the first independent group into the Group 1: box. Example: "0"
11. Enter the categorical value for the second independent group into the Group 2: box. Example: "1"
12. Click Continue.
13. Click OK.
2. Click Analyze.
3. Drag the cursor over the Nonparametric Tests drop-down menu.
4. Drag the cursor over the Legacy Dialogs drop-down menu.
5. Click 2 Independent Samples.
6. Click on the continuous outcome variable to highlight it.
7. Click on the arrow button to move the outcome variable into the Test Variable List: box.
8. Click on the "grouping" variable, click on the arrow to move the "grouping" variable into the Grouping Variable: box.
9. Click on the Define Groups button.
10. Enter the categorical value for the first independent group into the Group 1: box. Example: "0"
11. Enter the categorical value for the second independent group into the Group 2: box. Example: "1"
12. Click Continue.
13. Click OK.
The steps for interpreting the SPSS output for post hoc Mann-Whitney U tests
1. In 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.
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
DO YOU NEED TO HIRE A STATISTICIAN?
Eric Heidel, Ph.D., PStat will provide you with statistical consultation services for your research project at $100/hour. Secure checkout is available with Stripe, Venmo, Zelle, or PayPal.
- Statistical Analysis on any kind of project
- Dissertation and Thesis Projects
- DNP Capstone Projects
- Clinical Trials
- Analysis of Survey Data