[Rd] hist (PR#4395)

2003-10-02 Thread mittal

It is not really a bug but a strange choice. When the option freq=F chosen, hist
should plot relative frequency. It plots proportional to relative frequency by
the factor of bin width. Is there a reason for this? A more normal choice seems
to be to have it independent of the bin width. 

Yash Mittal
University of Arizona



This message was sent using IMP, the Internet Messaging Program.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] hist (PR#4395)

2003-10-02 Thread Achim Zeileis
On Thursday 02 October 2003 20:48, [EMAIL PROTECTED] wrote:

 It is not really a bug but a strange choice.

So why do you file it as a bug?

 When the option freq=F
 chosen, hist should plot relative frequency. It plots proportional
 to relative frequency by the factor of bin width. Is there a reason
 for this?

Yes.

 A more normal choice seems to be to have it independent of the bin
 width.

No, because then the histogram could not be used as a density 
estimate which is possible if the relative frequencies are 
proportional to the are and not the height of the segments.
Z

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] hist (PR#4395)

2003-10-02 Thread Duncan Murdoch
On Thu, 2 Oct 2003 20:48:33 +0200 (MET DST), [EMAIL PROTECTED]
wrote :


It is not really a bug but a strange choice.

Please don't post discussion to r-bugs.  Each post to r-bugs ends up
in the bug repository, and requires manual handling.

 When the option freq=F chosen, hist
should plot relative frequency. It plots proportional to relative frequency by
the factor of bin width. Is there a reason for this? A more normal choice seems
to be to have it independent of the bin width. 

No, that would result in misleading plots.  For example, if one bar is
twice as wide as another but they are the same height, then the
natural interpretation is that the wide bar represents twice as many
observations, or twice the probability.  This is the way densities
work, and is how histograms should work.  (However, since not everyone
interprets histograms this way, it's safest not to use variable width
bars.)

If you just want to plot some bars where the area of the bar has no
meaning, use barplot() instead of hist().

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel