Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The reverse/inverse of the normal distribution function in R

To plot a normal distribution curve in R we can use:

(x = seq(-4,4, length=100))
y = dnorm(x)
plot(x, y)

enter image description here

If dnorm calculates y as a function of x, does R have a function that calculates x as a function of y? If not what is the best way to approach this?

like image 972
geotheory Avatar asked Oct 25 '13 11:10

geotheory


1 Answers

What dnorm() is doing is giving you a probability density function. If you integrate over that, you would have a cumulative distribution function (which is given by pnorm() in R). The inverse of the CDF is given by qnorm(); that is the standard way these things are conceptualized in statistics.

like image 109
gung - Reinstate Monica Avatar answered Sep 18 '22 22:09

gung - Reinstate Monica