bugPSPP - Bugs: bug #43768, Histogram in FREQUENCIES incorrect

 
 

bug #43768: Histogram in FREQUENCIES incorrect

Submitted by:  Daniel Schlieper <daniel_schlieper>
Submitted on:  Sat 06 Dec 2014 03:26:09 PM UTC  
 
Category: Numerical ErrorsSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 07 Dec 2014 08:03:37 PM UTC, comment #5:

I agree: The patch is insignificant for the purpose of copyright. But I am also happy to give a copyright assignment or disclaimer.

Thank you for accepting the patch.

Best regards, Daniel

Daniel Schlieper <daniel_schlieper>
Sun 07 Dec 2014 05:36:56 PM UTC, comment #4:

> Would the attached diff file be sufficient to point out the differences?


Thanks for the patch! I applied this to master, slightly edited.

(This patch is borderline for what FSF calls "insignificant for the purpose of copyright". For a larger contribution, we would probably need to get a copyright assignment or disclaimer.)

Ben Pfaff <blp>
Project Administrator
Sun 07 Dec 2014 01:50:52 PM UTC, comment #3:

Would the attached diff file be sufficient to point out the differences?

Best regards, Daniel

(file #32617)

Daniel Schlieper <daniel_schlieper>
Sun 07 Dec 2014 12:12:27 PM UTC, comment #2:

Thank you very much, this is good to know. It's not a bug then, but just a point that is missing in the documentation.

Best regards, Daniel

Daniel Schlieper <daniel_schlieper>
Sat 06 Dec 2014 06:54:04 PM UTC, comment #1:

I don't think it is right to say that either histogram is "incorrect". For any dataset, there are an infinite number of possible histograms. The difference is that they have different number of bins.

In particular, the EXAMINE command uses Sturges Rule[1] to determine the bin_width, whereas FREQENCIES uses the Freedman-Diaconis rule[2]. The former is generally regarded as being better for a small number of data, but not so good for large datasets.

[1] http://www.syque.com/improvement/Sturgess%20Rule.htm
[2] https://en.wikipedia.org/wiki/Freedman%E2%80%93Diaconis_rule

John Darrington <jmd>
Project Administrator
Sat 06 Dec 2014 03:26:09 PM UTC, original submission:

Hello,

the histogram from FREQUENCIES gives an incorrect result. EXAMINE gives a correct histogram.

Best regards, Daniel Schlieper

Example: pspp (GNU PSPP) 0.8.4 on OpenSUSE 12.3

pspp -O charts=hbr-#.png

get data /type=ods /file='hbr.ods' /cellrange=range 'A1:B76'.
freq Value /histogram.
exa Value /plot=histogram.

hbr-1.png is from FREQ (and wrong)
hbr-2.png is from EXAMINE (and correct)

Frequencies gives the correct numbers in the output table.

Daniel Schlieper <daniel_schlieper>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #32617:  statistics.texi.diff added by daniel_schlieper (749B - text/x-patch - Diff file to explain the diffenet behaviour of histograms in FREQ and EXA.)
file #32609:  hbr.ods added by daniel_schlieper (11KiB - application/vnd.oasis.opendocument.spreadsheet - see text)
file #32610:  hbr-1.png added by daniel_schlieper (12KiB - image/png - see text)
file #32611:  hbr.sav added by daniel_schlieper (632B - application/x-spss-sav - see text)
file #32612:  hbr-2.png added by daniel_schlieper (14KiB - image/png - see text)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by blp (Posted a comment)
  • -unavailable- added by jmd (Posted a comment)
  • -unavailable- added by daniel_schlieper (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Dec 2014 05:36:56 PM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 07 Dec 2014 01:50:52 PM UTCdaniel_schlieperAttached File-=>Added statistics.texi.diff, #32617
    Sat 06 Dec 2014 03:26:09 PM UTCdaniel_schlieperAttached File-=>Added hbr.ods, #32609
      Attached File-=>Added hbr-1.png, #32610
      Attached File-=>Added hbr.sav, #32611
      Attached File-=>Added hbr-2.png, #32612

    Back to the top


    Powered by Savane 3.1-cleanup1