# topic 11 d part 2 more on the normal distribution source( "../gnrnd4.R") gnrnd4( 1774459804, 12500743) head(L1) tail(L1) mu <- mean(L1) mu source("../pop_sd.R") sigma <- pop_sd( L1 ) sigma # Create L2 by subtracting mu from L1 L2 <- L1 - mu mean( L2 ) pop_sd(L2) # Create L3 by dividing L2 by sigma L3 <- L2 / sigma mean( L3 ) pop_sd( L3 ) # for a special population find P( X < 88 ) z <- ( 88 - mu ) / sigma z pnorm( z ) # problem 1 z <- (12 -18.4) / 4.6 z pnorm( z ) # problem 2 z <- (5 - -9.7) / 6.1 z pnorm( z, lower.tail=FALSE ) # problem 3 z_high <- (145-134) / 15 z_low <- (120 - 134) /15 z_high z_low pnorm( z_high ) - pnorm( z_low ) # problem 4 z <- qnorm(0.23) z y <- z*17 + 244 y # problem 5 z <- qnorm(0.05, lower.tail=FALSE) z y <- z*5.8 + 47.2 y # redo problem 1 pnorm( 12, mean=18.4, sd=4.6) # redo problem 2 pnorm( 5, mean=-9.7, sd=6.1, lower.tail=FALSE) # redo problem 3 pnorm( 145, mean=134, sd=15) - pnorm( 120, mean=134, sd=15 ) # redo problem 4 qnorm( 0.23, mean=244, sd=17 ) # redo problem 5 qnorm( 0.05, mean=47.2, sd=5.8, lower.tail=FALSE) # # For N( 500, 100 ) find the 95th percentile qnorm( 0.95, mean=500, sd=100 )