Download presentation
Presentation is loading. Please wait.
Published byElwin Garrett Modified over 9 years ago
1
© 2002 Prentice-Hall, Inc.Chap 9-1 Statistics for Managers Using Microsoft Excel 3 rd Edition Chapter 9 Analysis of Variance
2
© 2002 Prentice-Hall, Inc. Chap 9-2 The completely randomized design: one- factor analysis of variance ANOVA assumptions F test for difference in c means The Tukey-Kramer procedure The factorial design: two-way analysis of variance Examine effects of factors and interaction Kruskal-Wallis rank test for differences in c medians Chapter Topics
3
© 2002 Prentice-Hall, Inc. Chap 9-3 General Experimental Setting Investigator controls one or more independent variables Called treatment variables or factors Each treatment factor contains two or more levels (or categories/classifications) Observe effects on dependent variable Response to levels of independent variable Experimental design: the plan used to test hypothesis
4
© 2002 Prentice-Hall, Inc. Chap 9-4 Completely Randomized Design Experimental units (subjects) are assigned randomly to treatments Subjects are assumed homogeneous Only one factor or independent variable With two or more treatment levels Analyzed by One-factor analysis of variance (one-way ANOVA)
5
© 2002 Prentice-Hall, Inc. Chap 9-5 Factor (Training Method) Factor Levels (Treatments) Randomly Assigned Units Dependent Variable (Response) 21 hrs17 hrs31 hrs 27 hrs25 hrs28 hrs 29 hrs20 hrs22 hrs Randomized Design Example
6
© 2002 Prentice-Hall, Inc. Chap 9-6 One-Factor Analysis of Variance F Test Evaluate the difference among the mean responses of two 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 departure from normality Populations have equal variances Less sensitive to this requirement when samples are of equal size from each population
7
© 2002 Prentice-Hall, Inc. Chap 9-7 Why ANOVA? Could compare the means one by one using Z or t tests for difference of means Each Z or t test contains Type I error The total Type I error with k pairs of means is 1- (1 - ) k e.g.: If there are 5 means and use =.05 Must perform 10 comparisons Type I error is 1 – (.95) 10 =.40 40% of the time you will reject the null hypothesis of equal means in favor of the alternative even when the null is true!
8
© 2002 Prentice-Hall, Inc. Chap 9-8 Hypotheses of One-Way ANOVA All population means are equal No treatment effect (no variation in means among groups) At least one population mean is different (others may be the same!) There is treatment effect Does not mean that all population means are different
9
© 2002 Prentice-Hall, Inc. Chap 9-9 One-Factor ANOVA (No Treatment Effect) The Null Hypothesis is True
10
© 2002 Prentice-Hall, Inc. Chap 9-10 One-Factor ANOVA (Treatment Effect Present) The Null Hypothesis is NOT True
11
© 2002 Prentice-Hall, Inc. Chap 9-11 One-Factor ANOVA (Partition of Total Variation) Variation Due to Treatment SSA Variation Due to Random Sampling SSW Total Variation SST Commonly referred to as: Sum of Squares Within Sum of Squares Error Sum of Squares Unexplained Within Groups Variation Commonly referred to as: Sum of Squares Among Sum of Squares Between Sum of Squares Model Sum of Squares Explained Sum of Squares Treatment Among Groups Variation = +
12
© 2002 Prentice-Hall, Inc. Chap 9-12 Total Variation
13
© 2002 Prentice-Hall, Inc. Chap 9-13 Total Variation (continued)
14
© 2002 Prentice-Hall, Inc. Chap 9-14 Among-Group Variation Variation Due to Differences Among Groups.
15
© 2002 Prentice-Hall, Inc. Chap 9-15 Among-Group Variation (continued)
16
© 2002 Prentice-Hall, Inc. Chap 9-16 Summing the variation within each group and then adding over all groups. Within-Group Variation
17
© 2002 Prentice-Hall, Inc. Chap 9-17 Within-Group Variation (continued)
18
© 2002 Prentice-Hall, Inc. Chap 9-18 Within-Group Variation (continued) For c = 2, this is the pooled-variance in the t-Test. If more than two groups, use F Test. For two groups, use t- Test. F Test more limited.
19
© 2002 Prentice-Hall, Inc. Chap 9-19 One-Factor ANOVA F Test Statistic Test statistic MSA is mean squares among or between variances MSW is mean squares within or error variances Degrees of freedom
20
© 2002 Prentice-Hall, Inc. Chap 9-20 One-Factor ANOVA Summary Table Source of Variation Degrees of Freedom Sum of Squares Mean Squares (Variance) F Statistic Among (Factor) c – 1SSA MSA = SSA/(c – 1 ) MSA/MSW Within (Error) n – cSSW MSW = SSW/(n – c ) Totaln – 1 SST = SSA + SSW
21
© 2002 Prentice-Hall, Inc. Chap 9-21 Features of One-Factor ANOVA F Statistic The F Statistic is the ratio of the among estimate of variance and the within estimate of variance The ratio must always be positive Df 1 = c -1 will typically be small Df 2 = n - c will typically be large The ratio should be closed to 1 if the null is true
22
© 2002 Prentice-Hall, Inc. Chap 9-22 Features of One-Factor ANOVA F Statistic The numerator is expected to be greater than the denominator The ratio will be larger than 1 if the null is false (continued)
23
© 2002 Prentice-Hall, Inc. Chap 9-23 One-Factor ANOVA F Test Example As production manager, you want to see if three filling machines have different mean filling times. You assign 15 similarly trained and experienced workers, five per machine, to the machines. At the.05 significance level, is there a difference in mean filling times? Machine1 Machine2 Machine3 25.40 23.40 20.00 26.31 21.80 22.20 24.10 23.50 19.75 23.74 22.75 20.60 25.10 21.60 20.40
24
© 2002 Prentice-Hall, Inc. Chap 9-24 One-Factor ANOVA Example: Scatter Diagram 27 26 25 24 23 22 21 20 19 Time in Seconds Machine1 Machine2 Machine3 25.40 23.40 20.00 26.31 21.80 22.20 24.10 23.50 19.75 23.74 22.75 20.60 25.10 21.60 20.40
25
© 2002 Prentice-Hall, Inc. Chap 9-25 One-Factor ANOVA Example Computations Machine1 Machine2 Machine3 25.40 23.40 20.00 26.31 21.80 22.20 24.10 23.50 19.75 23.74 22.75 20.60 25.10 21.60 20.40
26
© 2002 Prentice-Hall, Inc. Chap 9-26 Summary Table Source of Variation Degrees of Freedom Sum of Squares Mean Squares (Variance) F Statistic Among (Factor) 3-1=247.164023.5820 MSA/MSW =25.60 Within (Error) 15-3=1211.0532.9211 Total15-1=1458.2172
27
© 2002 Prentice-Hall, Inc. Chap 9-27 One-Factor ANOVA Example Solution F 03.89 H 0 : 1 = 2 = 3 H 1 : Not All Equal =.05 df 1 = 2 df 2 = 12 Critical Value(s): Test Statistic: Decision: Conclusion: Reject at = 0.05 There is evidence that at least one i differs from the rest. = 0.05 F MSA MSW 235820 9211 256...
28
© 2002 Prentice-Hall, Inc. Chap 9-28 Solution In EXCEL Use tools | data analysis | ANOVA: single factor EXCEL worksheet that performs the one-factor ANOVA of the example
29
© 2002 Prentice-Hall, Inc. Chap 9-29 The Tukey-Kramer Procedure Tells which population means are significantly different e.g.: 1 = 2 3 Two groups whose means may be significantly different Post hoc (a posteriori) procedure Done after rejection of equal means in ANOVA Ability for pair-wise comparisons Compare absolute mean differences with critical range X f(X) 1 = 2 3
30
© 2002 Prentice-Hall, Inc. Chap 9-30 The Tukey-Kramer Procedure: Example 1. Compute absolute mean differences: Machine1 Machine2 Machine3 25.40 23.40 20.00 26.31 21.80 22.20 24.10 23.50 19.75 23.74 22.75 20.60 25.10 21.60 20.40 2. Compute Critical Range: 3. All of the absolute mean differences are greater. There is a significance difference between each pair of means at 5% level of significance.
31
© 2002 Prentice-Hall, Inc. Chap 9-31 Solution in PHStat Use PHStat | c-sample tests | Tukey-Kramer procedure … EXCEL worksheet that performs the Tukey- Kramer procedure for the previous example
32
© 2002 Prentice-Hall, Inc. Chap 9-32 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?
33
© 2002 Prentice-Hall, Inc. Chap 9-33 Two-Way ANOVA Assumptions Normality Populations are normally distributed Homogeneity of Variance Populations have equal variances Independence of Errors Independent random samples are drawn (continued)
34
© 2002 Prentice-Hall, Inc. Chap 9-34 SSE Two-Way ANOVA Total Variation Partitioning Variation Due to Treatment A Variation Due to Random Sampling Variation Due to Interaction SSA SSAB SST Variation Due to Treatment B SSB Total Variation d.f.= n-1 d.f.= r-1 = + + d.f.= c-1 + d.f.= (r-1)(c-1) d.f.= rc(n’-1)
35
© 2002 Prentice-Hall, Inc. Chap 9-35 Two-Way ANOVA Total Variation Partitioning
36
© 2002 Prentice-Hall, Inc. Chap 9-36 Total Variation
37
© 2002 Prentice-Hall, Inc. Chap 9-37 Factor A Variation Sum of Squares Due to Factor A = the difference among the various levels of factor A and the grand mean
38
© 2002 Prentice-Hall, Inc. Chap 9-38 Factor B Variation Sum of Squares Due to Factor B = the difference among the various levels of factor B and the grand mean
39
© 2002 Prentice-Hall, Inc. Chap 9-39 Interaction Variation Sum of Squares Due to Interaction between A and B = the effect of the combinations of factor A and factor B
40
© 2002 Prentice-Hall, Inc. Chap 9-40 Random Error Sum of Squares Error = the differences among the observations within each cell and the corresponding cell means
41
© 2002 Prentice-Hall, Inc. Chap 9-41 Two-Way ANOVA: The F Test Statistic F Test for Factor B Main Effect F Test for Interaction Effect H 0 : 1. = 2. = = r. H 1 : Not all i. are equal H 0 : ij = 0 (for all i and j) H 1 : ij 0 H 0 : 1 = . 2 = = c H 1 : Not all . j are equal Reject if F > F U F Test for Factor A Main Effect
42
© 2002 Prentice-Hall, Inc. Chap 9-42 Two-Way ANOVA Summary Table Source of Variation Degrees of Freedom Sum of Squares Mean Squares F Statistic Factor A (Row) r – 1SSA MSA = SSA/(r – 1) MSA/ MSE Factor B (Column) c – 1SSB MSB = SSB/(c – 1) MSB/ MSE AB (Interaction) (r – 1)(c – 1)SSAB MSAB = SSAB/ [(r – 1)(c – 1)] MSAB/ MSE Error r c n ’ – 1) SSE MSE = SSE/[r c n ’ – 1)] Total r c n ’ – 1 SST
43
© 2002 Prentice-Hall, Inc. Chap 9-43 Features of Two-Way ANOVA F Test Degrees of freedom always add up rcn’-1=rc(n’-1)+(c-1)+(r-1)+(c-1)(r-1) Total=error+column+row+interaction The denominator of the F Test is always the same but the numerator is different. The sums of squares always add up Total=error+column+row+interaction
44
© 2002 Prentice-Hall, Inc. Chap 9-44 Kruskal-Wallis Rank Test for c Medians Extension of Wilcoxon rank-sum test Tests the equality of more than 2 (c) population medians Distribution-free test procedure Used to analyze completely randomized experimental designs Use 2 distribution to approximate if each sample group size n j > 5 df = c – 1
45
© 2002 Prentice-Hall, Inc. Chap 9-45 Kruskal-Wallis Rank Test Assumptions 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 two conditions Use F test in completely randomized designs and when the more stringent assumptions hold
46
© 2002 Prentice-Hall, Inc. Chap 9-46 Kruskal-Wallis Rank Test Procedure Obtain ranks 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 2
47
© 2002 Prentice-Hall, Inc. Chap 9-47 Kruskal-Wallis Rank Test Procedure Compute test statistic Number of observation in j –th sample H may be approximated by chi-square distribution with df = c –1 when each n j >5 (continued)
48
© 2002 Prentice-Hall, Inc. Chap 9-48 Kruskal-Wallis Rank Test Procedure Critical value for a given Upper tail Decision rule Reject H 0 : M 1 = M 2 = = m c if test statistic H > Otherwise do not reject H 0 (continued)
49
© 2002 Prentice-Hall, Inc. Chap 9-49 Machine1 Machine2 Machine3 25.40 23.40 20.00 26.31 21.80 22.20 24.10 23.50 19.75 23.74 22.75 20.60 25.10 21.60 20.40 Kruksal-Wallis Rank Test: Example As production manager, you want to see if three filling machines have different median filling times. You assign 15 similarly trained & experienced workers, five per machine, to the machines. At the.05 significance level, is there a difference in median filling times?
50
© 2002 Prentice-Hall, Inc. Chap 9-50 Machine1 Machine2 Machine3 14 9 2 15 6 7 12 10 1 11 8 4 13 5 3 Example Solution: Step 1 Obtaining a Ranking Raw DataRanks 6538 17 Machine1 Machine2 Machine3 25.40 23.40 20.00 26.31 21.80 22.20 24.10 23.50 19.75 23.74 22.75 20.60 25.10 21.60 20.40
51
© 2002 Prentice-Hall, Inc. Chap 9-51 Example Solution: Step 2 Test Statistic Computation
52
© 2002 Prentice-Hall, Inc. Chap 9-52 Kruskal-Wallis Test Example Solution H 0 : M 1 = M 2 = M 3 H 1 : Not all equal =.05 df = c - 1 = 3 - 1 = 2 Critical Value(s): Reject at Test Statistic: Decision: Conclusion: There is evidence that population medians are not all equal. =.05 H = 11.58
53
© 2002 Prentice-Hall, Inc. Chap 9-53 Kruskal-Wallis Test in PHStat PHStat | c-sample tests | Kruskal-Wallis rank sum test … Example solution in excel spreadsheet
54
© 2002 Prentice-Hall, Inc. Chap 9-54 Chapter Summary Described the completely randomized design: one-factor analysis of variance ANOVA assumptions F test for difference in c means The Tukey-Kramer procedure Described the factorial design: two-way analysis of variance Examine effects of factors and interaction Discussed Kruskal-Wallis rank test for differences in c medians
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.