x <- rrayleigh(1e5, 13)
xx <- seq(-100, 100, by = 0.001)
hist(x, 100, freq = FALSE)
lines(xx, drayleigh(xx, 13), col = "red")
hist(prayleigh(x, 13))
plot(ecdf(x))
lines(xx, prayleigh(xx, 13), col = "red", lwd = 2)
Run the code above in your browser using DataLab