Tutorial 4 Q1 (9.3-11.025)/0.6559*sqrt(4) (9.713-11.025)/0.6559*sqrt(4) (9.938-11.025)/0.6559*sqrt(4) sqrt(3*qf(0.95,3,21)) qt(1-0.05/6, 21) 3.958/sqrt(2) Q2 x = c(3,2,2.5,3,3,3.5, 5.5,4,5,4.5,4,4.5, 5,4.5,4,4.5,2.5,4.5, 6,5.5,5,6,5.5,5.5) p = factor(c(rep(1,12), rep(2,12))) d = factor(rep( c(rep(1,6), rep(2,6)), 2)) b = factor( rep(1:6,4) ) options(contrasts=c("contr.treatment","contr.poly")) lm.o = lm(x~p+b+d+p*d) anova(lm.o) xb=mean(x) x1 = c(3,2,2.5,3,3,3.5) x2=c(5.5,4,5,4.5,4,4.5) x3=c(5,4.5,4,4.5,2.5,4.5) x4=c(6,5.5,5,6,5.5,5.5) x1. = c(x1,x3) x2. = c(x2,x4) x1b=mean(x1.) x2b=mean(x2.) 12*((x1b-xb)^2 + (x2b-xb)^2 ) qf(0.95,1,15)