Skip to content
Prev 77863 / 398502 Next

hist(x, ...) with normal distribution curve

Knut Krueger <Knut.Krueger at usa.com> writes:
Many people consider that a feature, since histograms are supposed to
be density estimates....
Er, something got duplicated in there? 

Anyways, if you want the normal curve blown up to the scale of
counts/bin, just multiply yfit by the number of observations times the
bin width.

To find the bin width take, e.g. diff(h$mids[1:2]). If they're not all
equal, then you're in deeper trouble.