Bill, Thank you. I got it. That can require a fair amount of work to interpret the density, especially with odd or irregular bin sizes.
Thanks again, James On Tue, Jan 22, 2013 at 5:33 PM, William Dunlap <wdun...@tibco.com> wrote: > The probability density function is not unitless - it is the derivative of the > [cumulative] probability distribution function so it has units > delta-probability-mass > over delta-x. It must integrate to 1 (over the all possible x). > hist(freq=FALSE,x) > or hist(prob=TRUE,x) displays an estimate of the density function and the > following > example shows how the scale matches what you get from the presumed > population density function. > >> f > function (n, sd) > { > x <- rnorm(n, sd = sd) > hist(x, freq = FALSE) # estimated density > s <- seq(min(x), max(x), len = 129) > lines(s, dnorm(s, sd = sd), col = "red") # overlay expected density for > this sample > } >> f(1e6, sd=1) >> f(100, sd=1) >> f(100, sd=0.0001) >> f(1e6, sd=0.0001) > > Bill Dunlap > Spotfire, TIBCO Software > wdunlap tibco.com ______________________________________________ R-help@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.