Hello, I'm taking samples from certain distributions and drawing a density 
distribution over the histogram of the samples
It works fine for the chi-square and for the normal, but not for the cauchy. Any 
idea what I'm doing wrong? Thanks

x <- rchisq(10000, df = 4)
hist(x, freq = FALSE, breaks=100)
curve(dchisq(x, df = 4), col = 2, add = TRUE)

x <- rnorm(10000)
hist(x, freq = FALSE, breaks=100)
curve(dnorm(x), col = 2, add = TRUE)

x <- rcauchy(10000)
hist(x, freq = FALSE, breaks=100)
curve(dcauchy(x), col = 2, add = TRUE)



      
	[[alternative HTML version deleted]]

