#A psychology professor assigns letter grades on a test according to the following  
#scheme.  
#A:  Top 9% of scores  
#B:  Scores below the top 9% and above the bottom 63%  
#  C:  Scores below the top 37% and above the bottom 17%  
  #D:  Scores below the top 83% and above the bottom 8%  
 # F:  Bottom 8% of scores  
#Scores on the test are normally distributed with a mean of 75.8 and a standard  
#deviation of 8.1.  Find the minimum score required for an A grade.   

#Round your answer to the nearest whole number, if necessary.  

#normally distributed

mean=75.8
sd=8.1

# 100-9=99
Agrd<-qnorm(p=.91,mean=75.8,sd=8.1)
Agrd
## [1] 86.66012
round(x=Agrd,digits=0)
## [1] 87
Bgrd<-qnorm(p=c(.91,.5,.37),mean=75.8,sd=8.1)
Bgrd
## [1] 86.66012 75.80000 73.11199
round(x=Bgrd,digits=0)
## [1] 87 76 73
Cgrd<-qnorm(p=c(.63,.5,.83),mean=75.8,sd=8.1)
Cgrd
## [1] 78.48801 75.80000 83.52874
round(x=Cgrd,digits=0)
## [1] 78 76 84
Dgrd<-qnorm(p=c(.17,.5,.92),mean=75.8,sd=8.1)
Dgrd
## [1] 68.07126 75.80000 87.18108
round(x=Dgrd,digits=0)
## [1] 68 76 87
Bottomgrd<-qnorm(p=.7,mean=75.8,sd=8.1)
Bottomgrd
## [1] 80.04764
round(x=Bottomgrd,digits=0)
## [1] 80
## Consider the probability that exactly 96 out of 155 computers will not crash in a # day.   
#Assume the probability that a given computer will not crash in a day is 61%.  
#Approximate the probability using the normal distribution.  


n=155
p=.61
q<-1-0.61
q=
MEAN<-n*p
SD<-sqrt(p*(1-p)*n)

dnorm(x=96,mean=.61*155,sd=sqrt(.61*(1-.61)*155))
## [1] 0.06385071
dbinom(x=96,size=155,prob=.61)
## [1] 0.06402352
nd<-round(dbinom(x=96,size=155,prob=.61),digits = 4)
nd
## [1] 0.064