Exercise 27.22 of PSLS 3e ------------------------- (a) Minitab commands and output: MTB > WOpen "H:\VHM\VHM801\Datasets\Minitab\Chapter 27\ex27_022.mtw". Retrieving worksheet from file: 'H:\VHM\VHM801\Datasets\Minitab\Chapter 27\ex27_022.mtw' Worksheet was saved on 01/11/2014 MTB > Describe 'beetles'; SUBC> By 'color'. Descriptive Statistics: beetles Variable color N N* Mean SE Mean StDev Minimum Q1 Median Q3 Maximum beetles Blue 6 0 14.83 2.18 5.34 7.00 10.00 15.00 20.25 21.00 Green 6 0 31.17 2.57 6.31 20.00 26.75 32.00 37.00 37.00 White 6 0 16.17 1.54 3.76 12.00 12.75 15.50 20.25 21.00 Yellow 6 0 47.17 2.77 6.79 38.00 43.25 46.50 50.75 59.00 Comments: --------- The table of descriptive statistics shows the medians for the 4 groups. As with the means, the color lemon-yellow appears most attractive, followed by green, and finally white and blue seem least and equally attractive. (b) For the ANOVA, the model is that the X_ij follow normal distributions N(mu_i,sigma), and that all observations are independent. H0: mu1=mu2=mu3=mu4 (that is, equal mean no. of insects for the 4 colors), Ha: some colors have higher mean no. of insects than others. The hypothesis tests that the mean number of insects attracted to each of the colors are the same. For the Kruskal-Wallis test, we still assume i.i.d. observations in each group. The Kruskal-Wallis test tests the hypothesis of equal medians (under the additional assumption of equal distribution shapes: the "delta-assumption"), or the hypothesis of equal distributions (without any extra assumptions). (c) In the PSLS notation, we have k=4; n1=n2=n3=n4=6; N=24. (d) Minitab commands and output: MTB > Kruskal-Wallis 'beetles' 'color'. Kruskal-Wallis Test: beetles versus color Kruskal-Wallis Test on beetles color N Median Ave Rank Z Blue 6 15.00 6.3 -2.47 Green 6 32.00 15.0 1.00 White 6 15.50 7.2 -2.13 Yellow 6 46.50 21.5 3.60 Overall 24 12.5 H = 18.45 DF = 3 P = 0.000 H = 18.51 DF = 3 P = 0.000 (adjusted for ties) Comments: --------- The Kruskal-Wallis test is strongly significant (P<0.0005), so we conclude that the 4 distributions are not equal. Also, if we are willing to assume equal distribution shapes, it may be concluded that the medians are different. Additional questions: 1-way ANOVA analysis ------------------- (Note that the 1-way ANOVA analysis is also in Example 24.4 of PSLS.) The table of descriptive statistics shows that the results for the 4 colors differ clearly in their means, but their standard deviations are pretty similar. The IPS/PSLS guideline for equal variances is met: 6.79/3.76 = 1.8. There is some indication that higher standard deviations are associated with higher means, so one could try to transform the data by ln or sqrt. However, because we meet the guideline even with a fairly small sample size, and as will be shown below tests for equal variances are nowhere near significant, it does not seem necessary to transform the data. MTB > VarTest 'beetles' 'color'; SUBC> Confidence 95.0; SUBC> GInterval; SUBC> NoDefault; SUBC> TMethod; SUBC> TBonferroni; SUBC> TTest. Test for Equal Variances: beetles versus color Method Null hypothesis All variances are equal Alternative hypothesis At least one variance is different Significance level a = 0.05 95% Bonferroni Confidence Intervals for Standard Deviations color N StDev CI Blue 6 5.34478 (2.30585, 21.2240) Green 6 6.30608 (1.64163, 41.4995) White 6 3.76386 (1.63904, 14.8073) Yellow 6 6.79461 (1.77430, 44.5760) Individual confidence level = 98.75% Tests Test Method Statistic P-Value Multiple comparisons - 0.732 Levene 0.11 0.955 Test for Equal Variances: beetles vs color Comments: --------- So a normal distribution analysis might be quite acceptable. We could also test for normality within each of the four groups (all non-significant), but because of the small sample sizes we should not attribute too much importance to the results of such normality tests. MTB > OneWay; SUBC> Response 'beetles'; SUBC> Categorical 'color'; SUBC> IType 0; SUBC> GMCI; SUBC> TMTest; SUBC> GIntPlot; SUBC> TMethod; SUBC> TFactor; SUBC> TANOVA; SUBC> TSummary; SUBC> TMeans; SUBC> Nodefault. One-way ANOVA: beetles versus color Method Null hypothesis All means are equal Alternative hypothesis At least one mean is different Significance level a = 0.05 Equal variances were assumed for the analysis. Factor Information Factor Levels Values color 4 Blue, Green, White, Yellow Analysis of Variance Source DF Adj SS Adj MS F-Value P-Value color 3 4134.0 1378.00 42.84 0.000 Error 20 643.3 32.17 Total 23 4777.3 Model Summary S R-sq R-sq(adj) R-sq(pred) 5.67157 86.53% 84.51% 80.61% Means color N Mean StDev 95% CI Blue 6 14.83 5.34 (10.00, 19.66) Green 6 31.17 6.31 (26.34, 36.00) White 6 16.17 3.76 (11.34, 21.00) Yellow 6 47.17 6.79 (42.34, 52.00) Pooled StDev = 5.67157 Interval Plot of beetles vs color Comments -------- The F-statistic is strongly significant. Despite the minor problems with model assumptions it seems reasonable to conclude that the colors do not attract the same number of insects. The figure indicates that yellow seems to be the strongest attractor, followed by green, whereas there is no difference between blue and white. We supplement the figure with two LSD-values, an uncorrected (informal) and a Bonferroni-corrected (4*3/2=6 comparisons) value: LSD (0.95) = tstar * s * sqrt(2/6) = 2.086*5.67157*sqrt(2/6) = 6.8 LSD(1-0.05/6) = LSD(0.9917) = 2.927*5.67157*sqrt(2/6) = 9.6 where the second tstar value was determined from Minitab with p=0.025/6=0.00417 (see below). It is seen that both LSD-values give the same conclusions, namely that those colors separated in the figure are also significantly different. MTB > InvCDF 0.00417; SUBC> T 20. Inverse Cumulative Distribution Function Student's t distribution with 20 DF P( X <= x ) x 0.00417 -2.92676