Business Statistics A DecisionMaking Approach 8 th Edition
Business Statistics: A Decision-Making Approach 8 th Edition Chapter 12 Analysis of Variance Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -1
Chapter Goals After completing this chapter, you should be able to: n Recognize situations in which to use analysis of variance n Understand different analysis of variance designs n n Perform a single-factor hypothesis test and interpret results (manually and with the aid of Excel) Conduct and interpret post-analysis of variance pairwise comparisons procedures Set up and perform randomized blocks analysis Analyze two-factor analysis of variance test with replications results with Excel or Minitab Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -2
Chapter Overview Analysis of Variance (ANOVA) One-Way ANOVA Randomized Complete Block ANOVA Two-factor ANOVA with replication F-test Tukey. Kramer test Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall F-test Fisher’s Least Significant Difference test 12 -3
One-Factor ANOVA F Test Example You want to see if three different golf clubs yield different distances. You randomly select five measurements from trials on an automated driving machine for each club. At the 0. 05 significance level, is there a difference in mean distance? Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 12 -4
One-Factor ANOVA Example: Scatter Diagram Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 Distance 270 260 250 240 230 220 210 200 190 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall • • • • • 1 2 3 Club 12 -5
One-Factor ANOVA Example Computations Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 x 1 = 249. 2 n 1 = 5 x 2 = 226. 0 n 2 = 5 x 3 = 205. 8 n 3 = 5 x = 227. 0 n. T = 15 k = 3 SSB = 5 [ (249. 2 – 227)2 + (226 – 227)2 + (205. 8 – 227)2 ] = 4716. 4 SSW = (254 – 249. 2)2 + (263 – 249. 2)2 +…+ (204 – 205. 8)2 = 1119. 6 MSB = 4716. 4 / (3 -1) = 2358. 2 MSW = 1119. 6 / (15 -3) = 93. 3 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -6
One-Factor ANOVA Example Solution Test Statistic: H 0: μ 1 = μ 2 = μ 3 HA: μi not all equal = 0. 05 df 1= 2 df 2 = 12 Decision: Reject H 0 at = 0. 05 Critical Value: F = 3. 885 = 0. 05 0 Do not reject H 0 Reject H 0 F 0. 05 = 3. 885 Conclusion: There is evidence that at least one μi differs F = 25. 275 from the rest Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -7
ANOVA -- Single Factor: Excel Output EXCEL: tools | data analysis | ANOVA: single factor SUMMARY Groups Count Sum Average Variance Club 1 5 1246 249. 2 108. 2 Club 2 5 1130 226 77. 5 Club 3 5 1029 205. 8 94. 2 ANOVA Source of Variation SS df MS Between Groups 4716. 4 2 2358. 2 Within Groups 1119. 6 12 93. 3 Total 5836. 0 14 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall F P-value 25. 275 F crit 4. 99 E-05 3. 885 12 -8
Logic of Analysis of Variance n Investigator controls one or more independent variables n n n Observe effects on dependent variable n n Called factors (or treatment variables) Each factor contains two or more levels (or categories/classifications) Response to levels of independent variable Experimental design: the plan used to test hypothesis Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -9
Completely Randomized Design n n Experimental units (subjects) are assigned randomly to treatments Only one factor or independent variable n n Analyzed by n n With two or more treatment levels One-factor analysis of variance (one-way ANOVA) Called a Balanced Design if all factor levels have equal sample size Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -10
One-Way Analysis of Variance n Evaluate the difference among the means of three or more populations Examples: ● Accident rates for 1 st, 2 nd, and 3 rd shift ● Expected mileage for five brands of tires n Assumptions n Populations are normally distributed n Populations have equal variances n Samples are randomly and independently drawn n Data’s measurement level is interval or ratio Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -11
Hypotheses of One-Way ANOVA n n n n All population means are equal i. e. , no treatment effect (no variation in means among groups) n At least one population mean is different n i. e. , there is a treatment effect n Does not mean that all population means are different (some pairs may be the same) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -12
One-Factor ANOVA All Means are the same: The Null Hypothesis is True (No Treatment Effect) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -13
One-Factor ANOVA (continued) At least one mean is different: The Null Hypothesis is NOT true (Treatment Effect is present) or Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -14
Partitioning the Variation n Total variation can be split into two parts: SST = SSB + SSW SST = Total Sum of Squares (total variation) SSB = Sum of Squares Between (variation between samples) SSW = Sum of Squares Within (within each factor level) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -15
Partitioning the Variation (continued) SST = SSB + SSW Total Variation (SST) = the aggregate dispersion of the individual data values across the various factor levels Between-Sample Variation (SSB) = dispersion among the factor sample means Within-Sample Variation (SSW) = dispersion that exists among the data values within a particular factor level Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -16
Partition of Total Variation (SST) = § § Variation Due to Factor (SSB) Commonly referred to as: Sum of Squares Between Sum of Squares Among Sum of Squares Explained Among Groups Variation Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall Variation Due to Random Sampling (SSW) + § § Commonly referred to as: Sum of Squares Within Sum of Squares Error Sum of Squares Unexplained Within Groups Variation 12 -17
Total Sum of Squares SST = SSB + SSW Where: SST = Total sum of squares k = number of populations (levels or treatments) ni = sample size from population i xij = jth measurement from population i x = grand mean (mean of all data values) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -18
Total Variation (continued) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -19
Sum of Squares Between SST = SSB + SSW Where: SSB = Sum of squares between k = number of populations ni = sample size from population i xi = sample mean from population i x = grand mean (mean of all data values) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -20
Between-Group Variation Due to Differences Among Groups Mean Square Between = SSB/degrees of freedom Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -21
Between-Group Variation (continued) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -22
Sum of Squares Within SST = SSB + SSW Where: SSW = Sum of squares within k = number of populations ni = sample size from population i xi = sample mean from population i xij = jth measurement from population i Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -23
Within-Group Variation Summing the variation within each group and then adding over all groups Mean Square Within = SSW/degrees of freedom Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -24
Within-Group Variation (continued) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -25
One-Way ANOVA Table Source of Variation SS df Between Samples SSB k-1 Within Samples SSW n. T - k Total SST = SSB+SSW n. T - 1 MS F ratio SSB MSB = k - 1 F = MSW SSW MSW = n. T - k Hartley’s F-test statistic k = number of populations n. T = sum of the sample sizes from all populations df = degrees of freedom Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -26
One-Factor ANOVA F Test Statistic H 0: μ 1= μ 2 = … = μ k HA: At least two population means are different n Test statistic MSB is mean squares between variances MSW is mean squares within variances n Degrees of freedom n n df 1 = k – 1 (k = number of populations) df 2 = n. T – k (n. T = sum of sample sizes from all populations) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -27
Interpreting One-Factor ANOVA F Statistic n The F statistic is the ratio of the between estimate of variance and the within estimate of variance n n n The ratio must always be positive df 1 = k -1 will typically be small df 2 = n. T - k will typically be large The ratio should be close to 1 if H 0: μ 1= μ 2 = … = μk is true The ratio will be larger than 1 if H 0: μ 1= μ 2 = … = μk is false Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -28
ANOVA Steps 1. 2. 3. 4. Specify parameter of interest Formulate hypotheses Specify the significance level, Select independent, random samples n 5. 6. 7. 8. Compute sample means and grand mean Determine the decision rule Verify the normality and equal variance assumptions have been satisfied Create ANOVA table Reach a decision and draw a conclusion Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -29
The Tukey-Kramer Procedure n Tells which population means are significantly different n n n e. g. : μ 1 = μ 2 μ 3 Done after rejection of equal means in ANOVA Allows pair-wise comparisons n Compare absolute mean differences with critical range μ 1 = μ 2 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall μ 3 x 12 -30
Tukey-Kramer Critical Range where: q = Value from standardized range table with k and n. T - k degrees of freedom for the desired level of MSW = Mean Square Within ni and nj = Sample sizes from populations (levels) i and j Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -31
The Tukey-Kramer Procedure: Example Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 1. Compute absolute mean differences: 2. Find the q value from the table in appendix J with k and n. T - k degrees of freedom for the desired level of Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -32
The Tukey-Kramer Procedure: Example 3. Compute Critical Range: 4. Compare: 5. All of the absolute mean differences are greater than critical range. Therefore there is a significant difference between each pair of means at 5% level of significance. Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -33
Tukey-Kramer in PHStat Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -34
Randomized Complete Block ANOVA n n Like One-Way ANOVA, we test for equal population means (for different factor levels, for example). . . but we want to control for possible variation from a second factor (with two or more levels) Used when more than one factor may influence the value of the dependent variable, but only one is of key interest Levels of the secondary factor are called blocks Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -35
Randomized Complete Block ANOVA (continued) n Assumptions n n n Populations are normally distributed Populations have equal variances The observations within samples are independent The date measurement must be interval or ratio Application examples n n Testing 5 routes to a destination through 3 different cab companies to see if differences exist Determining the best training program (out of 4 choices) for various departments within a company Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -36
Partitioning the Variation n Total variation can now be split into three parts: SST = SSB + SSBL + SSW SST = Total sum of squares SSB = Sum of squares between factor levels SSBL = Sum of squares between blocks SSW = Sum of squares within levels Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -37
Sum of Squares for Blocking SST = SSB + SSBL + SSW Where: k = number of levels for this factor b = number of blocks xj = sample mean from the jth block x = grand mean (mean of all data values) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -38
Partitioning the Variation n Total variation can now be split into three parts: SST = SSB + SSBL + SSW SST and SSB are computed as they were in One-Way ANOVA Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall SSW = SST – (SSB + SSBL) 12 -39
Mean Squares Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -40
Randomized Block ANOVA Table Source of Variation SS df MS F ratio Between Blocks SSBL b-1 MSBL MSW Between Samples SSB k-1 MSB MSW Within Samples SSW (k– 1)(b-1) MSW SST n. T - 1 Total k = number of populations b = number of blocks Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall n. T = sum of the sample sizes from all populations df = degrees of freedom 12 -41
Blocking Test MSBL F= MSW n Blocking test: df 1 = b - 1 df 2 = (k – 1)(b – 1) Reject H 0 if F > F Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -42
Main Factor Test F= MSB MSW n Main Factor test: df 1 = k - 1 df 2 = (k – 1)(b – 1) Reject H 0 if F > F Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -43
Fisher’s Least Significant Difference Test n To test which population means are significantly different n n n e. g. : μ 1 = μ 2 ≠ μ 3 Done after rejection of equal means in randomized block ANOVA design Allows pair-wise comparisons n Compare absolute mean differences with critical range 1= 2 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 3 x 12 -44
Fisher’s Least Significant Difference (LSD) Test where: t /2 = Upper-tailed value from Student’s t-distribution for /2 and (k - 1)(b - 1) degrees of freedom MSW = Mean square within from ANOVA table b = number of blocks k = number of levels of the main factor NOTE: This is a similar process as Tukey-Kramer Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -45
Fisher’s Least Significant Difference (LSD) Test (continued) Compare: If the absolute mean difference is greater than LSD then there is a significant difference between that pair of means at the chosen level of significance Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -46
Two-Factor ANOVA With Replication n Examines the effect of n n Two or more factors of interest on the dependent variable n e. g. : Percent carbonation and line speed on soft drink bottling process Interaction between the different levels of these two factors n e. g. : Does the effect of one particular percentage of carbonation depend on which level the line speed is set? Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -47
Two-Factor ANOVA (continued) n Assumptions n Populations are normally distributed n Populations have equal variances n n Independent random samples are drawn Data must be interval or ratio level Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -48
Two-Way ANOVA Sources of Variation Two Factors of interest: A and B a = number of levels of factor A b = number of levels of factor B n. T = total number of observations in all cells Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -49
Two-Way ANOVA Sources of Variation SST = SSA + SSB + SSAB + SSE a – 1 SSB b – 1 Variation due to factor B SSAB n. T - 1 Variation due to interaction between A and B SSE Inherent variation (Error) Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall Degrees of Freedom: SSA Variation due to factor A SST Total Variation (continued) (a – 1)(b – 1) n. T – ab 12 -50
Two Factor ANOVA Equations Total Sum of Squares: Sum of Squares Factor A: Sum of Squares Factor B: Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -51
Two Factor ANOVA Equations (continued) Sum of Squares Interaction Between A and B: Sum of Squares Error: Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -52
Two Factor ANOVA Equations (continued) where: a = number of levels of factor A b = number of levels of factor B n’ = number of replications in each cell Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -53
Mean Square Calculations Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -54
Two-Way ANOVA: The F Test Statistic H 0: μA 1 = μA 2 = μA 3 = • • • HA: Not all μAi are equal H 0: μB 1 = μB 2 = μB 3 = • • • HA: Not all μBi are equal H 0: factors A and B do not interact to affect the mean response HA: factors A and B do interact Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall F Test for Factor A Main Effect Reject H 0 if F > F F Test for Factor B Main Effect Reject H 0 if F > F F Test for Interaction Effect Reject H 0 if F > F 12 -55
Two-Way ANOVA Summary Table Source of Variation Sum of Squares Degrees of Freedom Mean Squares F Statistic Factor A SSA a– 1 MSA MSE Factor B SSB b– 1 AB (Interaction) SSAB (a – 1)(b – 1) Error SSE n. T – ab Total SST n. T – 1 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall = SSA /(a – 1) MSB = SSB /(b – 1) MSAB = SSAB / [(a – 1)(b – 1)] MSB MSE MSAB MSE = SSE/(n. T – ab) 12 -56
Features of Two-Way ANOVA F Test n n n Degrees of freedom always add up n n. T - 1 = (n. T - ab) + (a - 1) + (b - 1) + (a - 1)(b - 1) n Total = error + factor A + factor B + interaction The denominator of the F Test is always the same but the numerator is different The sums of squares always add up n SST = SSE + SSA + SSB + SSAB n Total = error + factor A + factor B + interaction Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -57
Interaction vs. No Interaction No interaction: Interaction is present: Factor B Level 3 Factor B Level 2 1 Factor A Levels 2 Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall Mean Response Factor B Level 1 Mean Response n n Factor B Level 1 Factor B Level 2 Factor B Level 3 1 Factor A Levels 2 12 -58
Interaction vs. No Interaction (continued) n When conducting tests for a Two-Factor ANOVA: Test for interaction n If present, conduct a one-way ANOVA to test the levels of one of the other factors using only one level of the other factor n If NO interaction, test Factor A and Factor B Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -59
Chapter Summary n Described one-way analysis of variance n n n Described randomized complete block designs n n n The logic of ANOVA assumptions F test for difference in k means The Tukey-Kramer procedure for multiple comparisons F test Fisher’s least significant difference test for multiple comparisons Described two-way analysis of variance n Examined effects of multiple factors and interaction Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -60
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2011 Pearson Education, Inc. publishing as Prentice Hall 12 -61
- Slides: 61