# Topic 11 d the Normal Distribution # find P X < 1.45 ) pnorm( 1.45 ) # find P( X < -0.28 ) pnorm( -0.28 ) # find P( X > -1.23 ) but that = 1 - P( X < -1.23) 1 - pnorm( -1.23 ) # old way pnorm( -1.23, lower.tail = FALSE) # better way # find P( X > 0.66 ) but that is 1 - P(X < 0.66 ) 1 - pnorm( 0.66 ) # old way pnorm( 0.66, lower.tail=FALSE ) # better way # find P( X < 1.78 or X > 2.13 ) # that is same as P(X < 1.78 ) + P( X > 2.13 ) # that is same as P(X < 1.78 ) + (1 - P( X< 2.13 ) ) pnorm( 1.78 ) + (1 - pnorm( 2.13 ) ) # old way pnorm( 1.78 ) + pnorm( 2.13, lower.tail=FALSE) # better way # find P( -0.57 < X < 1.03 ) # that is find P( X < 1.03 ) - P( X < -0.57 ) pnorm( 1.03 ) - pnorm( -0.57 ) #------------------------------------------------------- # find y such that P( X < y ) = 0.23 qnorm( 0.23 ) # find y such that P( X > y ) = 0.075 qnorm( 1-0.075 ) # this is the ugly old way qnorm( 0.075, lower.tail = FALSE ) # the better way # find y such that P( X < -y or X > y ) = 0.156 # Because this is a symmetric distribution we can # just find y such that P( X > y ) = 0.156/2 qnorm( 0.56/2, lower.tail = FALSE) # find y such that P( -y < X < y ) = 0.925 # By symmetry this is y such that P( X > y ) = (1-0.925)/2 qnorm( (1-0.925)/2, lower.tail = FALSE ) #---------------------------------------------------