Why does the hist() function not have area one?

If you examine the rest of the histogram output, you will notice that the bars have length 2: $breaks 1 0 2 4 6 8 10 Hence you should multiple the sum(h$density) by 2 to get the area equal to one. You can see this clearly if you look at the histogram.

And to get the widths use diff(h$breaks) – James Oct 18 at 14:41.

The area of the histogram is, in fact, 1.0. What you're not taking into account is that every bar is two units wide: > h$breaks 1 0 2 4 6 8 10.

1 Or just use sum(h$density*diff(h$breaks)) – James Oct 18 at 14:41 Thanks! You learn something every day. Great to know cause I do this quite often.

– Backlin Oct 19 at 9:47.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions