Unformatted text preview: TwoWay Analysis of Variance
Section 11.2 TwoWay ANOVA 1 TwoWay ANOVA Earlier we classified the data one way (by dimple design or by hospital). In some problems, there may be several experimental factors and the data can be classified several ways. The ANOVA procedure can be extended to this. TwoWay ANOVA 2 The parachute factory Four suppliers manufacture the synthetic thread we use to weave parachutes in our factory. We use two types of looms, the Jetta and the Turk. We want to know if the fabric strength depends on supplier, on loom, or if it is combinations of supplier and loom.
TwoWay ANOVA 3 Brake job promotion A chain of auto stores puts their standard brake job on sale. In some places, they promote a lower labor price. In some, a lower parts price. Some others just promote the lower total price. Which works best? Is it the same across the country, or does it depend on region?
TwoWay ANOVA 4 The TwoWay Design We allow for potential differences due to different levels of factor A. We also allow for potential differences due to different levels of factor B. We also recognize that these differences may not be consistent so combinations of factor A and B may be what matters. TwoWay ANOVA 5 Notation Let's say there are c levels of factor B. r levels of factor A and We thus have a total of rc combinations of the two factors. We will only look at problems where there are more than one observation for each combination, call it n' replicates per cell.
TwoWay ANOVA 6 Data organization
Data are organized in a rectangle. 1. There will be c columns, one for each level of factor B. 2. Each of the r levels of factor A will have a "sample" of n' rows. 3. There are thus r n' total rows of data. TwoWay ANOVA 7 Parachute2.xls
Loom Type Jetta Jetta Jetta Jetta Jetta Turk Turk Turk Turk Turk Supplier 1 Supplier 2 Supplier 3 Supplier 4 20.6 22.6 27.7 21.5 18.0 24.6 18.6 20.0 19.0 19.6 20.8 21.1 21.3 23.8 25.1 23.9 13.2 27.1 17.7 16.0 18.5 26.3 20.6 25.4 24.0 25.3 25.2 19.9 17.2 24.0 20.8 22.6 19.9 21.2 24.7 17.5 18.0 24.5 22.9 20.4 c = 4, r = 2 and n' = 5
TwoWay ANOVA 8 Means plot A good exploratory tool is to plot the average value of x that occurs at each combination of factors. The average x goes on the vertical axis and one of the factors on the horizontal axis. Use lines to connect the means for the other factor. If the lines are roughly parallel, it is a signal that there is no interaction.
TwoWay ANOVA 9 Table of means
Part of the TwoWay output:
SUMMARY
Jetta Supplier 1 5 92.1 18.42 10.202 Supplier 2 5 117.7 23.54 7.568 Supplier 3 5 109.9 21.98 18.397 Supplier 4 Total Count Sum Average Variance
Turk 5 20 102.5 422.2 20.5 21.11 8.355 13.12832 Count Sum Average Variance 5 97.6 19.52 7.237 5 121.3 24.26 3.683 5 114.2 22.84 4.553 5 20 105.8 438.9 21.16 21.945 8.903 8.462605 TwoWay ANOVA 10 Plot of means
C e l l M e a ns P l ot 25 23 21 j etta t ur k 19 17 15 Sup p l i e r 1 Su p p l i e r 2 Su p p l i e r 3 Su pp l i e r 4 TwoWay ANOVA 11 Quick Impressions The Turk looms produce slightly stronger fabric, but not by much. There are supplier differences, with # 2 looking like the winner. The supplier differences do not depend on loom type. TwoWay ANOVA 12 Sources of variation We have 2x4 = 8 samples of size 5. The betweensample variation is more complicated since it can be due to different suppliers, different looms, or different combinations of the supplier and loom (interaction). There are three tests, one for each of these sources.
TwoWay ANOVA 13 Interaction Interaction means the value of one factor changes the "pecking order" of the other factor. For example, if supplier 1 was better for Turk looms but worst for Jetta looms. When there is interaction, the mean lines will not be parallel. TwoWay ANOVA 14 Interaction vs. No Interaction
No interaction:
Block Level 1 Mean Response Block Level 1 Block Level 2 Block Level 3 Block Level 3 Block Level 2 Interaction is present: Mean Response A B Groups C A
TwoWay ANOVA B Groups C
15 ANOVA Output
ANOVA Source of Variation Sample Columns Interaction Within Total SS 6.97225 134.34875 0.28675 275.592 417.19975 df 1 3 3 32 39 MS F Pvalue F crit 6.97225 0.8095736 0.3749678 4.1490974 44.782917 5.199909 0.0048662 2.9011196 0.0955833 0.0110985 0.9983646 2.9011196 8.61225 Gory details on pages 397399. 2. "Sample" refers to the factor arrayed across the rows (loom type).
1.
TwoWay ANOVA 16 Test Results
1. 1. No interaction effect (F = 0.011). There is no loom effect (on the row labeled "Sample" the F = 0.809) There are significant differences due to suppliers (on the row labeled "Columns" the F = 5.199)
TwoWay ANOVA 17 1. Tukey comparisons If there is at most "mild" interaction, you can look for significant differences in factor levels with a Tukey procedure. then declares anything above that significant. It again figures out the "critical range" and We can apply it here to determine which suppliers are significantly better or worse.
TwoWay ANOVA 18 Critical range for column differences
We have c column levels and each one has a total of r n' observations. Compute: CR = Q MSE r n Get Q from the studentized range table with c and rc(n'1) degrees of freedom. MSE is from the ANOVA table (within groups).
TwoWay ANOVA 19 Table of means again
SUMMARY
jetta 1 5 92.1 18.42 10.202
turk 2 5 117.7 23.54 7.568 3 5 109.9 21.98 18.397 4 Total 5 20 102.5 422.2 20.5 21.11 8.355 13.12832 Count Sum Average Variance Count Sum Average Variance
Total 5 97.6 19.52 7.237 5 121.3 24.26 3.683 5 114.2 22.84 4.553 5 20 105.8 438.9 21.16 21.945 8.903 8.462605 Count Sum Average Variance 10 189.7 18.97 8.0868 10 239 23.9 5.1444 10 224.1 22.41 10.4054 10 208.3 20.83 7.7912 r n'
xbars
20 TwoWay ANOVA What difference is significant?
CR = Q
c = ____ MSE r n =? r n' = ____ Q has c and rc(n'1) df = ____ MSE = ____
TwoWay ANOVA 21 Brake job promotion The price of a brake job was reduced by $50. This was advertised with either a discount on labor, parts or the total price. Which worked best? Did it depend on what region of the country we looked at? There was a sample of 10 stores in each combination of region and promotion strategy BrakeJobPromotion.xls
TwoWay ANOVA 22 Means Plot
700 600 500 Sales Increase 400 LaborPriceAvg PartsPriceAvg TotalPriceAvg 300 200 100 0 MidWest NorthEast Region South West What impressions do we get from this?
TwoWay ANOVA 23 ANOVA and test results
ANOVA Source of Variation Sample Columns Interaction Within Total SS 874348 257226.8 499559.8 3505265 5136400 df 2 3 6 108 119 MS 437174.01 85742.28 83259.97 32456.16 F 13.4697 2.6418 2.5653 Pvalue 0.0000 0.0530 0.0232 F crit 3.0804 2.6887 2.1837 Interaction test Column (Region) effect test 3. Row (Promotion Type) effect test
1. 2. TwoWay ANOVA 24 Is there an optimal policy? Do sales increases depend on region? For promotion type, what is the Tukey critical range? Is there an optimal type of promotion? TwoWay ANOVA 25 Table of means SUMMARY
LaborPrice MidWest NorthEast South 10 6656.00 665.60 42187.16 West 10 4519.00 451.90 18549.88 Total 40 19560.00 489.00 46558.82 Count Sum LaborPriceAvg Variance
PartsPrice 10 10 2963.00 5422.00 296.30 542.20 8554.46 51877.29 Count Sum PartsPriceAvg Variance
TotalPrice 10 10 3468.00 3563.00 346.80 356.30 19143.96 27914.23 10 3623.00 362.30 36192.68 10 3362.00 336.20 29533.51 40 14016.00 350.40 26127.43 Count Sum TotalPriceAvg Variance
Total 10 10 2911.00 2400.00 291.10 240.00 14332.54 28941.33 10 2966.00 296.60 61071.16 10 3088.00 308.80 51175.73 40 11365.00 284.13 36597.14 Count Sum Average Variance 30 30 30 30 9342 11385 13245 10969 311.4 379.5 441.5 365.633333 13696.94 49768.74 69998.397 34783.2747 TwoWay ANOVA 26 Severe Interaction Here we had "mild" interaction, but could still see the main factor effects. When there is strong interaction, it sometimes is hard to see factor effects. Here is a different version of this problem where things are not so clear.
TwoWay ANOVA 27 Means plot with strong interaction
700 600 500 Sales Increase 400 300 200 100 0 MidWest NorthEast Region South West LaborPriceAvg PartsPriceAvg TotalPriceAvg TwoWay ANOVA 28 ANOVA and test results
ANOVA Source of Variation Sample Columns Interaction Within Total SS 353303 631958.5 2447098 3505265 6937625 df 2 3 6 108 119 MS 176651.51 210652.83 407849.70 32456.16 F 5.4428 6.4904 12.5662 Pvalue 0.0056 0.0004 0.0000 F crit 3.0804 2.6887 2.1837 Interaction test Column (Region) effect test 3. Row (Promotion Type) effect test
1. 2. TwoWay ANOVA 29 Table of means SUMMARY
LaborPrice MidWest 10 3663.00 366.30 8554.46 NorthEast South 10 3922.00 392.20 51877.29 10 6656.00 665.60 42187.16 West 10 2019.00 201.90 18549.88 Total 40 16260.00 406.50 56376.00 Count Sum LaborPriceAvg Variance
PartsPrice Count Sum PartsPriceAvg Variance
TotalPrice 10 6468.00 646.80 19143.96 10 1063.00 106.30 27914.23 10 1123.00 112.30 36192.68 10 3362.00 336.20 29533.51 40 12016.00 300.40 75855.63 Count Sum TotalPriceAvg Variance
Total 10 2911.00 291.10 14332.54 10 2400.00 240.00 28941.33 10 2966.00 296.60 61071.16 10 3088.00 308.80 51175.73 40 11365.00 284.13 36597.14 Count Sum Average Variance 30 13042 434.73 37280.62 30 7385 246.17 47857.25 30 10745 358.17 98021.39 30 8469 282.30 34277.53 TwoWay ANOVA 30 Now is there an optimal policy? First, can we do Tukey comparisons? Do sales increases depend on region? Is there an optimal type of promotion? TwoWay ANOVA 31 ...
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.
 Spring '08
 Thompson

Click to edit the document details