x <- rhcauchy(1e5, 2)
xx <- seq(-1, 100, by = 0.01)
hist(x, 2e5, freq = FALSE, xlim = c(0, 100))
lines(xx, dhcauchy(xx, 2), col = "red")
hist(phcauchy(x, 2))
plot(ecdf(x), xlim = c(0, 100))
lines(xx, phcauchy(xx, 2), col = "red", lwd = 2)
Run the code above in your browser using DataLab