ANOVA one way ppt - Multiple-sample Comparisons Analysis of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Multiple-sample Comparisons Analysis of Variance Chapter 11 ANOVA 1 Comparing three samples A sporting goods manufacturer is testing three "dimple" design patterns to see which one yields the longest distance. ANOVA 2 What do dimples do? Different layouts control various aspects of ball flight. Some dimple designs are even banned by the USGA. ANOVA 3 The experiment Ten balls of each type were going to be used in the experiment. In the first trial, two different professional golfers were to hit half the balls each in a random order. It didn't quite work out when one pulled a muscle before finishing. So, a second trial used a golf-ball hitting robot. ANOVA 4 GolfBallDesign.XLS Three golf ball dimple designs Asymmetric, Equal-Spaced and Oval Driven By Human Golfers Asymm 216 217 218 219 223 225 234 236 237 EqSpc 217 218 222 224 229 235 237 239 240 Oval 224 227 231 232 236 241 245 247 248 249 Driven by Golf-Ball Hitting Robot AsymmR 221 222 222 223 224 224 225 226 229 232 EqSpcR 225 226 226 228 229 231 232 233 233 233 OvalR 231 233 235 237 237 238 238 239 244 245 ANOVA 5 Average distance travelled Design Asymmetric EquiSpace Oval 1. Golfers 225.0 229.0 238.0 Machine 224.8 229.6 237.7 Averages about the same in both trials. 2. "Oval" looks best, but we don't know what difference is significant. 3. For that, we also need to consider the variation within each type of ball. ANOVA 6 Balls driven by golfers Balls Driven By Human Golfers Lots of overlap Oval EqSpc Asymm 210 215 220 225 230 235 240 245 250 255 260 ANOVA 7 Balls driven by machine Balls Driven By Golf-Ball Hitting Robot Much Less Overlap OvalR EqSpcR AsymmR 210 215 220 225 230 235 240 245 250 255 260 ANOVA 8 All together for comparison Both Data Sets Together Less variation with machine-driven balls OvalR EqSpcR AsymmR Oval EqSpc Asymm 210 215 220 225 230 235 240 245 250 255 260 ANOVA 9 Two samples: what's significant? TCALC = X1 - X 2 1 1 s + n n 2 1 2 p For significance, we need to have either TCALC > +2 or TCALC < -2. If we square the whole thing, 4 or more shows significance. ANOVA 10 A new procedure How do we compare 3 means to each other to look for differences? We can generalize the denominator (compute Sp across more groups). For the numerator, we will compare each sample mean to an overall or grand mean, and see how much they vary. This procedure is called Analysis of Variance, or ANOVA. ANOVA 11 Notation ith observation in group j: Mean of group j: Number of observations in group j: Number of groups: Overall (grand) mean: Total number of observations: ANOVA 12 Human-driven balls Design Asymm EqSpc Oval n 9 9 10 Avg. 225.0 229.0 238.0 Variance 72.500 82.500 85.111 S.D. 8.515 9.083 9.226 Grand mean: ____________ Pooled-sample variance: ______ ANOVA 13 Variation "Among Groups" Compute the squared difference between each sample mean and the grand mean. 2. Weight this by sample size. 1. SSA = n j ( X j - X ) j =1 ANOVA C 2 14 Mean Square "Among Groups" 1. 2. 3. The quantity SSA would naturally be larger if there were lots of groups (not just 3). To account for this, we compute a kind of average or mean amount of variation. As in other areas, the divisor is the number of groups minus 1. SSA MSA = C -1 ANOVA 15 The ANOVA test Finally, we form a ratio of the two variance components. The numerator is MSA. The denominator is just the pooled-sample variance. The denominator is called "variance within groups" or in the usual ANOVA jargon, MSW = Mean Squared Within. It is another F test. ANOVA 16 The hypothesis test HO: 1 = 2 = ... = C (All C means equal) H1: At least one j is different Test statistic is F with (C-1) numerator df and (n-C) denominator df ANOVA 17 Decision rule Variance between groups MSA F = -------------------------------- = ----------Variance within groups MSW In general, want this to be about 4* or more to show significance. * PhStat will be more exact about this. ANOVA 18 Results MSA = MSW = F = MSA / MSW = Conclude? ANOVA 19 Robot-driven balls Design AsymmR EqSpcR OvalR n 10 10 10 Avg. 224.8 229.6 237.7 Variance 11.733 10.267 18.900 S.D. 3.425 3.204 4.347 Grand mean = 230.7 SSA = MSA = 425.100 Pooled-sample variance = 13.633 F= ANOVA 20 Comparison of the two trials MSA MSW F ratio 1. Humans 424.929 80.240 5.296 Robots 425.100 13.633 31.181 About the same variation among groups 2. A lot less variation within. 3. F is larger so there is more significance. ANOVA 21 ERwaittime.XLS Emergency Room Waiting Time in Minutes At Four Hospitals StLucy 10 19 5 26 11 32 12 23 41 24 27 CountyGen 8 25 17 36 38 54 12 43 65 76 32 44 54 44 ANOVA NorthWest 5 11 24 16 18 29 15 13 35 32 14 ForestHill 42 20 29 31 40 12 46 22 26 22 ANOVA in PhStat NEXT ANOVA 23 ANOVA Output ER Wait Times SUMMARY Groups StLucy CountyGen NorthWest ForestHill Count 11 14 11 9 Sum 230 548 212 268 Average 20.909 39.143 19.273 29.778 Variance 115.691 383.824 89.618 125.694 ANOVA Source of Variation Between Groups Within Groups Total SS 3157.5504 8048.3608 11205.9111 df 3 41 44 MS 1052.5168 196.3015 F P-value 5.3617 0.0033 F crit 2.8327 In general, how is the table organized? ANOVA 24 One-Way ANOVA.XLS Paste your data onto the sheet "ASFData" It is set up to use 4-samples. A little tricky to adjust to 3 or 5, so we won't. Need to manually modify the formula in the cell that computes SST. Need to manually type in column labels. ANOVA 25 Changes on "Compute" Sheet ANOVA: S ingle Factor SUMMARY Groups S upplier 1 S upplier 2 S upplier 3 S upplier 4 Count 5 5 5 5 Sum Average Variance 97.6 19.52 7.237 121.3 24.26 3.683 114.2 22.84 4.553 105.8 21.16 8.903 ANOVA Source of Variation Between Groups Within Groups Total SS 63.2855 97.504 160.7895 df 3 16 MS 21.0952 6.0940 F P-value F crit 3.4616 0.0414 3.2389 Change formula 19 ANOVA 26 Follow-up Analysis Once we have concluded that there are significant differences between groups, we want to follow up and try to decide which ones are significantly bigger or smaller. We could just do 6 different two-sample comparisons, but there are some things wrong with this: ________ and ________. ANOVA 27 Multiple comparisons There are several procedures that are designed to do follow-up comparisons to determine why the F-test was significant. Our textbook and PhStat do the TukeyKramer procedure. This figures out how much difference there should be between two sample averages before you can declare it significant. ANOVA 28 The Tukey-Kramer procedure Designed for all pair-wise comparisons at once. Overall level of significance is controlled at 5%. It figures out the "critical range" and then declares anything above that significant. ANOVA 29 The Critical Range We need to compute: CR = Q MSW 1 1 + 2 nh n k Here Q is the tabled value for the "Studentized Range" (Table E.7 pg 747). MSW is from the ANOVA table, and nh and nk are the sample sizes for the two groups we are comparing. ANOVA 30 Using the procedure We can compare any two means, say groups 3 and 4, by just looking at the difference in means XBAR3 XBAR4 Any time this amount is bigger than the critical range we will declare a significant difference. If the amount is smaller than the critical range we will say no significant difference. ANOVA 31 Part of E.7 for =.05 Number of groups (C) n-C 20 24 30 40 60 2 2.95 2.92 2.89 2.86 2.83 3 3.58 3.53 3.49 3.44 3.40 4 3.96 3.90 3.84 3.79 3.74 5 4.23 4.17 4.10 4.04 3.98 We have C = 4 groups and n = 45 observations overall. Need n-C = 41. ANOVA 32 Our results ER Wait Times Sample Mean 20.90909 39.14286 19.27273 29.77778 Sample Size 11 14 11 9 StLucy to County: Group 1: StLucy 2: CountyGen 3: NorthWest 4: ForestHill Other Data Level of significance 0.05 Numerator d.f. 4 Denominator d.f. 41 MSW 196.3015 Q Statistic 3.79 StLucy to FH: ANOVA 33 Tukey-Kramer (Q=3.79) Comparison Group 1 to Group 2 Group 1 to Group 3 Group 1 to Group 4 Group 2 to Group 3 Group 2 to Group 4 Group 3 to Group 4 Absolute Std. Error Difference of Difference 18.2338 3.9917 1.6364 4.2244 8.8687 4.4529 19.8701 3.9917 9.3651 4.2328 10.5051 4.4529 Critical Range 15.128 16.010 16.877 15.128 16.042 16.877 Results Means are different Means are not different Means are not different Means are different Means are not different Means are not different ANOVA 34 Assumptions The ANOVA procedure has assumptions which should be checked. As usual, this is more important in smallsample situations. We should have normally-distributed data. We should have equal variances: 1 = 2 = ... = C ANOVA 35 Emergency Room Wait Times Symmetric, no outliers Equal spreads (mostly) ForestHill NorthWest CountyGen StLucy 0 10 20 30 40 50 60 70 80 ANOVA 36 A data set with problems Boxplot TrashBagStrength.XLS Two brands with outliers TUFFSTUFF HEFTY GLAD KROGER 10 15 20 25 30 35 40 45 50 ANOVA 37 12.6 The Kruskal-Wallis Test Compares ranks of data, which are much less sensitive to outliers. Rank all data together from 1 to n. Get sum of ranks for each sample. Average ranks would be about the same if there were no significant differences. ANOVA 38 The K-W Test H0: All populations have the same median H1: At least one has a different median Test Statistic: H (page 454) Compare to a critical value from the ChiSquare distribution. Will be significant if average ranks very different. ANOVA 39 Ranking output Group Sample Size Sum of Ranks Mean Ranks 1 10 193.5 19.35 2 10 336 33.6 3 10 232.5 23.25 4 10 58 5.8 Group order is same as column order. I wish it would use the column names. ANOVA 40 K-W Test Kruskal-Wallis Rank Test for Differences in Medians Data Level of Significance Intermediate Calculations Sum of Squared Ranks/Sample Size Sum of Sample Sizes Number of Groups Test Result H Test Statistic Critical Value p-Value Reject the null hypothesis ANOVA 0.05 20775.85 40 4 29.01841 7.814728 2.22E-06 41 ...
View Full Document

This note was uploaded on 02/14/2011 for the course QMB 3250 taught by Professor Thompson during the Spring '08 term at University of Florida.

Ask a homework question - tutors are online