x <- rdnorm(1e5, 0, 3)
xx <- -15:15
plot(prop.table(table(x)))
lines(xx, ddnorm(xx, 0, 3), col = "red")
hist(pdnorm(x, 0, 3))
plot(ecdf(x))
xx <- seq(-15, 15, 0.1)
lines(xx, pdnorm(xx, 0, 3), col = "red", lwd = 2, type = "s")
Run the code above in your browser using DataLab