13.14
De Kruskal-Wallis-test, ook bekend als de Kruskal-Wallis H-test, dient als een niet-parametrisch alternatief voor de eenrichtings-ANOVA en biedt een o…
The Kruskal-Wallis, or H test, is a non-parametric alternative to one-way ANOVA. It effectively tests the null hypothesis that three or more populations have identical medians.
Consider the dataset on a supermarket's red, green, and black grapes sales.
How can one determine if the three samples originate from populations with the same median sales?
For testing this claim, all samples are initially merged to assign ranks. Then, the sum of ranks for each sample is calculated independently.
The test statistic, H, is derived using a formula that quantifies the variance among the rank sums.
In this scenario, the H value follows the chi-square distribution, with the degrees of freedom being one less than the total number of samples, which is two.
At this level of degrees of freedom, the critical value is determined from its corresponding table at a chosen significance level, such as 0.05.
Given that the calculated H value is lower than the critical value, the null hypothesis, suggesting that the samples come from populations with equivalent medians, cannot be rejected.
View the full transcript and gain access to JoVE Core videos
Q1: What is the Kruskal-Wallis test used for?
The Kruskal-Wallis test, or H test, is a nonparametric alternative to one-way ANOVA that tests whether three or more independent groups have identical medians. It's particularly valuable when data doesn't meet the normal distribution assumption required by parametric tests, making it ideal for ordinal data or when variances across groups are unequal.
Q2: How does the Kruskal-Wallis test calculate its test statistic?
The test merges all samples and assigns ranks to each data point across the entire dataset. The sum of ranks for each sample is calculated independently, then used in a formula to derive the H statistic, which quantifies variance among rank sums. This H value follows the chi-square distribution with degrees of freedom equal to one less than the number of groups.
Q3: What are the key assumptions of the Kruskal-Wallis test?
The Kruskal-Wallis test requires independent observations, identical distribution shapes and scales across groups, and ordinal or continuous data. Unlike parametric tests such as one-way ANOVA, it doesn't assume normal distribution or equal variances, making it more robust for non-normally distributed datasets and reducing the impact of outliers.
Q4: When should you use the Kruskal-Wallis test instead of ANOVA?
Use the Kruskal-Wallis test when comparing medians across three or more groups with non-normal data, unequal variances, or ordinal measurements. It's advantageous in psychology for comparing therapeutic approaches, in medicine for evaluating non-normally distributed treatment outcomes, and in environmental science for comparing ecological measurements across different sites.
Q5: How do you interpret the Kruskal-Wallis test results?
Compare the calculated H statistic to the critical value from the chi-square distribution table at your chosen significance level, such as 0.05. If H is lower than the critical value, you cannot reject the null hypothesis that samples originate from populations with equivalent medians. If H exceeds the critical value, reject the null hypothesis.
Q6: Why does the Kruskal-Wallis test focus on ranks instead of means?
By using ranks rather than actual data values, the Kruskal-Wallis test reduces the impact of outliers and extreme values that could distort parametric analyses. This rank-based approach makes the test robust against non-normal distribution shapes and violations of homogeneity assumptions, providing valid conclusions even when data doesn't conform to traditional statistical requirements.
Q7: What is the relationship between the Kruskal-Wallis test and other nonparametric tests?
The Kruskal-Wallis test is part of a broader family of nonparametric methods used when parametric assumptions fail. For paired or matched data, the friedman two way analysis of variance by ranks serves as an alternative. These tests collectively provide researchers with flexible tools for analyzing diverse data types without stringent distributional assumptions.