130 likes | 310 Vues
STAT 3120 Statistical Methods I. Lecture Notes 7 Non Parametric Alternative to ANOVA – Kruskal Wallis. Testing for Relationships Among Variables. Testing for Relationships Among Variables. Kruskal-Wallis Test.
E N D
STAT 3120 Statistical Methods I Lecture Notes 7 Non Parametric Alternative to ANOVA – Kruskal Wallis
Kruskal-Wallis Test Prior to executing an ANOVA, we should test the distribution of each group. If the groups are not normal or there are less than 10 in each group, a non- parametric alternative should be used – the Kruskal-Wallis Test.
Kruskal-Wallis Test As with the Wilcoxon Rank Sum test, we are testing to determine if the distributions are identical or if one (or more) of the distributions are shifted to the right or to the left. The Hypothesis statements are: Ho: All of the distributions are identical Ha: At least one of the distributions is different
Kruskal-Wallis Test The test statistic for the K-W test is the H-stat. The result of this statistic is compared to a Χ2 statistic – which can be found in Table 7 of your book.
Kruskal-Wallis Test The H statistic is calculated as: H=12/(nT*(nT+1)Σ(Ti2/ni)-3(nT+1) Where, nT = the total number of obs in the sample ni= the number of obs in group i Ti = the sum of the ranks in group i
Kruskal-Wallis Test Lets do Exercise # 8.6 as a K-W test. A team of researchers wants to compare the yields of five different varieties of orange trees in a single orchard. They obtain a random sample of 7 trees from each variety.
Kruskal-Wallis Test Step One: Determine the Hypothesis Statements and the testing matrix. Ho: All of the varieties have the same distribution (and the same median yield) Ha: At least one of the varieties is different
Kruskal-Wallis Test Step Two: Determine the Critical Value for testing. We have 5 groups, which translates into k-1 or 5-1 = 4 degrees of freedom. The problem requests that the test is run at alpha = .01. From Table 7 on Page 1101, we can see that the Χ2 Statistic is 13.28. Therefore, if the calculated H-stat is greater than 13.28, we will reject the Null Hypothesis and conclude that at least one of the distributions is different from the others.
Kruskal-Wallis Test Step Three: Determine the Calculated H- Statistic. Σ
Kruskal-Wallis Test Step Three: Determine the Calculated H- Statistic. H=(12/(35*36))*(((81.5)2/7)+((149.5)2/7)+((187.5)2/7)+((95.5)2/7)+((116)2/7)))-(3*(35+1)) H=9.97. Since the Calculated statistic of 9.97 is less than the critical statistic of 13.28, we would fail to reject the Null Hypothesis. In other words, we cannot conclude that any of the distributions are different.
Kruskal-Wallis Test The same SAS Code that we used for the Wilcoxon Signed Rank Test can be used for the KW test: Proc Npar1way wilcoxon data=KW; Class Group; Var Score; Run; Note that the term “wilcoxon” is really synonymous with non-parametric.