#rnorm(n, mu,sigma) generates n random values from the normal distribution with mean mu and standard deviation sigma.
#If omitted, the parameters default to mu=0 and sigma=1


#pnorm(x,mu,sigma) is the CDF.
pnorm(12:16,14,.8)

#qnorm(p,mu,sigma) is the inverse CDF.It returns the value x such that pnorm(x,mu,sigma)=p
qnorm(c(.25,.50,.75),14,.8)

#dnorm(x,mu,sigma) is the PDF.In R, it's generally only used to draw bell curves.

#Example. Flipper lengthsof a certain kind of penguin are normally distributed with mean 192.9mm and standard deviation 7.1mm
#What is the probability that a random selected has a flipper less than 200mm long? More than 200mm?
pnorm(200,192.9,7.1)
1-pnorm(200,192.9,7.1)

#2.what is the 90th percentile for flippers lengthin these penguins?
qnorm(.9,192.9,7.1)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: