Conducting ANOVA’s Conducting ANOVA’s I. Why? A. more than two groups to compare Conducting ANOVA’s I. Why? A. more than two groups to compare What’s the prob? D. putrida low density D. putrida high density D. putrida with D. tripuncatata Conducting ANOVA’s I. Why? A. more than two groups to compare What’s the prob? D. putrida low density D. putrida high density D. putrida with D. tripuncatata What was our solution? Conducting ANOVA’s I. Why? A. more than two groups to compare What’s the prob? D. putrida low density U D. putrida high density D. putrida with D. tripuncatata What was our solution? U U What’s the prob? D. putrida low density U D. putrida high density D. putrida with D. tripuncatata U U Tested each contrast at p = 0.05 Probability of being correct in rejecting each Ho: 1 0.95 2 0.95 3 0.95 What’s the prob? D. putrida low density U D. putrida high density D. putrida with D. tripuncatata U U Tested each contrast at p = 0.05 Probability of being correct in rejecting all Ho: 1 2 3 0.95 x 0.95 x 0.95 = 0.86 So, Type I error rate has increased from 0.05 to 0.14 Probability of being correct in rejecting all Ho: 1 2 3 0.95 x 0.95 x 0.95 = 0.86 So, Type I error rate has increased from 0.05 to 0.14 Hmmmm….. What can we do to maintain a 0.05 level across all contrasts? Probability of being correct in rejecting all Ho: 1 2 3 0.95 x 0.95 x 0.95 = 0.86 So, Type I error rate has increased from 0.05 to 0.14 Hmmmm….. What can we do to maintain a 0.05 level across all contrasts? Right. Adjust the comparison-wise error rate. Probability of being correct in rejecting all Ho: 1 2 3 0.95 x 0.95 x 0.95 = 0.86 So, Type I error rate has increased from 0.05 to 0.14 Simplest: Bonferroni correction: Comparison-wise p = experiment-wise p/n Where n = number of contrasts. Experient-wise = 0.05 Comparison-wise = 0.05/3 = 0.0167 Probability of being correct in rejecting all Ho: 1 2 3 0.95 x 0.95 x 0.95 = 0.86 So, Type I error rate has increased from 0.05 to 0.14 Simplest: Bonferroni correction: Comparison-wise p = experiment-wise p/n Where n = number of contrasts. Experient-wise = 0.05 Comparison-wise = 0.05/3 = 0.0167 So, confidence = 0.983 Probability of being correct in rejecting all Ho: 1 2 3 0.983 x 0.983 x 0.983 = 0.95 So, Type I error rate is now 0.95 Simplest: Bonferroni correction: Comparison-wise p = experiment-wise p/n Where n = number of contrasts. Experient-wise = 0.05 Comparison-wise = 0.05/3 = 0.0167 So, confidence = 0.983 Conducting ANOVA’s I. Why? A. more than two groups to compare What’s the prob? - multiple comparisons reduce experiment-wide alpha level. - Bonferroni adjustments assume contrasts as independent; but they are both part of the same experiment… - Bonferroni adjustments assume contrasts as independent; but they are both part of the same experiment… Our consideration of 1 vs. 2 might consider the variation in all treatments that were part of this experiment; especially if we are interpreting the differences between mean comparisons as meaningful. 1 vs. 2 – not significant 1 vs. 3 – significant. So, interspecific competition is more important than intraspecific competition - Bonferroni adjustments assume contrasts as independent; but they are both part of the same experiment… Our consideration of 1 vs. 2 might consider the variation in all treatments that were part of this experiment; especially if we are interpreting the differences between mean comparisons as meaningful. Conducting ANOVA’s I. Why? A. more than two groups to compare B. complex design with multiple factors - blocks - nested terms - interaction effects - correlated variables (covariates) - multiple responses Conducting ANOVA’s I. Why? II. How? A. Variance Redux Of a population Of a sample S2 = Sum of squares n-1 S2 = “Sum of squares” = SS n-1 2 (Sx) = SS 2 S(x ) n S2 = MS = “Sum of squares” = SS n-1 2 (Sx) = SS 2 S(x ) n n-1 Conducting ANOVA’s I. Why? II. How? A. Variance Redux B. The ANOVA Table Source of Variation df SS MS F p Weight gain in mice fed different diets Group A (Control) 10.8 11 9.7 10.1 11.2 9.8 10.5 9.5 10 10.2 Group sums Sx Sx2 (Sx)2/n Group B (Junk Food) 12.7 13.9 11.8 13 11 10.9 13.6 10.9 11.5 12.8 Group C (Health Food) 9.8 8.6 8 7.5 9 10 8.1 7.8 7.9 9.1 Weight gain in mice fed different diets Group A (Control) 10.8 11 9.7 10.1 11.2 9.8 10.5 9.5 10 10.2 Group B (Junk Food) 12.7 13.9 11.8 13 11 10.9 13.6 10.9 11.5 12.8 Group C (Health Food) 9.8 8.6 8 7.5 9 10 8.1 7.8 7.9 9.1 Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 85.8 742.92 736.164 310.7 3305.09 3283.789 Weight gain in mice fed different diets Group A (Control) 10.8 11 9.7 10.1 11.2 9.8 10.5 9.5 10 10.2 Group B (Junk Food) 12.7 13.9 11.8 13 11 10.9 13.6 10.9 11.5 12.8 Group C (Health Food) 9.8 8.6 8 7.5 9 10 8.1 7.8 7.9 9.1 Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 85.8 742.92 736.164 310.7 3305.09 3283.789 Correction term = (SSx)2/N = (310.7)2/30 Weight gain in mice fed different diets Group A (Control) 10.8 11 9.7 10.1 11.2 9.8 10.5 9.5 10 10.2 Group B (Junk Food) 12.7 13.9 11.8 13 11 10.9 13.6 10.9 11.5 12.8 Group C (Health Food) 9.8 8.6 8 7.5 9 10 8.1 7.8 7.9 9.1 Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL SS 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F p 29 2 (Sx) = SS 2 S(x ) n SStotal = 3305.09 – 3217.816 = 87.274 Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL 29 SS 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F p 87.274 2 (Sx) = SS 2 S(x ) n SStotal = 3305.09 – 3217.816 = 87.274 Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 2 (Sx) = SS S(x2) n Source of Variation df TOTAL GROUP 29 2 SS 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F p 87.274 65.973 SSgroup = 3283.789 – 3217.816 = 65.973 Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL GROUP 29 2 SS 87.274 65.973 MS = 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F 32.986 p 2 (Sx) S(x2) n n-1 MSgroup = 65.973/2 = 32.986 Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL GROUP “ERROR” (within) 29 2 27 SS 87.274 65.973 21.301 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F 32.986 p Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL GROUP “ERROR” (within) 29 2 27 SS 87.274 65.973 21.301 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F 32.986 0.789 MSerror = 21.301/27 = 0.789 p GOOD GRIEF !!! Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL GROUP “ERROR” (within) F= 29 2 27 SS 87.274 65.973 21.301 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F p 32.986 0.789 Variance (MS) between groups Variance (MS) within groups Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL GROUP “ERROR” (within) F= 29 2 27 SS 87.274 65.973 21.301 32.986 = 41.81 0.789 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F 32.986 0.789 41.81 p Weight gain in mice fed different diets Group sums Sx Sx2 (Sx)2/n Totals 102.8 1059.76 1056.784 122.1 1502.41 1490.841 Source of Variation df TOTAL GROUP “ERROR” (within) F= 29 2 27 SS 87.274 65.973 21.301 32.986 = 41.81 0.789 85.8 742.92 736.164 310.7 3305.09 3283.789 3217.816 = CT MS F 32.986 0.789 p 41.81 < 0.05 Conducting ANOVA’s I. Why? II. How? III. Comparing Means “post-hoc mean comparison tests – after ANOVA TUKEY – CV = q MSerror n Q from table A.7 = 3.53 n = n per group (10) = 0.9915 Means: Health Food Control Junk Food 8.58 10.29 12.25 H – C = 1.70 J – C = 1.93 H – J = 3.67 All greater than 0.9915, so all mean comparisions are significantly different at an experiment-wide error rate of 0.05. Means: Health Food Control Junk Food 8.58 a 10.29 b 12.25 c H – C = 1.70 J – C = 1.93 H – J = 3.67 All greater than 0.9915, so all mean comparisions are significantly different at an experiment-wide error rate of 0.05.