Page 235 - Applied Statistics with R
P. 235

12.3. ONE-WAY ANOVA                                               235


                      boxplot(sleep ~ group, data = melatonin, col = 5:6)










                             10


                             8
                        sleep


                             6


                             4


                                           control                  treatment
                                                         group




                      12.3     One-Way ANOVA


                      What if there are more than two groups? Consider the model


                                                    =    +    +    .
                                                             
                                                      
                                                                   
                      where

                                                    ∑    = 0
                                                           
                      and


                                                             2
                                                     ∼   (0,    ).
                                                       
                      Here,


                         •    = 1, 2, …    where    is the number of groups.
                         •    = 1, 2, …    where    is the number of observations in group   .
                                        
                                                
   230   231   232   233   234   235   236   237   238   239   240