Nonparametric Statistics: One-Way ANOVA Kruskal-Wallis Test for Completely Randomized Design Purpose: for comparing C distributions. Assumptions: C independent random samples from C continuous distributions Hypothesis: Ho : The distribution for all C populations are all the same Ha : At least two the population distributions differ in location. 2 Test statistic: H 12 C R j 12 C 3 ( n 1 ) n j (R j R )2 n(n 1) J 1 n j n(n 1) J 1 For large samples (nj > 5), H ~ with (C – 1) d.f. For small samples, use Kruskal-Wallis table. where nj = number of measurement in sample j Rj = rank sum for sample j (Use overall ranking) n = total sample size Decision Rule: Reject Ho if H > or p-value < Example: The birth weight of an infant has been hypothesized to be associated with the smoking status of the mother during the first trimester of pregnancy. The mothers are divided into four groups according to smoking habit, and the sample of birth weights in pounds within each group is given as follow: Group 1: (Mother is a nonsmoker) Weight 7.5 6.9 7.4 9.2 8.3 7.6 Rank 19 14 18 24 23 20 118 Group 2: (Mother is an ex-smoker but not during the pregnancy) Weight 5.8 7.1 8.2 7.1 7.8 Rank 6 15.5 22 15.5 21 80 Group 3: (Mother is a current smoker and smoke less than 1 pack per day) Weight 5.9 6.2 5.8 4.7 7.2 6.2 Rank 8 10.5 6 1 17 10.5 53 Group 4: (Mother is a current smoker and smoke more than 1 pack per day) Weight 6.2 6.8 5.7 4.9 6.2 5.8 5.4 Rank 10.5 13 4 2 10.5 6 3 49 Ho : The weight distribution for all four populations are all the same Ha : At least two the population distributions differ in location. H = {12/[24(24+1)]}{1182 /6 + 802/5 + 532/6 + 492/7 } 3(24 + 1) = 13.24 => p-value < 0.01 (Chi -square table with d.f.: 4 1= 3) Reject Ho. A. Chang 1 Nonparametric Statistics: One-Way ANOVA Example(Small Samples): The effects of two drugs on reaction time to a certain stimulus were studies in three samples of experimental animals. Sample III served as a control while the animals in sample I were treated with drug A and those in sample II were treated with drug B prior to the application of the stimulus. Reaction Time in Seconds of 13 Experimental Animals Sample I II III 17 8 2 20 7 5 40 9 4 31 8 3 35 Can we conclude that the three populations represented by the three samples differ with respect to reaction time? Data Replaced by Ranks Sample I II III 9 6.5 1 10 5 4 13 8 3 11 6.5 2 12 Ho : The population centers are all equal Ha : At least one the populations tends to exhibit larger values than at least one of the other populations. H = {12/[13(13+1)]}{552 /5 + 262/4 + 102/4 } 3(13 + 1) = 10.68 K-W table => p-value < 0.01 A. Chang 2