# # 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. # # Computations used for the problems in this section of the text. # #----- save_plots = F # Ex 7.4 # x_bar = 58.3 s = 3 n = 25 t_crit = qnorm( 1 - 0.05/2 ) x_bar + s/sqrt(n) * t_crit * c(-1,+1) n = 100 x_bar + s/sqrt(n) * t_crit * c(-1,+1) t_crit = qnorm( 1 - 0.01/2 ) x_bar + s/sqrt(n) * t_crit * c(-1,+1) t_crit = qnorm( 1 - 0.18/2 ) x_bar + s/sqrt(n) * t_crit * c(-1,+1) t_crit = qnorm( 1 - 0.01/2 ) ( 2 * t_crit * s )^2 # Ex 7.10 # DF = read.csv( "../../Data/CH07/ex7-10.txt", header=TRUE, quote="'" ) n = length(DF$lifetime..yrs.) a = qchisq( 0.025, 2*n ) b = qchisq( 1-0.025, 2*n ) c( ( 2*sum(DF$lifetime..yrs.) ) / b, ( 2*sum(DF$lifetime..yrs.) ) / a )