Possible Duplicate:
Probability distribution value exceeding 1 is OK?
I thought the area under the curve of a density function represents the probability of getting an x value between a range of x values, but then how can the y-axis be greater than 1 when I make the bandwidth small? See this R plot:
range <- seq(2,6,.01)
n <- 1000
d <- sample(range,n, replace=TRUE)
d <- c(d,rep(0,100))
d <- c(d,rep(1,50))
df <- data.frame(counts=d)
adjust <- 1/20
dens <- density(d,adjust=adjust)
plot(dens)
Also, the probability of getting $P(x<2)=\frac{150}{1000}=.15$, how can I see this in the plot?