[R] hist() basic question

Rishabh Gupta rg117 at yahoo.co.uk
Sat Mar 8 19:37:25 CET 2003


 --- Thomas Lumley <tlumley at u.washington.edu> wrote: > On Sat, 8 Mar 2003, juli g. pausas wrote:
> 
> > Hi,
> > This is a very basic question, but I would like to undestand hist(). I
> > thought that the hist( , freq=FALSE) should provide the relative
> > frequencies (probabilities), and so they should sum 1, however:
> 
> No, it provides probability *densities*, which *integrate* to 1.
> 
> That is, the height of the bar is the relative frequency divided by the
> width of the interval.  This is important because
>   - it means histograms with different cutpoints are comparable
>   - it means histograms are comparable with mathematical densities such as
> a Normal, and with kernel density estimates
>   - it means that the bars don't have to have the same width.
> 
> If histograms plotted relative frequencies there would be no need to
> distinguish them from barplots.
> 
> 	-thomas
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help 

__________________________________________________

Everything you'll ever need on one web page
from News and Sport to Email and Music Charts



More information about the R-help mailing list