# Chapter 6 Example R code: butterfly = c(33.9,33.0,30.6,36.6,36.5,34.0,36.1,32.0,28.0,32.0,32.2,32.2,32.3,30.0) mean(butterfly) sd(butterfly) hist(butterfly) boxplot(butterfly) qqnorm(butterfly) t.test(butterfly, conf.level = 0.95) t.test(butterfly, conf.level=0.90) brass = c(4.7,4.6,4.3,4.5,5.5,4.9,5.3) control = c(4.2,4.7,5.1,4.7,5.0) qqnorm(brass) shapiro.test(brass) qqnorm(control) shapiro.test(control) t.test(brass, control, conf.level=0.95) male = c(67,73,85,84,78,63,80) female = c(73,54,61,63,66,57,75,58) qqnorm(male) shapiro.test(male) qqnorm(male) shapiro.test(male) t.test(male, female, conf.level = 0.90)