Statistics for Managers Using Microsoft Excel Chapter 10 ANOVA and Other C-Sample Tests With Numerical Data 1999 Prentice-Hall, Inc. Chap. 10-1
Chapter Topics The Completely Randomized Model: One-Factor Analysis of Variance F-Test for Difference in c Means The Tukey-Kramer Procedure ANOVA Assumptions The Factorial Design Model: Two-Way Analysis of Variance Examine Effect of Factors and Interaction Kruksal-Wallis Rank Test for Differences in c Medians 1999 Prentice-Hall, Inc. Chap. 10 -
One-Factor Analysis of Variance Evaluate the Difference Among the Means of or More (c) Populations e.g., Several Types of Tires, Oven Temperature Settings Assumptions: Samples are Randomly and Independently Drawn (This condition must be met.) Populations are Normally Distributed (F test is Robust to moderate departures from normality.) Populations have Equal Variances 1999 Prentice-Hall, Inc. Chap. 10-3
One-Factor ANOVA Test Hypothesis H 0 : m 1 m m 3... m c All population means are equal No treatment effect (NO variation in means among groups) H 1 : not all the m k are equal At least ONE population mean is different (Others may be the same!) There is treatment effect Does NOT mean that all the means are different: m 1 m... m c 1999 Prentice-Hall, Inc. Chap. 10-4
One-Factor ANOVA: No Treatment Effect H 0 : m 1 m m 3... m c H 1 : not all the m k are equal The Null Hypothesis is True m 1 m m 3 1999 Prentice-Hall, Inc. Chap. 10-5
One Factor ANOVA: Treatment Effect Present H 0 : m 1 m m 3... m c H 1 : not all the m k are equal The Null Hypothesis is NOT True m 1 m m 3 1999 Prentice-Hall, Inc. Chap. 10-6
One-Factor ANOVA Partitions of Total Variation Total Variation SST Variation Due to Treatment SSA + Commonly referred to as: Sum of Squares Among, or Sum of Squares Between, or Sum of Squares Model, or Among Groups Variation Variation Due to Random Sampling SSW Commonly referred to as: Sum of Squares Within, or Sum of Squares Error, or Within Groups Variation 1999 Prentice-Hall, Inc. Chap. 10-7
Total Variation SST c n j j 1i 1 ( X ij X ) X ij the ith observation in group j n j the number of observations in group j n the total number of observations in all groups c the number of groups X c n X 1 ij i 1 the overall or grand mean n j j 1999 Prentice-Hall, Inc. Chap. 10-8
Among-Group Variation SSA c j 1 n j ( X j X ) SSA MSA c 1 n j the number of observations in group j c the number of groups _ X j the sample mean of group j _ X the overall or grand mean m i m j Variation Due to Differences Among Groups. 1999 Prentice-Hall, Inc. Chap. 10-9
Within-Group Variation SSW c n j j 1i 1 ( X ij X j ) MSW SSW n c X the ith observation in group j ij X the sample mean of group j j Summing the variation within each group and then adding over all groups. m j 1999 Prentice-Hall, Inc. Chap. 10-10
Within-Group Variation MSW SSW n c ( n 1 1)S1 ( n 1)S ( nc 1)S ( n 1) ( n 1) ( n 1) 1 For c, this is the pooled-variance in the t-test. c c If more than groups, use F Test. For groups, use t-test. F Test more limited. m j 1999 Prentice-Hall, Inc. Chap. 10-11
One-Way ANOVA Summary Table Source of Variation Among (Factor) Within (Error) Degrees of Freedom Sum of Squares Mean Square (Variance) c - 1 SSA MSA SSA/(c - 1) n - c SSW MSW SSW/(n - c) F Test Statistic MSA MSW Total n - 1 SST SSA+SSW 1999 Prentice-Hall, Inc. Chap. 10-1
One-Factor ANOVA F Test Example As production manager, you want to see if 3 filling machines have different mean filling times. You assign 15 similarly trained & experienced workers, 5 per machine, to the machines. At the.05 level, is there a difference in mean filling times? Machine1 Machine Machine3 5.40 3.40 0.00 6.31 1.80.0 4.10 3.50 19.75 3.74.75 0.60 5.10 1.60 0.40 1999 Prentice-Hall, Inc. Chap. 10-13
One-Factor ANOVA Example: Scatter Diagram Machine1 Machine Machine3 5.40 3.40 0.00 6.31 1.80.0 4.10 3.50 19.75 3.74.75 0.60 5.10 1.60 0.40 X 4.93 X.61 X 0.59 _ X.71 7 6 5 4 3 1 0 19 _ _ X _ _ X x _ x 1999 Prentice-Hall, Inc. Chap. 10-14
Machine1 Machine Machine3 5.40 3.40 0.00 6.31 1.80.0 4.10 3.50 19.75 3.74.75 0.60 5.10 1.60 0.40 One-Factor ANOVA Example Computations X 1 4.93 X.61 X 3 0.59 X.71 SSA 5 [(4.93 -.71) + (.61 -.71) + (0.59 -.71) ] 47.164 SSW 4.59+3.11 +3.68 11.053 MSA SSA/(c-1) 47.16/ 3.580 MSW SSW/(n-c) 11.053/1.911 n j 5 c 3 n 15 1999 Prentice-Hall, Inc. Chap. 10-15
Summary Table Source of Variation Among (Machines) Within (Error) Degrees of Freedom Sum of Squares Mean Square (Variance) 3-1 47.1640 3.580 15-3 1 11.053.911 Total 15-1 14 58.17 MSA F MSW 5.60 1999 Prentice-Hall, Inc. Chap. 10-16
One-Factor ANOVA Example Solution H 0 : m 1 m m 3 H 1 : Not All Equal a.05 df 1 df 1 Critical Value(s): 0 3.89 a 0.05 F F Test Statistic: MSA MSW 3. 580 911 5. 6. Decision: Reject at a 0.05 Conclusion: There is evidence that at least one m i differs from the rest. 1999 Prentice-Hall, Inc. Chap. 10-17
The Tukey-Kramer Procedure Tells Which Population Means Are Significantly Different e.g., m 1 m m 3 Post Hoc (a posteriori) Procedure Done after rejection of equal means in ANOVA f(x) Ability for Pairwise Comparisons: Compare absolute mean differences with critical range m 1 m m 3 1999 Prentice-Hall, Inc. Chap. 10-18 X groups whose means may be significantly different.
The Tukey-Kramer Procedure: Example Machine1 Machine Machine3 5.40 3.40 0.00 6.31 1.80.0 4.10 3.50 19.75 3.74.75 0.60 5.10 1.60 0.40. Compute Critical Range: Critical Range QU ( c,nc ) 1. Compute absolute mean differences: X X X 1 1 MSW X X X 3 3 1 n j 4. 93 4. 93. 61 1 n ' j. 61 0. 59 0. 59 1.618. 3 4. 34. 0 3. Each of the absolute mean difference is greater. There is a significance difference between each pair of means. 1999 Prentice-Hall, Inc. Chap. 10-19
Two-Way ANOVA Examines the Effect of: Two Factors on the Dependent Variable e.g., Percent Carbonation and Line Speed on Soft Drink Bottling Process Interaction Between the Different Levels of these Two Factors e.g., Does the effect of one particular percentage of Carbonation depend on which level the line speed is set? 1999 Prentice-Hall, Inc. Chap. 10-0
Two-Way ANOVA Assumptions Normality Populations are normally distributed Homogeneity of Variance Populations have equal variances Independence of Errors Independent random samples are drawn 1999 Prentice-Hall, Inc. Chap. 10-1
Two-Way ANOVA Total Variation Partitioning Total Variation SST Variation Due to Treatment A Variation Due to Treatment B Variation Due to Interaction Variation Due to Random Sampling SSFA + SSFB + SSAB + SSE 1999 Prentice-Hall, Inc. Chap. 10 -
Two Way ANOVA: The F Test Statistic H 0 : m 1. m. m r. H 1 : Not all m i. are equal H 0 : m. 1 m. m. c H 1 : Not all m i are equal H 0 : AB ij 0 (for all i and j) H 1 : AB ij 0 F Test for Factor A Effect F MSFA MSE F Test for Factor B Effect F MSFB MSE F Test for Interaction Effect F MSFAB MSE Reject if F > F U Reject if F > F U Reject if F > F U 1999 Prentice-Hall, Inc. Chap. 10-3
Two-Way ANOVA Summary Table Source of Variation A (Row) B (Column) AB (Interaction) Degrees of Freedom Sum of Squares Mean Square F Statistic: r - 1 SSFA MSFA MSFA MSE c - 1 SSFB MSFB MSFB MSE (r-1)(c-1) SSAB MSAB MSAB MSE Error r c (n -1) SSE MSE Total r c n - 1 SST 1999 Prentice-Hall, Inc. Chap. 10-4
Kruskal-Wallis Rank Test for c Medians Extension of Wilcoxon Rank Sum Test Tests the equality of more than (c) population medians Distribution-free test procedure Used to analyze completely randomized experimental designs Use c distribution to approximate if each sample group size n j > 5, df c - 1 1999 Prentice-Hall, Inc. Chap. 10-5
Assumptions: Kruskal-Wallis Rank Test Independent random samples are drawn Continuous dependent variable Data may be ranked both within and among samples Populations have same variability Populations have same shape Robust with regard to last conditions Use F Test in completely randomized designs and when the more stringent assumptions hold. 1999 Prentice-Hall, Inc. Chap. 10-6
Kruskal-Wallis Rank Test Procedure Obtain Rank combined data values. In event of tie, each of the tied values gets their average rank. Add the ranks for data from each of the c groups. Square to obtain T j Compute Test Statistic: n n 1 + n + + n c 1 c Tj H n(n 1) j 1n n j # of observations in jth sample 1999 Prentice-Hall, Inc. Chap. 10-7 j 3(n 1)
Kruskal-Wallis Rank Test Procedure Test Statistic, H may be approximated by Chisquare distribution (df c -1) Critical Value for a given a: Upper tail Decision Rule: Reject H 0 : M 1 M M c if Test Statistic H > c U otherwise do not reject H 0 c U 1999 Prentice-Hall, Inc. Chap. 10-8
Kruksal-Wallis Rank Test: Example As production manager, you want to see if 3 filling machines have different median filling times. You assign 15 similarly trained & experienced workers, 5 per machine, to the machines. At the.05 level, is there a difference in median filling times? Machine1 Machine Machine3 5.40 3.40 0.00 6.31 1.80.0 4.10 3.50 19.75 3.74.75 0.60 5.10 1.60 0.40 1999 Prentice-Hall, Inc. Chap. 10-9
Example Solution: Step 1 Obtaining a Ranking Raw Data Machine1 Machine Machine3 5.40 3.40 0.00 6.31 1.80.0 4.10 3.50 19.75 3.74.75 0.60 5.10 1.60 0.40 Ranks Machine1 Machine Machine3 14 9 15 6 7 1 10 1 65 11 38 8 17 4 13 5 3 1999 Prentice-Hall, Inc. Chap. 10-30
Example Solution: Step Test Statistic Computation c T j H 1 3( n 1) n( n 1) n j 1 j 1 15( 15 1) 65 5 38 5 17 5 3( 15 1) 11.58 1999 Prentice-Hall, Inc. Chap. 10-31
Kruskal-Wallis Test Example Solution H0: M 1 M M 3 H1: Not all equal a.05 df c - 1 3-1 Critical Value(s): a.05 0 5.991 c Test Statistic: H 1158. Decision: Reject at Conclusion: a.05 There is evidence that population medians are not all equal. 1999 Prentice-Hall, Inc. Chap. 10-3
Chapter Summary Described The Completely Randomized Model: One-Factor Analysis of Variance F-Test for Difference in c Means The Tukey-Kramer Procedure ANOVA Assumptions Discussed The Factorial Design Model: Two-Way Analysis of Variance Examined effect of Factors and Interaction Addressed the Kruskal-Wallis Rank Test for Differences in c Medians 1999 Prentice-Hall, Inc. Chap. 10-33