# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # # EPage 505-508 # #----- # Ex 16.1: EPage 627; # data_1 = c( 0.0506, 0.0493, 0.0502, 0.0501, 0.0512, 0.0489, 0.0485, 0.05, 0.0505, 0.0483 ) #postscript("../../WriteUp/Graphics/Chapter16/ex_01.eps", onefile=FALSE, horizontal=FALSE) plot( 1:length(data_1), data_1, type='p', pch=19, ylim=c( min(min(data_1),0.0475), max(max(data_1),0.052) ), xlab='sample', ylab='mean' ) abline( h=0.052, col='red' ) abline( h=0.0475, col='red' ) grid() #dev.off() # Ex 16.2: EPage 627; # data_2 = c( 0.0493, 0.0485, 0.049, 0.0503, 0.0492, 0.0486, 0.0495, 0.0494, 0.0493, 0.0488 ) data = c( data_1, data_2 ) #postscript("../../WriteUp/Graphics/Chapter16/ex_02.eps", onefile=FALSE, horizontal=FALSE) plot( 1:length(data), data, type='p', pch=19, ylim=c( min(min(data),0.0475), max(max(data),0.052) ), xlab='sample', ylab='mean' ) abline( h=0.052, col='red' ) abline( h=0.0475, col='red' ) abline( v=length(data_1), col='black' ) grid() #dev.off() # Ex 16.3: EPage 627; # (1-0.002)^10 (1-0.002)^25 log( 0.9 ) / log(1-0.002)