Stat 402B (Spring 2016): Notes Set #4 • i=1 ciμi = 0 vs. H1 : i=1 ciμi = 0 i=1 a i=1 ci μi a ciȳi. and is the estimate of the contrast Γ = C= The contrast or a comparison in the sample means ȳi.’s is H0 : a 2 Want to test the hypotheses: • a a a If c1, c2, . . . , ca are constants s.t. i=1 ci = 0 then Γ = i=1 ci μi is called a contrast or a comparison in the μi’s. • Comparisons or Contrasts(Cont’d 1) Last update: January 27, 2016 Stat402B (Spring 2016) Notes Set #4 • • V (C) = a σ2 2 c · n i=1 i Stat 402B (Spring 2016): Notes Set #4 SSc = ( a 2 i=1 ci ȳi. ) 1 a 2) c i=1 n i 3 We could also use an F statistic instead. A single degree of freedom sum of squares for testing the above hypothesis is Reject the null hypothesis above if t0 exceeds tα/2,N −a (or calculate a p-value). a i=1 ci ȳi. t0 = a 2 i=1 ci sE n By replacing σ 2 by its estimate we get a t-statistic The variance of C is A linear combination of the μ’s of the type μ1 − 21 μ2 − 12 μ3 is called a comparison or a contrast of the means. • • For example the sum of squares needed to test the hypothesis H0 : μ1 − 12 (μ2 + μ3) = 0 vs Ha : μ1 − 12 (μ2 + μ3) = 0 will have 1 d.f. • 1 Suppose there are a treatments and each is replicated n times. It is possible to subdivide the treatment sum of squares from the analysis of variance into sums of squares each of one degree of freedom which can be used to test a particular hypothesis about the means μ1, μ2, . . . , μa. The difference μp − μq is just one of many possible comparisons among the means. The important comparisons may not be of the form μp − μq . • • Stat 402B (Spring 2016): Notes Set #4 Comparisons or Contrasts SSc/1 M Sc F0 = = M SE M SE Stat 402B (Spring 2016): Notes Set #4 SSc = ( Example (Cont’d) +1(625.4) − 1(707.0) −81.6 (−36.2)2 = 3276.10 (2/5) (−193.8)2 = 46, 948.05 (4/5) (−81.6)2 = 16, 646.40 (2/5) SSCi 7 6 SST rt = 66, 870.55 = 3276.10 + 46, 948.05 + 16, 646.40 since the 3 contrasts considered are orthogonal to each other and thus partitions the treatment sum of squares to 3 single degree of freedom sums of squares. These Contrast sums of squares completely partition the treatment sum of squares. The F-tests on the contrasts are usually incorporated in the analysis of variance as above. We see that 3: −193.8 +1(551.2) + 1(587.4) − 1(625.4) − 1(707.0) 2 C −36.2 i=1 ci ȳi. a +1(551.2) − 1(587.4) C= 1 Ci Note: In actual situations, the contrast are selected at the planning stage so that they lead to meeaningful conclusions about the treatment means or effects. Thus they are very much related to the structure of the factor levels. Ask the question whether the contrasts here are meaningful in this experiment? Source of Variation d.f. SS MS F p − value RF Power 3 66, 870.55 22, 290.18 66.8 < .0001 Orthogonal Contrasts C 1 : μ1 = μ2 1 (3276.10) 3276.10 9.82 < 0.01 C 2 : μ1 + μ2 = μ3 + μ4 1 (46, 948.05) 46, 948.05 140.69 < .001 C 3 : μ3 = μ4 1 (16, 646.40) 16, 646.40 49.88 < .001 Error 16 5339.20 333.70 Total 19 72, 209.75 ANOVA Table incorporating contrasts (Table 3.11 in the text) Compute the values of the contrasts and the sums of squares as follows: . Stat 402B (Spring 2016): Notes Set #4 Stat 402B (Spring 2016): Notes Set #4 • The contrasts usually chosen to be tested are those that are of interest to the experimenter or those suggested by the treatment structure. Such contrasts must be determined before the experiment design begins, and thus called pre-planned comparisons. In an experiment with equal sample sizes, it is possible to find a set of comparisons such that the sums of squares due to each of one degree of freedom form a subdivision of the SST rt a a If c1, . . . , ca and d1, . . . , d s.t. i=1 ci = 0, i=1 di = 0, a are constants a a a and i=1 cidi = 0, then i=1 ciμi and i=1 diμi are called orthogonal contrasts in the μi’s. The corresponding contrasts of the sample means are statistically independent of each other when the sample sizes are equal i.e. n1 = · · · = na . In that case, their contrast sum of squares form a complete partitioning of the treatment sum of squares SST rt i.e. SST rt = C1 + C2 + . . . + Ca−1 5 2 • • • • • Stat 402B (Spring 2016): Notes Set #4 Orthogonal Contrasts 4 a i=1 ci ȳi. ) c2 i i=1 ni a Plasma Etching Example (continued) i a i=1 ci ȳi. a c2i sE · i=1 n If the sample sizes were unequal, i.e, each of the a treatments were replicated ni times, respectively, the the t statistic and SSc are modified as follows: • t0 = For a significance level of α, the critical point a is the upper 100α point of the F (1, N − a) distribution where N = i=1 ni. Thus, we reject H0 if F0 > Fα,1,N −a which turns out to be computationally equal to t20 This gives the F-statistic • • nD2 2aσ 2 10 Here we give a simple example where we are using a = 4 treatments, σ = 2 is known from past data, and the experimenter plans to use α = .05. Since the power increases (or β decreases) as φ2 increases, this value gives us a way to find the minimum n that provides a test that meets the specified power. φ2 = A practical approach is to specify the problem as finding the sample size needed to reject the null hypothesis if any pair of treatment means differ by at least D units. It can be shown that the minimum value of φ2 for any configuration of μ’s that satisfy this condition (see p. 107 of the text) is: See Example 3.10 in the text for the plasma etching experiment example. How to use OC Curves Stat 402B (Spring 2016): Notes Set #4 Stat 402B (Spring 2016): Notes Set #4 n(5)2 = 0.78125n 2(4)(2)2 n φ2 φ ν2 = 4(n − 1) β Power 5 3.90 1.98 16 .18 .82 6 4.69 2.17 20 .11 .89 7 5.47 2.34 24 .07 .93 11 From the OC curve for α = .05 and ν1 = 3, using ν2 = 4(n − 1) and φ2 = 0.78125n we can construct the following table for different guesses of n: φ2 = Suppose that the experimenter wants to be able to reject the null hypothesis if any pair of treatment means differ by at least 5 units. The minimum value of φ2 under these conditions is 9 Separate curves available for α = .05 and α = .01 and a range of values of ν1 = a − 1, ν2 = N − a. (Note: We want to use OC curve to determine n for a specified power to reject a specified Ha at a chosen α. σ 2 is known). The relevant OC curves which are in table V of the Appendix, plot β vs. a parameter φ where a a n i=1 τi2 n i=1(μi − μ̄)2 φ2 = = aσ 2 aσ 2 Prob. of Type II error = β = P(fail to reject H0|H0 is false) = 1 − P(reject H0|H0 is false) = 1 − P (F0 > Fα,a−1,N −a|H0 is false) 8 4. Residuals vs Extraneous Variables of Interest • increase basic knowledge about the subject • suggest variables that must be controlled • lead to consider these variables as new factors in the experiment. 3. Residuals vs.Predicted Values (fitted values) may help show whether the absolute values of residuals increase (or decrease) as the size of the response increases, indicating that the model is suspect. Ordinarily, if the model is correct, the residuals should not be related to the size of the response. 2. Residuals vs.Time To reveal possible variation of the experimental techniques that occur as the experiment proceeds. May display more or less variability (as time goes on) in the data. To simplify matters consider the equal sample size case i.e., n1 = n2 = · · · = na = n 1. Probability Plot To determine possible deviations from normality of the error distribution. Also helps to locate possible outliers Stat 402B (Spring 2016): Notes Set #4 Choice of Sample Size for Oneway Classification Stat 402B (Spring 2016): Notes Set #4 Diagnostic Plots of Residuals