To plot a normal distribution curve in R we can use:
(x = seq(-4,4, length=100))
y = dnorm(x)
plot(x, y)
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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With