[R] density ranges for uniform law

ZABALZA-MEZGHANI Isabelle Isabelle.ZABALZA-MEZGHANI at ifp.fr
Tue Apr 8 10:21:45 CEST 2003


Hello,

I would have some details and explanations about the results I get.
In fact, I start with a uniform sample between -1 and 1, and then plot its
density.
My problem is that the density ranges are much more longer than I expected :

samp <- runif(10000,-1,1)
plot(density(samp))

Instead of varying between -1 and 1, the density varies between approximaly
-1.5 and 1.5
Could someone explain me what is happening ? Maybe some arguments for
density estimation need to be set ?

Waiting for an answer,
Thanks in advance

Isabelle.

Isabelle Zabalza-Mezghani, PhD
IFP - Research Reservoir Engineer



More information about the R-help mailing list