ANALYSIS OF VARIANCE FOR THE COMPLETE TWO-WAY MODEL The frs hng o es n wo-way ANOVA: Is here neracon? "No neracon" means: The man effecs model would f. Ths n urn means: In he neracon plo (wh A on he horzonal axs and B as markng varable), he correspondng segmens of he (pecewse lnear) curves for dfferen levels of B are parallel. More precsely: For each level of A and each par of levels, q of B, he level and level q lnes n he neracon plo beween levels and + of A are parallel, hence have he same slopes. In he complee model, hese slopes are and (! + -! ) + [(!") +, - [(!") ] (! + -! ) + [(!") +,q - [(!") q ] These are equal f and only f [(!") +, - [(!") ] - [(!") +,q - [(!") q ] 0. Thus, he null hypoheses becomes H 0 : There s no neracon H 0 : [(!") +, - [(!") ] - [(!") +,q - [(!") q ] 0 for all,,, a - and all unequal and q from o b The alernae hypohess s H a : [(!") +, - [(!") ] - [(!") +,q - [(!") q ]! 0 for a leas one combnaon of,,, a- and unequal and q from o b
3 4 Noe: From he equaons n H 0, we can deduce ha [(!") - (!") q ] - [(!") s - (!") sq ] 0 for every combnaon of, s from o a and, q from o b. So we could also sae he null and alernae hypoheses as and H 0 : [(!") - (!") q ] - [(!") s - (!") sq ] 0 for every combnaon of, s from o a and, q from o b H a : [(!") - (!") q ] - [(!") s - (!") sq ]! 0 for a leas one nsance of! s,! q For equal sample szes: Tes H 0 wh an F-es esng he submodel (reduced model) deermned by H 0 agans he full model: Compare he sum of squares for error sse under he full model wh he sum of squares for error sse 0 under he reduced model. The dfference ss sse 0 - sse s called he sum of squares for he neracon. We reec H 0 n favor of H a when ss s large relave o sse (assumng H 0 s rue). So we ll look a ss/sse.
5 6 Full model: Y µ +! + " + (!") + # Snce hs s equvalen o he cell-means model, whch s a one-way model, we know ha e ˆ sse Alernae formulas: y sse - y - $ $ $ ## ## r y " y " /r ( y " y # ) If H 0 s rue, hen averagng he equaons n H 0 over s and q gves he equaons [(!") - ("# ) ] - [("# ) - ("# ) ] 0 for each, So under he reduced model, so where (!") ("# ) + ("# ) - ("# ) Y µ +! + " + ("# ) + ("# ) - ("# ) + # [µ - ("# ) ] + [! +("# ) ] + [" + ("# ) ] + # µ * +! *+ " *+ # µ * [µ - ("# ) ]! * [! +("# ) ] " * [" + ("# ) ] Thus he reduced model has he form of he man effecs model, bu wh dfferen parameers han f we us se neracon erms o zero.
7 8 Esmaes for he man effecs model, assumng equal sample szes: Leas squares may be used o fnd esmaors of he parameers under he Man Effecs Model assumpon Y µ +! + " + #. (See p. 6 of he ex for more deals.) For equal sample szes (.e., balanced ANOVA), he resulng normal equaons are readly solvable (wh added consrans), yeldng leas squares esmaor (*) ˆ µ + " ˆ + " ˆ y "" + y " " - y for E[Y ] µ +! + ". Noe:. Recall ha for he complee model, he leas squares esmaors were ˆ µ y " ˆ y "" - y " ˆ y " " - y, from whch follows ha he leas squares esmae for µ +! + " s he same n boh models. However, n he complee model, E[Y ] µ +! + ".+ (!"), whch s no he same as E[Y ] for he man effecs model unless (!") 0.. For unequal sample szes, he normal equaons are much messer, so compuaonal soluons are needed. (More laer.)
9 0 From (*), for he man effecs model, sse (y - ˆ µ - ˆ " - " ˆ ) (y - y "" + y " " - y ), whch can be re-expressed as y - br y "" y - # - ar y # " " + abr y # y br "" - # y ar " " + abr y Connung wh he es for neracon n he complee wo-way model Applyng he above o he reduced model Y µ * +! *+ " *+ # n he es for neracon n he complee wo-way model, we ge (assumng equal sample szes) sse 0 (y - ˆ µ * - " ˆ * - " ˆ *) (y - y "" + y " " - y ), whch can be re-expressed as (y - y " ) + ( y " - y "" + y " " - y ). Snce he frs erm s us sse for he full model, we have
ss sse 0 - sse ( y " - y "" + y " " - y ) r" " ( y " - y "" + y " " - y ), whch can be re-expressed as ## y " r - # y br "" - # y " " ar + abr y Usng he remanng wo model assumpons, (ha he # are ndependen random varables and each # ~ N(0, $ ) ), can be shown ha for he correspondng random varables SS and SSE: When H 0 s rue and sample szes are equal, ) SS/$ ~ % ((a-)(b-)) ) SSE/$ ~ % (n - ab) ) SS and SSE are ndependen. Thus, when sample szes are equal and H 0 s rue, SS (a ")(b ")# SSE (n " ab)# MS MSE ~ F((a-)(b-),n-ab) Recall: We reec H 0 n favor of H a when ss s large relave o sse (under he assumpon ha H 0 s rue). Snce ms/mse s us a consan mulple of ss/sse, we can use ms/mse as a es sasc, reecng for large values.
3 Examples:. The baery expermen. The reacon me expermen (pp. 98, 48, 57 of exbook). The daa are from a plo expermen o compare he effecs of audory and vsual cues on speed of response. The subec was presened wh a "smulus" by compuer, and her reacon me o press a key was recorded. The subec was gven eher an audory or a vsual cue before he smulus. The expermeners were neresed n he effecs on he subecs' reacon me of he audory and vsual cues and also n he effec of dfferen mes beween cue and smulus. The facor "cue smulus" had wo levels, "audory" and "vsual" (coded as and, respecvely). The facor "cue me" (me beween cue and smulus) had hree levels: 5, 0, and 5 seconds (coded as,, and 3, respecvely). The response (reacon me) was measured n seconds.