[R] density plot & probabilities
ligges at statistik.tu-dortmund.de
Sun Feb 1 15:53:09 CET 2009
gregor rolshausen wrote:
> hello !
> I have question concerning *kernel density plots*:
> how to plot <density vs. the probability> of a vector, when that vector
> is very short (5-10 values)?
> I tried:
> > plot(density(x))
> > hist(x,probability=T,border="white")
> > lines(density(x))
> for small length of vectors, the ylab is not 0<ylab<1 but fro example
> from 0 to 3. thats confusing for a density... why is that?
Why do you think a density is smaller than one?
Consider a uniform distribution from 0 to 0.5, hope it still has a value
of 2 between 0 and 0.5 ...
> thanks for your time.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help