1.
power.anova.test(groups=4,n=NULL,between.var=var(c(18,19,19,20)),within.var=3.5,sig.level=0.05,power=.80)
##
## Balanced one-way analysis of variance power calculation
##
## groups = 4
## n = 20.08368
## between.var = 0.6666667
## within.var = 3.5
## sig.level = 0.05
## power = 0.8
##
## NOTE: n is number in each group
power.anova.test(groups=4,n=NULL,between.var=var(c(18,18.66,19.33,20)),within.var=3.5,sig.level=0.05,power=.80)
##
## Balanced one-way analysis of variance power calculation
##
## groups = 4
## n = 18.16131
## between.var = 0.7414917
## within.var = 3.5
## sig.level = 0.05
## power = 0.8
##
## NOTE: n is number in each group
power.anova.test(groups=4,n=NULL,between.var=var(c(18,18,20,20)),within.var=3.5,sig.level=0.05,power=.80)
##
## Balanced one-way analysis of variance power calculation
##
## groups = 4
## n = 10.56952
## between.var = 1.333333
## within.var = 3.5
## sig.level = 0.05
## power = 0.8
##
## NOTE: n is number in each group
2a.
FT1<-c(17.6,18.9,16.3,17.4,20.1,21.6)
FT2<-c(16.9,15.3,18.6,17.1,19.5,20.3)
FT3<-c(21.4,23.6,19.4,18.5,20.5,22.3)
FT4<-c(19.3,21.1,16.9,17.5,18.3,19.8)
Life<-c(FT1,FT2,FT3,FT4)
FT<-rep(c("FT1","FT2","FT3","FT4"),each=6)
dat<-data.frame(Life,FT)
model<-aov(Life~FT,data=dat)
summary(model)
## Df Sum Sq Mean Sq F value Pr(>F)
## FT 3 30.16 10.05 3.047 0.0525 .
## Residuals 20 65.99 3.30
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
With the p-value=.0525 being less than \(\alpha=.1\), we have enough evidence to
reject the null hypothesis.
2b.
qqnorm(dat$Life)

resmodel<-lm(Life~FT,data=dat)
res<-resid(resmodel)
plot(fitted(resmodel),res)

The normal probability plot appears to be approximately linear with
its theoretical and sample percentiles. In addition to the residuals vs
predicted life model indicating an even spread of samples across the
means, the model appears to be adequate.
2c.
TukeyHSD(model,conf.level=.9)
## Tukey multiple comparisons of means
## 90% family-wise confidence level
##
## Fit: aov(formula = Life ~ FT, data = dat)
##
## $FT
## diff lwr upr p adj
## FT2-FT1 -0.7000000 -3.2670196 1.8670196 0.9080815
## FT3-FT1 2.3000000 -0.2670196 4.8670196 0.1593262
## FT4-FT1 0.1666667 -2.4003529 2.7336862 0.9985213
## FT3-FT2 3.0000000 0.4329804 5.5670196 0.0440578
## FT4-FT2 0.8666667 -1.7003529 3.4336862 0.8413288
## FT4-FT3 -2.1333333 -4.7003529 0.4336862 0.2090635
plot(TukeyHSD(model,conf.level=.9))

Fluids 2 and 3 significantly differ in mean lifetime.