Re: [R] hist() basic question

2003-03-08 Thread Rishabh Gupta
--- Thomas Lumley <[EMAIL PROTECTED]> 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 s

Re: [R] hist() basic question

2003-03-08 Thread Thomas Lumley
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*, wh

Re: [R] hist() basic question

2003-03-08 Thread ripley
A histogram has area one, not sum one. From ?truehist Details: This plots a true histogram, a density estimate of total area 1. 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

[R] hist() basic question

2003-03-08 Thread juli g. pausas
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: set.seed(2) ah <- hist(rnorm(100), freq=F) sum(ah$intensities) [1] 2 set.seed(2) bh <- hist(