[R] density > 1?
Eik Vettorazzi
E.Vettorazzi at uke.uni-hamburg.de
Mon Mar 2 13:44:11 CET 2009
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
More information about the R-help
mailing list