Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool.mu.edu!uunet!ns-mx!iowasp.physics.uiowa.edu!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!news.cs.indiana.edu!bronze!sol.ctr.columbia.edu!ira.uka.de!i50s8!gschmitt From: gschmitt@i50s8.ira.uka.de (G.Schmitt) Newsgroups: comp.sys.handhelds Subject: Another ROM Rev D Bug Keywords: Possible Bug in STAT BINS Alg.!! Message-ID: <91.067.08:17:15@ira.uka.de> Date: 8 Mar 91 08:17:15 GMT Sender: news@ira.uka.de (USENET News System) Reply-To: gschmitt@i50s8.ira.uka.de (G.Schmitt) Organization: university of Karlsruhe, Germany Lines: 63 BINS BUG in Revision D ROM The "bug" (if it really is one, but to me it seems so) I want to describe here has probably been announced before. It concerns the BINS algorithm on page 2 of the STATISTIC menu. I noticed the error doing some statistic stuff with measurement data. The easiest way to explain is to give a short example showing the same error effect. Consider the folowing example: Create a statistical matrix (which is a vector in this special case) containing only the 5 integer values 1 2 3 4 5 . Now try the following argument sequence for BINS: 2 as the minimal x-value in level 3 1 as the class width in level 2 3 as the number of classes you want in level 1. This means a division into 3 classes: 1 | 2 | 3 | 4 | 5 lower outside 3 classes with 1 value each upper outside value. value Performing the BINS routine now yields the two vectors (a matrix and a vector) [ [1] [1] [2] ] the class frequencies and [1 0] the frequencies outside, which is not the correct result I think. I expected the following as the correct result: [ [1] [1] [1] ] and [1 1]. The problem always arises if the first upper outside value (the value 5 in the former example) lies on the edge of the last class (the effect is independent of class width of course). A repetition of the above example with the slight modification of writing the integer value 6 instead of the 5 in the statistical matrix gives the correct result [ [1] [1] [1] ] and [1 1]. The bug (if it really is one; what says the statistic expert?) is easy to fix. Repeating the example with the first statistical matrix, which showed the error effect (1 2 3 4 5) but with the following parameters for BINS: 1.5 (or any other value near but smaller than 2, the originally intended minimal x-value) 1 as class width 3 as the number of classes yields the correct result. The above handling also works with non integer values of course, as long as the numbers you deal with, don`t claim the full fractional range of the HP for their representation. Would be interesting to hear from a REV E owner, whether or not the same effect occurs on his machine. Gerard