The reverse/inverse of the normal distribution function in R

geotheory picture geotheory · Oct 25, 2013 · Viewed 26.8k times · Source

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?

Answer

gung - Reinstate Monica picture gung - Reinstate Monica · Oct 25, 2013

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.