Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © Cengage Learning. All rights reserved. 11 Multifactor Analysis of Variance.

Similar presentations


Presentation on theme: "Copyright © Cengage Learning. All rights reserved. 11 Multifactor Analysis of Variance."— Presentation transcript:

1 Copyright © Cengage Learning. All rights reserved. 11 Multifactor Analysis of Variance

2 Copyright © Cengage Learning. All rights reserved. 11.1 Two-Factor ANOVA with K ij = 1

3 3 When factor A consists of I levels and factor B consists of J levels, there are IJ different combinations (pairs) of levels of the two factors, each called a treatment. With K ij = the number of observations on the treatment consisting of factor A at level i and factor B at level j, we restrict attention in this section to the case K ij = 1, so that the data consists of IJ observations. Our focus is on the fixed effects model, in which the only levels of interest for the two factors are those actually represented in the experiment. Situations in which at least one factor is random are discussed briefly at the end of the section.

4 4 Example 1 Is it really as easy to remove marks on fabrics from erasable pens as the word erasable might imply? Consider the following data from an experiment to compare three different brands of pens and four different wash treatments with respect to their ability to remove marks on a particular type of fabric (based on “An Assessment of the Effects of Treatment, Time, and Heat on the Removal of Erasable Pen Marks from Cotton and Cotton/Polyester Blend Fabrics,” J. of Testing and Evaluation, 1991: 394–397).

5 5 Example 1 The response variable is a quantitative indicator of overall specimen color change; the lower this value, the more marks were removed. Is there any difference in the true average amount of color change due either to the different brands of pens or to the different washing treatments? cont’d

6 6 Two-Factor ANOVA with K ij = 1 As in single-factor ANOVA, double subscripts are used to identify random variables and observed values. Let X ij = the random variable (rv) denoting the measurement when factor A is held at level i and factor B is held at level j x ij = the observed value of X ij The x ij ’s are usually presented in a rectangular table in which the various rows are identified with the levels of factor A and the various columns with the levels of factor B.

7 7 Two-Factor ANOVA with K ij = 1 In the erasable-pen experiment of Example 1, the number of levels of factor A is I = 3, the number of levels of factor B is J = 4, x 13 =.48, x 22 =.14, and so on. Whereas in single-factor ANOVA we were interested only in row means and the grand mean, now we are interested also in column means. Let X i. = the average of measurements obtained when factor A is held at level i

8 8 Two-Factor ANOVA with K ij = 1 X. j = the average of measurements obtained when factor B is held at level j X.. = the grand mean with observed values x i., x. j, and x.. Totals rather than averages are denoted by omitting the horizontal bar (so etc.). Intuitively, to see whether there is any effect due to the levels of factor A, we should compare the observed x i.’s with one another. Information about the different levels of factor B should come from the x. j ’s.

9 9 The Fixed Effects Model

10 10 The Fixed Effects Model Proceeding by analogy to single-factor ANOVA, one’s first inclination in specifying a model is to let  ij = the true average response when factor A is at level i and factor B at level j. This results in IJ mean parameters. Then let X ij =  ij +  ij where  ij is the random amount by which the observed value differs from its expectation. The  ij ’s are assumed normal and independent with common variance  2. Unfortunately, there is no valid test procedure for this choice of parameters.

11 11 The Fixed Effects Model This is because there are IJ + 1 parameters (the  ij ’s and  2 ) but only IJ observations, so after using each x ij as an estimate of  ij, there is no way to estimate  2.

12 12 The Fixed Effects Model The following alternative model is realistic yet involves relatively few parameters. Assume the existence of I parameters  1,  2, …,  I and J parameters  1,  2, …,  J, such that X ij =  i +  j +  ij (i = 1, … I, j = 1, …, J) so that  ij =  i +  j (11.1) (11.2)

13 13 The Fixed Effects Model Including  2, there are now I + J + 1 model parameters, so if I  3 and J  3, then there will be fewer parameters than observations (in fact, we will shortly modify (11.2) so that even I = 2 and/or J = 2 will be accommodated). The model specified in (11.1) and (11.2) is called an additive model because each mean response  ij is the sum of an effect due to factor A at level i (  i ) and an effect due to factor B at level j(  j ).

14 14 The Fixed Effects Model The difference between mean responses for factor A at level i and level i when B is held at level j is  ij –  ij.  ij –  ij = (  i +  j ) – (  i +  j ) =  i –  i which is independent of the level j of the second factor. A similar result holds for  ij –  ij. Thus additivity means that the difference in mean responses for two levels of one of the factors is the same for all levels of the other factor.

15 15 The Fixed Effects Model Figure 11.1(a) shows a set of mean responses that satisfy the condition of additivity. A nonadditive configuration is illustrated in Figure 11.1(b). Figure 11.1 Mean responses for two types of model: (a) additive; (b) nonadditive (a) (b)

16 16 Example 2 Example 1 continued … Plotting the observed x ij ’s in a manner analogous to that of Figure 11.1 results in Figure 11.2. Figure 11.1 Plot of data from Example 11.1

17 17 Example 2 Example 1 continued … Although there is some “crossing over” in the observed x ij ’s, the pattern is reasonably representative of what would be expected under additivity with just one observation per treatment. Expression (11.2) is not quite the final model description because the  i ’s and  j ’s are not uniquely determined.

18 18 Example 2 Example 1 continued … Here are two different configurations of the  i ’s and  j ’s that yield the same additive  ij ’s: By subtracting any constant c from all  i ’s and adding c to all  j ’s, other configurations corresponding to the same additive model are obtained. This nonuniqueness is eliminated by use of the following model. cont’d

19 19 Example 2 Example 1 continued … X ij =  +  i +  j +  ij where and the  ij ’s are assumed independent, normally distributed, with mean 0 and common variance  2. This is analogous to the alternative choice of parameters for single-factor ANOVA discussed earlier. cont’d (11.3)

20 20 Example 2 Example 1 continued … It is not difficult to verify that (11.3) is an additive model in which the parameters are uniquely determined (for example, for the  ij ’s mentioned previously:  = 4,  1 = –.5,  2 =.5,  1 = –1.5 and  2 = 1.5). Notice that there are only I – 1 independently determined  i ’s and J – 1 independently determined  j ’s. Including , (11.3) specifies I + J – 1 mean parameters. cont’d

21 21 Example 2 Example 1 continued … The interpretation of the parameters in (11.3) is straightforward:  is the true grand mean (mean response averaged over all levels of both factors),  i is the effect of factor A at level i (measured as a deviation from  ), and  j is the effect of factor B at level j. Unbiased (and maximum likelihood) estimators for these parameters are cont’d

22 22 Example 2 Example 1 continued … There are two different null hypotheses of interest in a two- factor experiment with K ij = 1. The first, denoted by H 0A, states that the different levels of factor A have no effect on true average response. The second, denoted by H 0B, asserts that there is no factor B effect. cont’d

23 23 Example 2 Example 1 continued … H 0A :  1 =  2 = … =  I = 0 versus H aA : at least one  i  0 H 0B :  1 =  2 = … =  J = 0 versus H aB : at least one  j  0 (No factor A effect implies that all  i ’s are equal, so they must all be 0 since they sum to 0, and similarly for the  j ’s.) cont’d (11.4)

24 24 Test Procedures

25 25 Test Procedures The description and analysis follow closely that for single- factor ANOVA. There are now four sums of squares, each with an associated number of df:

26 26 Test Procedures The fundamental identity is SST = SSA + SSB + SSE (11.5) (11.6)

27 27 Test Procedures There are computing formulas for SST, SSA, and SSB analogous to those given in earlier chapter for single-factor ANOVA. But the wide availability of statistical software has rendered these formulas almost obsolete. The expression for SSE results from replacing ,  i, and  j by their estimators in Error df is IJ – number of mean parameters estimated = IJ – [1 + (I – 1) + (J – 1)] = (I – 1)(J – 1).

28 28 Test Procedures Total variation is split into a part (SSE) that is not explained by either the truth or the falsity of H 0A or H 0B and two parts that can be explained by possible falsity of the two null hypotheses. Statistical theory now says that if we form F ratios as in single-factor ANOVA, when H 0A (H 0B ) is true, the corresponding F ratio has an F distribution with numerator df = I – 1 (J – 1) and denominator df = (I – 1)(J – 1).

29 29 Test Procedures Hypotheses Test Statistic Value Rejection Region H 0A versus H aA f A  F , I – 1,(I – 1)(J – 1) H 0B versus H aB f B  F , J – 1,(I – 1)(J – 1)

30 30 Example 3 Example 2 continued … The x i.’s and x. j ’s for the color-change data are displayed along the margins of the data table given previously. Table 11.1 summarizes the calculations. Table 11.1 ANOVA Table for Example 3

31 31 Example 3 Example 2 continued … The critical value for testing H 0A at level of significance.05 is F.05,2,6 = 5.14. Since 4.43  5.14, H 0A cannot be rejected at significance level.05. True average color change does not appear to depend on the brand of pen. Because F.05,3,6 = 4.76 and 11.05  4.76, H 0B is rejected at significance level.05 in favor of the assertion that color change varies with washing treatment. A statistical computer package gives P-values of.066 and.007 for these two tests. cont’d

32 32 Test Procedures Plausibility of the normality and constant variance assumptions can be investigated graphically. Define predicted values (also called fitted values) x.. + (x i. – x..) + (x. j – x..) = x i. + x. j – x.., and the residuals (the differences between the observations and predicted values). We can check the normality assumption with a normal probability plot of the residuals, and the constant variance assumption with a plot of the residuals against the fitted values.

33 33 Test Procedures Figure 11.3 shows these plots for the data of Example 11.3. Figure 11.3 Diagnostic plots from Minitab for Example 11.3 (b)(a)

34 34 Test Procedures The normal probability plot is reasonably straight, so there is no reason to question normality for this data set. On the plot of the residuals against the fitted values, look for substantial variation in vertical spread when moving from left to right. For example, a narrow range for small fitted values and a wide range for high fitted values would suggest that the variance is higher for larger responses (this happens often, and it can sometimes be cured by replacing each observation by its logarithm). Figure 11.3(b) shows no evidence against the constant variance assumption.

35 35 Expected Mean Squares

36 36 Expected Mean Squares The plausibility of using the F tests just described is demonstrated by computing the expected mean squares. For the additive model,

37 37 Expected Mean Squares If H 0A is true, MSA is an unbiased estimator of  2, so F is a ratio of two unbiased estimators of  2. When H 0A is false, MSA tends to overestimate  2. Thus H 0A should be rejected when the ratio F A is too large. Similar comments apply to MSB and H 0B.

38 38 Multiple Comparisons

39 39 Multiple Comparisons After rejecting either H 0A or H 0B, Tukey’s procedure can be used to identify significant differences between the levels of the factor under investigation. 1. For comparing levels of factor A, obtain Q ,I,(I – 1)(J – 1). For comparing levels of factor B, obtain Q ,J,(I – 1)(J – 1). 2. Compute w = Q  (estimated standard deviation of the sample (because, e.g., the standard deviation of X i is

40 40 Multiple Comparisons 3. Arrange the sample means in increasing order, underscore those pairs differing by less than w, and identify pairs not underscored by the same line as corresponding to significantly different levels of the given factor.

41 41 Example 4 Example 3 continued … Identification of significant differences among the four washing treatments requires Q.05,4,6 = 4.90 and w = =.340. The four factor B sample means (column averages) are now listed in increasing order, and any pair differing by less than.340 is underscored by a line segment:

42 42 Example 4 Example 3 continued … Washing treatment 1 appears to differ significantly from the other three treatments, but no other significant differences are identified. In particular, it is not apparent which among treatments 2, 3, and 4 is best at removing marks.

43 43 Randomized Block Experiments

44 44 Randomized Block Experiments In using single-factor ANOVA to test for the presence of effects due to the I different treatments under study, once the IJ subjects or experimental units have been chosen, treatments should be allocated in a completely random fashion. That is, J subjects should be chosen at random for the first treatment, then another sample of J chosen at random from the remaining IJ – J subjects for the second treatment, and so on.

45 45 Randomized Block Experiments It frequently happens, though, that subjects or experimental units exhibit heterogeneity with respect to other characteristics that may affect the observed responses. Then, the presence or absence of a significant F value may be due to this extraneous variation rather than to the presence or absence of factor effects. This is why paired experiments were introduced earlier. The analogy to a paired experiment when I > 2 is called a randomized block experiment. An extraneous factor, “blocks,” is constructed by dividing the IJ units into J groups with I units in each group.

46 46 Randomized Block Experiments This grouping or blocking should be done so that within each block, the I units are homogeneous with respect to other factors thought to affect the responses. Then within each homogeneous block, the I treatments are randomly assigned to the I units or subjects.

47 47 Example 5 A consumer product-testing organization wished to compare the annual power consumption for five different brands of dehumidifier. Because power consumption depends on the prevailing humidity level, it was decided to monitor each brand at four different levels ranging from moderate to heavy humidity (thus blocking on humidity level). Within each level, brands were randomly assigned to the five selected locations.

48 48 Example 5 The resulting observations (annual kWh) appear in Table 11.2, and the ANOVA calculations are summarized in Table 11.3. cont’d Table 11.2 Power Consumption Data for Example 5

49 49 Example 5 Since F.05,4,12 = 3.26 and f A = 95.57  3.26, H 0 is rejected in favor of H a. Power consumption appears to depend on the brand of humidifier. cont’d Table 11.3 ANOVA Table for Example 5

50 50 Example 5 To identify significantly different brands, we use Tukey’s procedure. Q.05,5,12 = 4.51 and The underscoring indicates that the brands can be divided into three groups with respect to power consumption. cont’d

51 51 Example 5 Because the block factor is of secondary interest, F.05,3,12 is not needed, though the computed value of FB is clearly highly significant. Figure 11.4 shows SAS output for this data. At the top of the ANOVA table, the sums of squares (SSs) for treatments (brands) and blocks (humidity levels) are combined into a single “model” SS. cont’d

52 52 Example 5 cont’d Figure 11.4 SAS output for power consumption data

53 53 Randomized Block Experiments In most randomized block experiments in which subjects serve as blocks, the subjects actually participating in the experiment are selected from a large population. The subjects then contribute random rather than fixed effects. This does not affect the procedure for comparing treatments when K ij = 1(one observation per “cell,” as in this section), but the procedure is altered if K ij = K > 1. We will shortly consider two-factor models in which effects are random.

54 54 Randomized Block Experiments More on Blocking When I = 2, either the F test or the paired differences t test can be used to analyze the data. The resulting conclusion will not depend on which procedure is used, since T 2 = F and t 2  /2, = F ,1,. Just as with pairing, blocking entails both a potential gain and a potential loss in precision. If there is a great deal of heterogeneity in experimental units, the value of the variance parameter  2 in the one-way model will be large.

55 55 Randomized Block Experiments The effect of blocking is to filter out the variation represented by  2 in the two-way model appropriate for a randomized block experiment. Other things being equal, a smaller value of  2 results in a test that is more likely to detect departures from H 0 (i.e., a test with greater power). However, other things are not equal here, since the single- factor F test is based on I(J – 1) degrees of freedom (df) for error, whereas the two-factor F test is based on (I – 1)(J – 1) df for error.

56 56 Randomized Block Experiments Fewer error df results in a decrease in power, essentially because the denominator estimator of  2 is not as precise. This loss in df can be especially serious if the experimenter can afford only a small number of observations. Nevertheless, if it appears that blocking will significantly reduce variability, the sacrifice of error df is sensible.

57 57 Models with Random and Mixed Effects

58 58 Models with Random and Mixed Effects In many experiments, the actual levels of a factor used in the experiment, rather than being the only ones of interest to the experimenter, have been selected from a much larger population of possible levels of the factor. If this is true for both factors in a two-factor experiment, a random effects model is appropriate. The case in which the levels of one factor are the only ones of interest and the levels of the other factor are selected from a population of levels leads to a mixed effects model.

59 59 Models with Random and Mixed Effects The two-factor random effects model when K ij = 1 is X ij =  + A i + B j +  ij (i = 1, …, I, j = 1,…, J) The A i ’s, and B j ’s are  ij ’s all independent, normally distributed rv’s with mean 0 and variances  2 A,  2 B and  2, respectively. The hypotheses of interest are then H 0A :  2 A = 0 (level of factor A does not contribute to variation in the response) versus H aA :  2 A > 0 and H aB :  2 B > 0 versus H aB :  2 B > 0.

60 60 Models with Random and Mixed Effects Whereas E(MSE) =  2 as before, the expected mean squares for factors A and B are now E(MSA) =  2 + J  2 A E(MSB) =  2 + I  2 B Thus when H 0A (H 0B ) is true, F A (F B ) is still a ratio of two unbiased estimators of  2. It can be shown that a level  test for H 0A versus H aA still rejects H 0A if f A  F ,I – 1,(I – 1)(J – 1), and, similarly, the same procedure as before is used to decide between H 0B and H aB.

61 61 Models with Random and Mixed Effects If factor A is fixed and factor B is random, the mixed model is X ij =  +  i + B j +  ij (i = 1, …, I, j = 1, …, J) where  i = 0 and the B j ’s and  ij ’s are normally distributed with mean 0 and variances  2 B and  2, respectively. Now the two null hypotheses are H 0A :  1 = … =  I = 0 and H 0B :  2 B = 0 with expected mean squares

62 62 Models with Random and Mixed Effects The test procedures for H 0A versus H aA and H 0B versus H aB are exactly as before. For example, in the analysis of the color-change data in Example 1, if the four wash treatments were randomly selected, then because f B = 11.05 and F.05,3,6 = 4.76, H 0B :  2 B = 0 is rejected in favor of H aB :  2 B > 0. An estimate of the “variance component”  2 B is then given by (MSB – MSE)/I =.0485. Summarizing, when K ij = 1, although the hypotheses and expected mean squares differ from the case of both effects fixed, the test procedures are identical.

63 63 Models with Random and Mixed Effects Summarizing, when, although the hypotheses and expected mean K ij = 1, squares differ from the case of both effects fixed, the test procedures are identical.


Download ppt "Copyright © Cengage Learning. All rights reserved. 11 Multifactor Analysis of Variance."

Similar presentations


Ads by Google