Two-way Analysis of Variance

Size: px
Start display at page:

Download "Two-way Analysis of Variance"

Transcription

1 Two-way Analysis of Variance (ANOVA) Lecture No. 12

2 The model of two-way ANOVA

3 Three possible hypotheses testing

4 Three possible hypotheses testing

5 Three possible hypotheses testing

6 The procedure Part A: The Null and Alternative Hypotheses The null and alternative hypotheses are expressed in terms of the main effects (factors A and B) and interaction effects (combinations of levels of these factors).

7 The procedure Part B: The Format of the Data to Be Analyzed The data can be listed in tabular form, as shown, with each cell identified as a combination of the ith level of factor A with the jth level of factor B. Each cell contains r observations, or replications. For each level of each factor, a mean is calculated. For example, is the mean for all observations that received the second level of factor A. Likewise, is the mean for all observations that received the first level of factor B. As in previous analyses, the grand mean is the mean of all the observations that have been recorded.

8 The procedure Part C: The Calculations for the Two-Way ANOVA Design Part C describes the specific computations, with each quantity being associated with a specific source of variation within the sample data.

9 The procedure Part C: The Calculations for the Two-Way ANOVA Design

10 The procedure Part D: Test Statistics, Critical Values, and Decision Rules For each null hypothesis to be tested, a separate test statistic is calculated. The numerator and denominator are separate estimates of the variance that the cell populations are assumed to share. For each null hypothesis, the critical value of F will depend on the level of significance that has been selected, and on the number of degrees of freedom associated with the numerator and denominator of the F statistic. In testing each H0, the values of v1 and v2 are shown in the table. If a calculated F exceeds F[α, v1, v2], the corresponding null hypothesis will be rejected.

11 An aircraft firm is considering three different alloys for use in the wing construction of a new airplane. Each alloy can be produced in four different thicknesses (1 = thinnest, 4 = thickest). Two test samples are constructed for each combination of alloy type and thickness, then each of the 24 test samples is subjected to a laboratory device that severely flexes it until failure occurs. For each test sample, the number of flexes before failure is recorded, with the results shown in table. At the 0.05 level of significance, examine (1) whether the alloy thickness has an effect on durability, (2) whether the alloy type has an effect on durability, and (3) whether durability is influenced by interactions between alloy thickness and alloy type.

12 There are 4 levels of factor A and 3 levels of factor B, leading to 4 x 3 = 12 combinations, or cells. Within each cell, there are r = 2 observations, or replications. For example, the cell for (i = 2, j = 3) contains the following observations: X 231 = 807 flexes and X 232 = 819 flexes.

13

14

15

16

17

18

19 There are three sets of null and alternative hypotheses to be evaluated. In each case, the calculated F is compared to the critical F, listed in the F distribution table. The denominator of the F-ratio for each test is MSE, which has ab(r-1), or 4(3)(2-1)=12 degrees of freedom.

20

21

22

23 Summary results for the two-way ANOVA

24 Interaction between levels of factor A (thickness) and factor B (alloy type) is present. Thicknesses 1 and 2 seem best for alloy 2, but thickness 4 seems best for alloy 3. In this graph, the vertical axis represents the average number of flexes for the r = 2 test units within each cell. The horizontal axis represents the levels for factor B, alloy type. Thicknesses 1 and 2 seem relatively durable for alloy 2, but these thicknesses lead to early failure for alloys 1 and 3. According to this figure, the longestlasting combination is thickness 2 and alloy 2.

25

26 r=2 we mark the whole table with factor names

27

28 preparing data

29 preparing data for statistica

30

31

32 1 2

33 1 2 3

34 The thickness factor is not significant (at significance level of 0.05)

35 The interaction factor is very significant significant difference

36 1 we choose the graph

37

38

39 Do the flexes depend on alloys for thickness 3?

40

41