##### R-code for generating data in Exercise 8.5 #### Generate 30 batches of phase II process observations with the batch #### size of m=10. The first 20 batches are from the distribution t_3/sqrt(3), #### and the last 10 batches are from the distribution t_3/sqrt(3)+1. So, #### the process has a mean shift of size 1 at the 21st time point. set.seed(100) x1=matrix(rt(200,3)/sqrt(3),nrow=20,ncol=10) x2=matrix(rt(100,3)/sqrt(3)+1,nrow=10,ncol=10) x = rbind(x1,x2) write.table(round(x,digits=3),"exercise84.dat",row.names=F)