© 2010 pearson prentice hall. all rights reserved the two factor anova

21
© 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

Post on 19-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

© 2010 Pearson Prentice Hall. All rights reserved

The Two Factor ANOVA

Page 2: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-2

Recall, there are two ways to deal with factors: (1) control the factors by fixing them at a single

level or by fixing them at different levels, and (2) randomize so that their effect on the

response variable is minimized.

In both the completely randomized design and the randomized complete block design, we manipulated one factor to see how varying it affected the response variable.

Page 3: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-3

In a Two-Way Analysis of Variance design, two factors are used to explain the variability in the response variable. We deal with the two factors by fixing them at different levels. We refer to the two factors as factor A and factor B. If factor A has n levels and factor B has m levels, we refer to the design as an factorial design.

n m

Page 4: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-4

Parallel Example 1: A 2 x 4 Factorial Design

Suppose the rice farmer is interested in comparing the fruiting period for not only the four fertilizer types, but for two different seed types as well. The farmer divides his plot into 16 identical subplots. He randomly assigns each seed/fertilizer combination to two of the subplots and obtains the fruiting periods shown on the following slide. Identify the main effects. What does it mean to say there is an interaction effect between the two factors?

Page 5: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-5

Fertilizer 1 Fertilizer 2 Fertilizer 3 Fertilizer 4

Seed Type A

13.513.9

13.514.1

15.214.7

17.116.4

Seed Type B

14.415.0

14.715.4

15.315.9

16.917.3

Page 6: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-6

SolutionThe two factors are A: fertilizer type and B: seed type. Since all levels of factor A are combined with all levels of factor B, we say that the factors are crossed. The main effect of factor A is the change in fruiting period that results from changing the fertilizer type.

The main effect of factor B is the change in fruiting period that results from changing the seed type.

We say that there is an interaction effect if the effect of fertilizer on fruiting period varies with seed type.

Page 7: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-7

1. The populations from which the samples are drawn must be normal.

2. The samples are independent.3. The populations all have the same variance.

Requirements for the Two-Way Analysis of Variance

Page 8: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-8

In a two-way ANOVA, we test three separate hypotheses.

Hypotheses Regarding Interaction Effect H0: there is no interaction effect between the factors H1: there is interaction between the factors

Hypotheses Regarding Main Effects H0: there is no effect of factor A on the response

variable H1: there is an effect of factor A on the response

variable H0: there is no effect of factor B on the response

variable H1: there is an effect of factor B on the response

variable

Page 9: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-9

Whenever conducting a two-way ANOVA, we always first test the hypothesis regarding interaction effect. If the null hypothesis of no interaction is rejected, we do not interpret the result of the hypotheses involving the main effects. This is because the interaction clouds the interpretation of the main effects.

Page 10: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-10

Parallel Example 3: Examining a Two-Way ANOVA

Recall the rice farmer who is interested in determiningthe effect of fertilizer and seed type on the fruitingperiod of rice. Assume that probability plots indicatethat it is reasonable to assume that the data come frompopulations that are normally distributed.a) Verify the requirement of equal population

variances.b) Use MINITAB to test whether there is an interaction

effect between fertilizer type and seed type.c) If there is no significant interaction, determine if

there is a significant difference in the means for i) the 4 fertilizersii) the 2 seed types

Page 11: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-11

Solution

a) The standard deviations for each treatment combination are given in the table below:

Fertilizer 1 Fertilizer 2 Fertilizer 3 Fertilizer 4

Seed Type A 0.283 0.424 0.354 0.495

Seed Type B 0.424 0.495 0.424 0.283

Since the largest standard deviation, 0.495, is not more than twice the smallest standard deviation, 0.283, the assumption of equal variances is met.

Page 12: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-12

Step 1: Compute the mean value of the response variable within each cell. In addition, compute the row mean value of the response variable and the column mean value of the response variable with each level of each factor.

Step 2: In a Cartesian plane, label the horizontal axis for each level of factor A. The vertical axis will represent the mean value of the response variable. For each level of factor A, plot the mean value of the response variable for each level of factor B. Draw straight lines connecting the points for the common level of factor B. You should have as many lines as there are levels of factor B. The more difference there is in the slopes of the two lines, the stronger the evidence of interaction.

Constructing Interaction Plots

Page 13: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-13

Parallel Example 4: Drawing an Interaction Plot

Draw an interaction plot for the data from the rice farmer example.

Fertilizer 1 Fertilizer 2 Fertilizer 3 Fertilizer 4

Seed Type A 13.7 13.8 14.95 16.75

Seed Type B 14.7 15.05 15.6 17.1

The cell means are given in the table below.

Page 14: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-14

Note that the lines have fairly similar slopes between points which indicates there may be no interaction between fertilizer and seed type.

Page 15: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-15

SolutionMINITAB output:Analysis of Variance for Fruiting period

Source DF SS MS F PFertilizer 3 18.3269 6.1090 37.16 0.000Seed 1 2.6406 2.6406 16.06 0.004Fert*Seed 3 0.4669 0.1556 0.95 0.463Error 8 1.3150 1.3150 0.1644Total 15 22.7494

b) The P-value for the interaction term is 0.463 > 0.05, so we fail to reject the null hypothesis and conclude that there is no interaction effect.

Now that the interaction is non-significant we can look a the test for main effects from fertilizer and seed types.

Page 16: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-16

Solutionc)

i) Since the P-value for fertilizer is given as 0.000, we reject the null hypothesis and conclude that the mean fruiting period is different for at least one of the 4 types of fertilizer.ii) Since the P-value for seed type is found to be 0.004, we reject the null hypothesis and conclude that the mean fruiting period is different for the two seed types.

Page 17: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-17

SolutionWith the significance in main effects due to the

fertilizer type we can construct the Tukey Intevals to determine what differences exist between pairwise means.

Page 18: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

13-18

SolutionTukey 95.0% Simultaneous Confidence IntervalsResponse Variable Fruiting periodAll Pairwise Comparisons among Levels of Fertilizer

Fertilizer = 1 subtracted from:Fertilizer Lower Center Upper ------+---------+---------+---------+2 -0.6933 0.2250 1.143 (-------*-------)3 0.1567 1.0750 1.993 (-------*-------)4 1.8067 2.7250 3.643 (-------*------) ------+---------+---------+---------+ 0.0 1.2 2.4 3.6

Fertilizer = 2 subtracted from:Fertilizer Lower Center Upper ------+---------+---------+---------+3 -0.06830 0.8500 1.768 (-------*-------)4 1.58170 2.5000 3.418 (-------*------) ------+---------+---------+---------+ 0.0 1.2 2.4 3.6

Fertilizer = 3 subtracted from:Fertilizer Lower Center Upper ------+---------+---------+---------+4 0.7317 1.650 2.568 (-------*------) ------+---------+---------+---------+ 0.0 1.2 2.4 3.6

Page 19: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

Results

Fertilizers 1 and 2 are not significantly different. Fertilizers 2 and 3 are not significantly different. All other pairwise comparisons are significant.

It seems that fertilizer 4 results in the greatest fruiting period of the rice.

4321

Page 20: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

We do not have to worry about the Tukey comparisons for the seed type since there are only two seed varieties used, we know they are different. It seems that seed variety b has a larger fruiting period.

Page 21: © 2010 Pearson Prentice Hall. All rights reserved The Two Factor ANOVA

The “Grand” Conclusion

To achieve the longest fruiting period we will want to plant seed type b using fertilizer number 4.