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?
pnorm
?? – Ybpnorm(y)
doesn't give x, henceplot(pnorm(y), y)
does not give the normal distribution (it's actually a straight line). – Sheyaplot(pnorm(y), y)
is certainly not a straight line. However,plot(ppoints(y), y)
is. – Khmerplot(pnorm(y), y)
wherey = dnorm(seq(-4,4, length=100))
is straight.plot(ppoints(y), y)
for the samey
vector is in fact normal! – Sheya