# This R code deals with the two-sample situation considered in # Sec. 8.3 of E&T. Treatment <- c(94, 197, 16, 38, 99, 141, 23) Control <- c(52, 104, 146, 10, 51, 30, 40, 27, 46) set.seed(321) Tbss <- matrix( sample( Treatment, size=1400*length(Treatment), replace=T ), nrow=1400 ) Treps <- apply( Tbss, 1, mean ) Cbss <- matrix( sample( Control, size=1400*length(Control), replace=T ), nrow=1400 ) Creps <- apply( Cbss, 1, mean ) Diffreps <- Treps - Creps # I'm curious as to how nonnormal the difference replicates appear to be. qqnorm(Diffreps, datax=TRUE) # Here's the usual estimated standard error: sqrt( var(Treatment)/length(Treatment) + var(Control)/length(Control) ) # Here's the bootstrap estimate of standard error as decribed in E&T: sd(Diffreps) # Here's my alternative bootstrap estimate of standard error: sqrt( var(Treps) + var(Creps) )