x <- rdnorm(1e5, 7, 35)
xx <- -150:150
hist(x, 100, freq = FALSE)
lines(xx-0.5, ddnorm(xx, 7, 35), col = "red")
hist(pdnorm(x, 7, 35))
plot(ecdf(x))
lines(xx, pdnorm(xx, 7, 35), col = "red", lwd = 2)
Run the code above in your browser using DataLab