Re: Statistical Bug?



#6

No, Dave: the 42s will give you the answer for two data. Try it.

Raul


#7

you have a to be very careful when computing variances on calculators because they all use unstable methods, even hp.

<rant>
itsn't it about time we had a calculator that actually worked and did the right thing. the problem comes from use of a formula that magnifies error. for example, do this:
clear sigma.
1e6 sigma+
1e6-1 sigma+
1e6+1 sigma+
and what do you get. s = 0 what rubbish!
</rant>

the correct way is to make use of a two-pass formula (as described in numerical recipes in C page 613). however, that method involves storing all the data points so as to make a second pass.

a cheap "calculator" fix avoiding extra storage would be to simply subtract the first number entered from all the numbers entered. this would approximately renormalize the data by the mean.


#8

...for example, do this: clear sigma. 1e6 sigma+ 1e6-1 sigma+
1e6+1 sigma+ and what do you get. s = 0 what rubbish!

Not *all* HP calculators! The RPL models return 1 for that. They do
indeed store all of the data points.

a cheap "calculator" fix avoiding extra storage would be to
simply subtract the first number entered from all the numbers entered.
this would approximately renormalize the data by the mean

Yes, that should work. For the "cheap" calculators that we actually
have, the user can use the method that I mentioned in
this post.


#9

excellent!

i'd simply assumed the RPL ones had the same algorithms copied over. this nice to know, at last.

i like your "encoded" form, its better than my; subtract the number you firsr thought of hack. its a pity that units than dont store the data don't do something like this.


#10

Thank you.

My method has the advantage that when using it, one typically doesn't
need to enter so many digits. This can be especially important when
entering hundreds of data points.

On the other hand, your idea has the advantage that the user wouldn't
even need to be aware that the data was being adjusted. If I recall
correctly, many calculators keep track of only n, sum(x), and
sum(x2) for statistical functions. To implement your
suggestion, the additional requirements would be to keep track of
x1, adjust the data on every sum+ input, and adjust the
output for things like sum(x), sum(x2), mean, and total.
Seems to me that it should be feasible on many calculators, and the
extra calculations would be scarcely noticeable to the user.

Have you applied for a patent yet?

Regards,
James


#11

oops, sorry james, was this in response to my stats correction idea? i didnt see this post earlier.

if so then, yes and no :-)

yes, thats what i meant and no, there's no patent. :)

basically, was thinking along the lines of what people do by hand. a friend works in a lab calibrating instruments. as you can imagine the results are heavily clustered around a central figure.
what they do (manually) is subtract the figure that they expect from each number and enter those numbers in excel(for example). in fact if you dont excel gets it wrong. yes wrong! just like a cheap calculator that doesnt store the numbers. you'd think that after all these years of hypertext email and featureitis it would work in the worlds leading spreadsheet. heck, they should be doing the proper two-pass forumla properly... ooops ranting again!

this and many more reasons is why we still need quality algorithms in calculators.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Best statistical fit Richard Berler 8 2,001 10-30-2013, 11:25 PM
Last Post: Walter B
  Statistical Question Namir 3 1,060 12-22-2012, 03:39 AM
Last Post: Bruce Larrabee
  Project Euler Problem 39: Statistical Mode on the HP 48GX? Peter Murphy (Livermore) 3 1,075 07-29-2011, 09:44 PM
Last Post: Peter Murphy (Livermore)
  Statistical analysis galore Geir Isene 9 2,136 11-19-2010, 09:51 PM
Last Post: Palmer O. Hanson, Jr.
  OT: Tutorials for R statistical language Namir 8 1,906 10-29-2009, 01:37 PM
Last Post: Tim Wessman
  Origins of HP41 numerical routines ot compute statistical distributions Les Wright 11 2,175 05-09-2006, 02:35 PM
Last Post: Namir
  Basic statistical functions on HP-32SII Ed Look 9 1,716 10-06-2003, 01:18 PM
Last Post: Ed Look
  SPC (Statistical Process Control) data connector info wanted Ellis Easley 0 581 04-16-2003, 06:41 AM
Last Post: Ellis Easley
  Statistical Bug? Trent Moseley 0 517 03-28-2003, 12:15 AM
Last Post: Trent Moseley
  Statistical Bug? Trent Moseley 11 1,835 03-27-2003, 01:28 AM
Last Post: Karl Schneider

Forum Jump: