density > 1?
Hi Johannes, ist more a statistical issue. In short: densities are not probabilities! With a continuous random variable probability statements are typically over intervals not over points. A density is bound to have an integral of 1 (and to be non-negative), nothing else. Consider the uniform (0,0.5) distribution there the density is f(x)=2 for all 0<=x<=0.5. This is a perfect probability density having all non-zero values > 1. hth. Johannes Elias schrieb:
Dear R-Gurus, I wonder why 'density' values as shown in hist or plot(density(x)) are sometimes over 1. How can that be? Example
hist(rnorm(1000,sd=.5),freq=FALSE)
The resulting plot shows density values below 1 on the y-axis. However,
hist(rnorm(1000,sd=.1),freq=FALSE)
shows density values over 1. How to interpret density values over 1? Greetings, Johannes
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/42803-8243 F ++49/40/42803-7790