NCSU ST512 Quiz 4 –Practice Sum 2 2011 1. I have 2 oil based paints (O1 and O2) and a latex paint (L). To for water permeability, I paint 5 boards with each paint, spray boards with water and then measure the amount of water absorbed grams. Here are the resulting means and totals for each set of boards: Paint Mean Total Contrast Coefficients L 26 130 _2_ O1 21 105 _-1_ O2 19 95 _-1_ test all 15 in 5 Q DIV SS 60 5*6=30 120 (a) Fill in the coefficients for a contrast to compare latex to the average of the oil based paints. (b) Compute the sum of squares for the contrast in (a). 120 (c) Compute a sum of squares for testing the null hypothesis that there are no differences in water permeability among the three paints. HO: MU1=MU2=MU3=MU OVERALL MEAN = (130 + 105 + 95)/15 = 22 SS= 5(26 - 22)^2 + 5(21-22)^2 + 5(19-22)^2 = 130 (d) Assuming the error sum of squares is 300, finish the test in question (c) by computing the calculated F statistic. MS(Treatment) = SS(Treatment)/(3-1) = 130/2 = 65 Error MS = Error SS / dfe = 300/3*(5-1) = 300/12 = 25 F(Treatment) = MS(Treatment)/Error MS = 65/25 = 2.6 2. Here is a plot like that in the class notes of the 4 means for a two factor factorial experiment. The factors are fertilizer ingredients N and P each at 2 levels and the design is a randomized complete block with 6 blocks, each block being a bench in a greenhouse and each observation Y being growth of a flower. Heights of the plotted points are labeled on the vertical axis. Each flower is in its own pot on one of the greenhouse benches. 19 15 14 12 | + p1 | | | + p2 + p2 | + p1 | |______________________________________ | | n1 n2 N1 N2 mean N2-N1 August 2, 2011 P1 12 19 15.5 7 P2 14 15 14.5 1 mean 13 17 15 P2-P1 2 -4 -6 -6 = N*P Page 1 NCSU ST512 Quiz 4 –Practice Sum 2 2011 Compute the following if possible, including the right sign: (a) The main effect of N (7+(1))/2= 4 its sum of squares 6*2*(13-15)^2 + 6*2*(17-15)^2 = 96 and the degrees of freedom (2-1) = 1 for this sum of squares. (b) The simple effect of N at the low level of P (19-12) = 7 and its sum of squares 6*(19-15.5)^2 + 6*(12-15.5)^2 = 147. (c) The simple effect of P at the high level of N is (15-19) = -4 6*(15-17)^2 + 6*(19-17)^2 = 48. (d) The interaction between N and P = -6 and its sum of squares mean total N P N1P1 12 72 -1 -1 N1P2 14 84 -1 1 N2P1 19 114 1 -1 N2P2 15 90 1 1 NP 1 -1 -1 P at N2 P at N1 N at P1 N at P2 Sum of (SS 0 0 -1 Q 54 divisor SS(Q) 48 -12 6*4=24 24 1 -36 24 -1 1 24 6*2=12 1 0 0 12 12 -1 0 1 0 42 12 0 -1 0 1 6 12 48^2/24=96 (-12)^2/24 = 6 (-36)^2/24 = 54 (-24)^2/12 = 48 (12)^2/12 = 12 (42)^2/24 = 147 (6)^2/24 = 3 Simple effects for N)= 147+3=150=54+96 Sum of (SS Simple effects for P)= 48+12=102 = 96+6 Grand Total = 360 overall mean = 360/24 = 15 (e) The error degrees of freedom 2*2*(6-1) = 20 . (f) Your friend asks you if he should put the source "REPS" in his ANOVA table as he has seen in some published papers. What do you say? (yes or no with a brief explanation) YES, since it is a Randomized Complete Block Design. 3. In a 2x2 factorial with factors A and B and 10 replications the main effect of A was 10, the simple effect of A at the high level of B was 2. B1 A1 A2 A2-A1 B2 B2-B1 x 18 = 10*2-2 2 (18+2)/2=10 A Main eff A*B (2-18)/2=-9 r=10 August 2, 2011 Page 2 NCSU ST512 Quiz 4 –Practice Sum 2 2011 Find, if possible, (if not, put "NP") (a) the simple effect of A at the low level of B = 18 (b) the mean _NP___ of all observations that had both A and B at the low level. (c) Interaction effect A*B : (2 – 18)/2 = - 8 4. Suppose a 3 x 2 factorial with factors A (3 levels: al, a2, a3) and B (2 levels: bl, b2) is run with 4 replications in randomized complete blocks design. List the standard ANOVA breakdown for this factorial experiment including sources for each main effect and interaction (give sources and degrees of freedom only). Source BLOCK A B A*B Error Df 4-1 = 3 3-1 = 2 2-1 = 1 2*1 = 1 (3*2-1)*(4-1)=15 (a) Suppose the totals of the observations in the experiment in question 2 are listed in our standard form as [albl] = 30, [a2bl] [alb2] = 40, mean total C2 (iii) C3 (iv) totals means C1 (i) a1b1 30/4 30 1 a1b2 10 40 -1 a2b1 20 80 -2 a2b2 25 100 2 a3b1 50/4 50 1 a3b2 20 80 -1 1 180 180/8 2 [a3bl] = 50 [a2b2] = l00, -1 70 70/8 -1 = 80, 130 130/8 -1 [a3b2] = 80 Q divisor 0 4*12 40 2*4 380 GM=380/24 160 6*8 SS(Q) 0 200 533.33 and that the error sum of squares is l20. Compute sums of squares and associated degrees of freedom for these tests: r=4 Error Sum of Squares = 120. MSE = 120/(15) = 8 Error df = (3*2-1)*(4-1) = 15 i) Test for main effects of A. Sum of squares > 4*3[(70/8-380/24)^2+(180/8-380/24)^2+(130/8-380/24)^2] [1] 758.3333 Degrees of freedom = 2 MS(A) = 758.3333/2 = 379.1667 F = 379.1667/8 = 47.39584 ii) Test for comparing the effect of level 2 of A to the average of the effects of levels, l and 3 of A. Sum of squares > (-70+2*180-130)^2/(8*(1+4+1)) [1] 533.3333 Degrees of Freedom = 1 MS(C1) = 533.3333 F-533.3333/8 August 2, 2011 Page 3 NCSU ST512 iii) iv) Quiz 4 –Practice Sum 2 2011 Test to see if the comparison in part (b) is the same within both levels of factor B. Sum of squares 0 Degrees of freedom 1 Also, compute the t-statistics for testing that the low and high levels of A, when combined with the high (b2) level of B, produce the same effect. In other words, test Ho: alb2 - a3b2 = 0 F = (200/1)/(120/8) = 25 F= t^2 , t = sqrt(F) = sqrt(25) = -5 (note sign) with dfe= 15. Also find s.e(“a1b2-a3b2”) = sqrt(MSE*(2/4)) = 2 t= (10-20)/2 = -5 t-statistics = -5 with 15 degrees of freedom. 5. I have a 5x2 factorial with factors W (weight at levels 20, 40, 60, 80, 100) and D (distance 40 yards, 80 yards) in which I study the effect on some heart measurement of carrying the weight over the given distance. I do all 10 (W,D) combinations for each of 5 people so I have 50 observations. Here is my (W, D) table of totals. W D 20 100 sum mean 24 24 26 27 100 110 4 4.4 sum 23 40 46 48 Mean 2.3 4.0 4.6 4.8 53 5.3 40 80 10 13 40 18 22 60 22 24 80 Grand Mean = 210/50 = 4.2 My book shows -2 -1 0 1 2 as the linear orthogonal polynomial coefficients for a factor at 5 equally spaced levels, like W. D 40 80 total 20 10 13 23 40 18 22 40 W 60 22 24 46 80 24 24 48 100 26 27 53 Wlin -2 -1 0 1 2 Q 68 divisor SS(Q) 5*2*10=100 (a) Compute the sum of squares for the linear effect of W 46.24 degrees of freedom 1 df 46.24 and its (b) I want to see if the linear effect of W is the same for both distances. Compute sum of squares for the interaction of the W linear effect with D H o : 2 * 11 1 * 12 0 * 13 1 * 14 2 * 15 2 * 21 1 * 22 0 * 23 1 * 24 2 * 25 or H o : 211 12 0* 13 14 215 221 22 0* 23 24 225 0 H1 : 211 12 0* 13 14 215 221 22 0* 23 24 225 0 Contrast Wlin in D1 vs D2= (-2*10-1*18+0*22+1*24+2*26)-( -2*13-1*22+0*24+1*24+2*27)=8 August 2, 2011 Page 4 NCSU ST512 Quiz 4 –Practice Sum 2 2011 SS (Wlin in D1 vs D2) = 8^2/(5*(10*2)) = 0.64 ((-2*10-1*18+0*22+1*24+2*26)-( -2*13-1*22+0*24+1*24+2*27))^2/(5*(10*2)) [= 0.64 (c) If I had obtained the table of totals above without having blocked on people, how would that change your computations for parts (a) and (b) of this question? It would not have changed since we are using totals for W and D over people. (d) Suppose I take the 4 degree of freedom sum of squares for W and from it I subtract your sum of squares in part (a). I form an F test using this and it is significant (I reject H0). Explain, as you would to the experimenter, how to interpret this result. In other words, what is it that I am testing here? W has 5 levels, df(W) = 5-1= 4 Full SS for W – SS for W Linear F = [(Full SS for W – SS for W Linear ) / 3]/Error MS SS(W) = 5*2*((2.3-4.2)^2+(4.0-4.2)^2+(4.6-4.2)^2+(4.8-4.2)^2+(5.3-4.2)^2) = 53.8 F = [(Full SS for W – SS for W Linear ) / 3]/Error MS = [(53.8-46.24)/3]/8= 0.315 We are testing whether the higher degree polynomial coefficients(quadratic, cubic, quartic) are all simultaneously equal to 0, i.e., whether we need a higher degree polynomial than linear to explain effect of W. August 2, 2011 Page 5