Presentation is loading. Please wait.

Presentation is loading. Please wait.

Statistics for Managers Using Microsoft Excel 3rd Edition

Similar presentations


Presentation on theme: "Statistics for Managers Using Microsoft Excel 3rd Edition"— Presentation transcript:

1 Statistics for Managers Using Microsoft Excel 3rd Edition
Chapter 9 Analysis of Variance © 2002 Prentice-Hall, Inc.

2 Chapter Topics 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 © 2002 Prentice-Hall, Inc.

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 © 2002 Prentice-Hall, Inc.

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) © 2002 Prentice-Hall, Inc.

5 Randomized Design Example
Factor (Training Method) Factor Levels (Treatments) Randomly Assigned Units Dependent Variable (Response) 21 hrs 17 hrs 31 hrs 27 hrs 25 hrs 28 hrs 29 hrs 20 hrs 22 hrs    © 2002 Prentice-Hall, Inc.

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 © 2002 Prentice-Hall, Inc.

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 - a) k e.g.: If there are 5 means and use a = .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! © 2002 Prentice-Hall, Inc.

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 © 2002 Prentice-Hall, Inc.

9 One-Factor ANOVA (No Treatment Effect)
The Null Hypothesis is True © 2002 Prentice-Hall, Inc.

10 One-Factor ANOVA (Treatment Effect Present)
The Null Hypothesis is NOT True © 2002 Prentice-Hall, Inc.

11 One-Factor ANOVA (Partition of Total Variation)
Total Variation SST Variation Due to Treatment SSA + Variation Due to Random Sampling SSW = 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 Commonly referred to as: Sum of Squares Within Sum of Squares Error Sum of Squares Unexplained Within Groups Variation © 2002 Prentice-Hall, Inc.

12 Total Variation © 2002 Prentice-Hall, Inc.

13 Total Variation (continued) © 2002 Prentice-Hall, Inc.

14 Among-Group Variation
Variation Due to Differences Among Groups. © 2002 Prentice-Hall, Inc.

15 Among-Group Variation
(continued) © 2002 Prentice-Hall, Inc.

16 Within-Group Variation
Summing the variation within each group and then adding over all groups. © 2002 Prentice-Hall, Inc.

17 Within-Group Variation
(continued) © 2002 Prentice-Hall, Inc.

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. © 2002 Prentice-Hall, Inc.

19 One-Factor ANOVA F Test Statistic
MSA is mean squares among or between variances MSW is mean squares within or error variances Degrees of freedom © 2002 Prentice-Hall, Inc.

20 One-Factor ANOVA Summary Table
Source of Variation Degrees of Freedom Sum of Squares Mean Squares (Variance) F Statistic Among (Factor) c – 1 SSA MSA = SSA/(c – 1 ) MSA/MSW Within (Error) n – c SSW MSW = SSW/(n – c ) Total n – 1 SST = SSA + SSW © 2002 Prentice-Hall, Inc.

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 Df1 = c -1 will typically be small Df2 = n - c will typically be large The ratio should be closed to 1 if the null is true © 2002 Prentice-Hall, Inc.

22 Features of One-Factor ANOVA F Statistic
(continued) The numerator is expected to be greater than the denominator The ratio will be larger than 1 if the null is false © 2002 Prentice-Hall, Inc.

23 One-Factor ANOVA F Test Example
Machine1 Machine2 Machine 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? © 2002 Prentice-Hall, Inc.

24 One-Factor ANOVA Example: Scatter Diagram
Machine1 Machine2 Machine Time in Seconds 27 26 25 24 23 22 21 20 19 © 2002 Prentice-Hall, Inc.

25 One-Factor ANOVA Example Computations
Machine1 Machine2 Machine © 2002 Prentice-Hall, Inc.

26 Mean Squares (Variance)
Summary Table Source of Variation Degrees of Freedom Sum of Squares Mean Squares (Variance) F Statistic Among (Factor) 3-1=2 MSA/MSW =25.60 Within (Error) 15-3=12 .9211 Total 15-1=14 © 2002 Prentice-Hall, Inc.

27 One-Factor ANOVA Example Solution
Test Statistic: Decision: Conclusion: H0: 1 = 2 = 3 H1: Not All Equal  = .05 df1= df2 = 12 Critical Value(s): MSA 23 . 5820 F 25 . 6 MSW . 9211 Reject at  = 0.05  = 0.05 There is evidence that at least one  i differs from the rest. F 3.89 © 2002 Prentice-Hall, Inc.

28 Solution In EXCEL Use tools | data analysis | ANOVA: single factor
EXCEL worksheet that performs the one-factor ANOVA of the example © 2002 Prentice-Hall, Inc.

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 f(X) X = 1 2 3 © 2002 Prentice-Hall, Inc.

30 The Tukey-Kramer Procedure: Example
1. Compute absolute mean differences: Machine1 Machine2 Machine 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. © 2002 Prentice-Hall, Inc.

31 Solution in PHStat Use PHStat | c-sample tests | Tukey-Kramer procedure … EXCEL worksheet that performs the Tukey-Kramer procedure for the previous example © 2002 Prentice-Hall, Inc.

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? © 2002 Prentice-Hall, Inc.

33 Two-Way ANOVA Assumptions Normality Homogeneity of Variance
(continued) Assumptions Normality Populations are normally distributed Homogeneity of Variance Populations have equal variances Independence of Errors Independent random samples are drawn © 2002 Prentice-Hall, Inc.

34 Two-Way ANOVA Total Variation Partitioning
+ Variation Due to Treatment A SSA d.f.= r-1 SSB + Variation Due to Treatment B d.f.= c-1 Total Variation SSAB + Variation Due to Interaction SST = d.f.= (r-1)(c-1) d.f.= n-1 SSE Variation Due to Random Sampling d.f.= rc(n’-1) © 2002 Prentice-Hall, Inc.

35 Two-Way ANOVA Total Variation Partitioning
© 2002 Prentice-Hall, Inc.

36 Total Variation © 2002 Prentice-Hall, Inc.

37 Factor A Variation Sum of Squares Due to Factor A
= the difference among the various levels of factor A and the grand mean © 2002 Prentice-Hall, Inc.

38 Factor B Variation Sum of Squares Due to Factor B
= the difference among the various levels of factor B and the grand mean © 2002 Prentice-Hall, Inc.

39 Interaction Variation
Sum of Squares Due to Interaction between A and B = the effect of the combinations of factor A and factor B © 2002 Prentice-Hall, Inc.

40 Random Error Sum of Squares Error
= the differences among the observations within each cell and the corresponding cell means © 2002 Prentice-Hall, Inc.

41 Two-Way ANOVA: The F Test Statistic
F Test for Factor A Main Effect H0: 1 .= 2 . = ••• = r . H1: Not all i . are equal Reject if F > FU F Test for Factor B Main Effect H0: 1 = . 2 = ••• =  c H1: Not all . j are equal Reject if F > FU F Test for Interaction Effect H0: ij = 0 (for all i and j) H1: ij  0 Reject if F > FU © 2002 Prentice-Hall, Inc.

42 Two-Way ANOVA Summary Table
Source of Variation Degrees of Freedom Sum of Squares Mean Squares F Statistic Factor A (Row) r – 1 SSA MSA = SSA/(r – 1) MSA/ MSE Factor B (Column) c – 1 SSB 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 © 2002 Prentice-Hall, Inc.

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 © 2002 Prentice-Hall, Inc.

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 nj > 5 df = c – 1 © 2002 Prentice-Hall, Inc.

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 © 2002 Prentice-Hall, Inc.

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 tj2 © 2002 Prentice-Hall, Inc.

47 Kruskal-Wallis Rank Test Procedure
(continued) Compute test statistic Number of observation in j –th sample H may be approximated by chi-square distribution with df = c –1 when each nj >5 © 2002 Prentice-Hall, Inc.

48 Kruskal-Wallis Rank Test Procedure
(continued) Critical value for a given a Upper tail Decision rule Reject H0: M1 = M2 = ••• = mc if test statistic H > Otherwise do not reject H0 © 2002 Prentice-Hall, Inc.

49 Kruksal-Wallis Rank Test: Example
Machine1 Machine2 Machine 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? © 2002 Prentice-Hall, Inc.

50 Example Solution: Step 1 Obtaining a Ranking
Raw Data Ranks Machine1 Machine2 Machine Machine1 Machine2 Machine 65 38 17 © 2002 Prentice-Hall, Inc.

51 Example Solution: Step 2 Test Statistic Computation
© 2002 Prentice-Hall, Inc.

52 Kruskal-Wallis Test Example Solution
H0: M1 = M2 = M3 H1: Not all equal  = .05 df = c - 1 = = 2 Critical Value(s): Test Statistic: H = 11.58 Decision: Reject at  = .05 Conclusion:  = .05 There is evidence that population medians are not all equal. © 2002 Prentice-Hall, Inc.

53 Kruskal-Wallis Test in PHStat
PHStat | c-sample tests | Kruskal-Wallis rank sum test … Example solution in excel spreadsheet © 2002 Prentice-Hall, Inc.

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 © 2002 Prentice-Hall, Inc.


Download ppt "Statistics for Managers Using Microsoft Excel 3rd Edition"

Similar presentations


Ads by Google