Hi everyone,
I encountered some unexpected behavior from the hist() function while doing a curve-fitting assignment at work.
First, upon typing this:
Code:
> hist(y,col="red")
Then
Code:
> hist(y,prob=TRUE,col="red",ylim=c(0,1.5))
gets me this
Now, my question is: Why there are densities (probabilities) larger than 1 ??????
the problem gets even worse if I try to increase the number of rectangles, using the 'breaks' option, like this:
Code:
> hist(y,breaks=50,prob=TRUE,col="red",ylim=c(0,2))
Any idea what is going on here?
Bookmarks