Ying Li Stockholm University October 31, 2011
Three end-aisle displays Which is the best?
Design of the Experiment Identify the stores of the similar size and type. The displays are randomly assigned to use.
Design of the Experiment Identify the stores of the similar size and type. The displays are randomly assigned to use. First Principle Randomization
Observations 3 levels 5 replicates
6 7 8 9 1 2 3
The Analysis of Variance a level of the factors (a treatments) n replicates N = a n runs Completely randomized design
Statistical Model y ij = µ + τ i + ε ij i = 1, a j = 1, n µ : overall mean τ i : the effect of ith treatment ε ij N(0, σ 2 ),i.i.d. a i τ i = 0
The Analysis of Variance We are interested in testing the equality of treatment means E(ȳ i. ) = µ + τ i = µ i i = 1, a The appropriate hypothesis are H 0 : µ 1 = µ 2 = = µ a H 1 : µ i µ j for at least one pair (i, j)
If H 0 is true, the distribution of F 0 is F a 1,a(n 1) Reject H 0 if F 0 > F α,a 1,a(n 1)
Equation for manual calculation Balanced Data: a n SS T = i=1 j=1 ij y.. 2 N y 2 Unbalanced Data SS T = a n i i=1 j=1 ij y.. 2 N y 2 SS Treatment = 1 n a i=1 i. y.. 2 N y 2 SS Treatment = a yi. 2 y.. 2 n i N i=1 SS E = SS T SS Treatment SS E = SS T SS Treatment
Example ȳ 1. = 5.73,ȳ 2. = 6.24, ȳ 3. = 8.32,ȳ.. = 6.76 SS T = 21.93 SS Treatment = 18.78 SS E = SS T SS Treatment = 3.15
DF SS MS F P Treatment 2 18.78 9.39 35.77 <0.001 Error 12 3.15 0.26 Total 14 21.93
DF SS MS F P Treatment 2 18.78 9.39 35.77 <0.001 Error 12 3.15 0.26 Total 14 21.93 Which ones cause the differ?
Multiple Comparison Methods We know the end-aisle display different than others. We might suspect the first and the second are different. Thus one reasonable test hypothesis would be H 0 : µ 1 = µ 2 H 1 : µ 1 µ 2 or, H 0 : µ 1 µ 2 = 0 H 1 : µ 1 µ 2 0
Contrasts In general, a contrast is a linear combination of the parameters of the form a Γ = c i µ i i=1 where c i are the contrast constants, and a i=1 c i = 0. For unbalance design a i=1 c in i = 0.
The hypothesis can be expressed in the terms of contrasts H 0 : a c i µ i = 0 i=1 a H 1 : c i µ i 0 i=1 In our example, c 1 = 1,c 2 = 1, c 3 = 0.
Contrast Tests Testing hypothesis involving contrast can be done in two basic ways 1 t-test: 2 F-test: where a i=1 t 0 = c iȳ i. MS E a n i=1 c2 i F 0 = MS c MS E = SS c/1 MS E SS c = ( a i=1 c iȳ i. ) 2 1 n a i=1 c2 i
Orthogonal Contrasts Two contrasts a i=1 = c iµ i = 0 and a i=1 = d iµ i = 0 are orthogonal if a c i d i = 0 or in unbalanced case if i=1 a n i c i d i = 0 i=1 We can specify a 1 orthogonal contrasts. Tests performed on orthogonal contrasts are independent.
Example
Pairwise Comparison The null hypothesis are H 0 : µ i = µ j, i j
Pairwise Comparison The null hypothesis are H 0 : µ i = µ j, i j Tukey s test Make use of the distribution of studentized range statistics q = ȳmax ȳ min MSE 2 ( 1 n i + 1 n j ) Appendix Table 7 contains upper percentiles for q. The difference d between two averages is significant if d > q α(a, f ) 2 MS E ( 1 n i + 1 n j )
The fisher least significant difference method (LSD) The fisher least significant difference method procedure use T test for testing H 0 : µ i = µ j, i j The test statistics is: ȳ i. ȳ j. t 0 = MS E ( 1 n i + 1 n j ) The quantity: least significant difference (LSD) If LSD = t α/2,n a MS E ( 1 n i + 1 n j ) ȳ i. ȳ j. > LSD we conclude that the population means µ i and µ j differ.
Questions:1 Why in some situation overall F test of ANOVA is significant, but the pairwise comparison fails to reveal the differences?
Questions:2 Many tests available: Duncan, Student-Newman-Keuls, REGWQ, Bonferroni, Sidak, Scheff, Which pairwise comparison method do I use?
Questions:2 Many tests available: Duncan, Student-Newman-Keuls, REGWQ, Bonferroni, Sidak, Scheff, Which pairwise comparison method do I use? unfortunately, no-clear cut answer. Fisher s LSD procedure, only apply if F test is significant Tukey s method control overall error rate, many statisticians prefer.
Dunnett s Test Often one of the treatments is a control treatment, and we want to compare the other treatments with the control treatment. We want to test a 1 hypotheses: H 0 : µ j = µ 1 where i = 2,, a
Dunnett s Test For the ith treatment, H 0 is rejected if ȳ i ȳ 1 > d α (a 1, f ) MS E ( 1 + 1 ) n i n j Appendix 8 gives upper percentiles for d α (a 1, f )
One Example
One Example
One Example