The Museum of HP Calculators

HP Forum Archive 08

[ Return to Index | Top of Index ]

HP-10B / HP-10BII error on regression - example
Message #1 Posted by Gene on 6 Apr 2002, 3:40 p.m.

The HP-10B and HP-10BII give an incorrect answer for the y-intercept on certain regression problems.

Excel and the TI-BAII Plus give the correct answer.

Example:

X Y 2400 1000 3700 1350 2500 1250 3000 1800 2500 1200 3100 1700 3000 1150

This is a managerial accounting problem. X stands for units produced while Y is for mixed overhead.

Anyway, the HP-10B and HP-10BII give the equation

Y = 510.375 + 0.29166667 X

But Excel and the BAII Plus give

Y = 508.3333 + 0.291666667X

The Y intercept on the 10B is wrong.

Any ideas why? Internal round-off?

I remember problems similar to this on old HPs where people would try to find the mean and std deviation on 999999997 and 9999999995 and 9999999996 and it would zonk out because of hte large numbers involved, but these numbers are not large enough that this should be a problem.

?

Gene

      
Re: HP-10B / HP-10BII error on regression - example
Message #2 Posted by John Ioannidis on 6 Apr 2002, 4:38 p.m.,
in response to message #1 by Gene

My HP32SII agrees with Excel, as does my HP41 with the Advantage Module. I wonder if it's a coincidence that for x=7, y=510.375, and you have seven points. Are you sure you didn't hit any wrong keys?

/ji

            
No wrong keys...I've done this multiple times on different 10b's
Message #3 Posted by Gene on 6 Apr 2002, 5:41 p.m.,
in response to message #2 by John Ioannidis

It appears to be a real problem in the 10b somehow.

thanks for checking it with the other machines...someone else with a 10b want to confirm this is an error?

Gene

                  
Re: No wrong keys...I've done this multiple times on different 10b's
Message #4 Posted by Massimo Gnerucci (Italy) on 6 Apr 2002, 6:15 p.m.,
in response to message #3 by Gene

All the calcs I tested it on agree with Excel (BTW: what is that strange sequence of letters between "and the" and "Plus"? ;) ).

I carefully opened up the (once) mint 10B... the only one available here.

I entered your sequence three times and I can confirm your bug... however, try this: after pushing y^,m hit "C" and y^,m again. This time it will show you the right answer.

Can you confirm this?

My 10B is a later model, s/n ID8460####.

I'll try this on a 10Bii too.

Greetings,
Massimo

                        
Older 10B's seem to be ok
Message #5 Posted by Gene on 6 Apr 2002, 6:35 p.m.,
in response to message #4 by Massimo Gnerucci (Italy)

I've tried it on 2 older HP-10B's I have S/N 2850A and 3251S and both work fine. Didn't think to do this until just now.

All the 10Bs at school this morning are fairly recent, most are the UGLY green teal shifted function 10b's but a couple of yellow ones were there. The bug, as you note, did show up on the newer 10BII calculators as well.

Unfortunately, I don't have a bug producing 10B calculator in the house, apparently.

Any other 10B users confirm presence of bug or absence?

                              
Re: Older 10B's seem to be ok
Message #6 Posted by Massimo Gnerucci (Italy) on 6 Apr 2002, 6:59 p.m.,
in response to message #5 by Gene

I confirm the same behaviour on one of mine 10Biis (no, I won't open the other one too).

Just for fun I tried the same thing on a 12C (2512A####) and had the same bug (?) then on 15C (2729A####) same thing with y^,r; right answer with L.R.

Am I missing something?!?

Massimo

                                    
If you leave the "7" showing in the display...
Message #7 Posted by Gene on 6 Apr 2002, 7:09 p.m.,
in response to message #6 by Massimo Gnerucci (Italy)

Then you'll get the wrong answer of 510.375

If you press Clear and then estimate Y^ (for the intercept), then you get the correct answer.

At least, that is how these older 10B's work.

I have done this enough times that I can't believe I forgot to push C before doing the Y^ function. Maybe the BUG was in my own brain? :-(

Can anyone confirm that this bug exists on a 10BII AND when you enter all 7 data points, press clear and then Y^?

?

Gene

                                          
Re: If you leave the "7" showing in the display...
Message #8 Posted by Massimo Gnerucci (Italy) on 6 Apr 2002, 7:21 p.m.,
in response to message #7 by Gene

Yeah, you're right!

I began babbling around before studying the basics... now I've read the 12c manual and understand how this works.

No bug then: it is consistent with what the manuals say.

Sorry,
Massimo

                                                
Don't be sorry, I'd rather it NOT be a bug!
Message #9 Posted by Gene on 6 Apr 2002, 8:13 p.m.,
in response to message #8 by Massimo Gnerucci (Italy)

Sorry all. Sure thought I did this properly. Oh well! Gene

            
And you may have been right
Message #10 Posted by Gene on 6 Apr 2002, 7:15 p.m.,
in response to message #2 by John Ioannidis

I might very well have left that pesky 7 in the display and then done a y^ projection.

Sadly, I should know that, having written a chapter on linear regression in my business math textbook USING the 10B.

I did this 3 times on 3 different 10B's this morning. I must have really been asleep if I forgot to press C before EACH time.

:-(

Gene

                  
brain bugs
Message #11 Posted by Ellis Easley on 9 Apr 2002, 2:02 a.m.,
in response to message #10 by Gene

I was once troubleshooting around a 48 pin IC and kept getting the wrong signal on pin 40 or thereabouts. I asked a technician to check the wiring and make sure the right thing was connectd to the pin; he checked and told me the right thing was connected. Then I went back to what I was doing and found the wrong signal again. So just to make sure, instead of counting backwards from 48, I started at pin one and counted all the way around and found the right signal. I tried counting down again and after a little experimentation I discovered that when counting backwards from 48, I was skipping 44! As soon as I discovered it, it went away. But who knows how many more such bugs are embedded in me!

                        
Re: brain bugs
Message #12 Posted by Gene on 9 Apr 2002, 10:18 a.m.,
in response to message #11 by Ellis Easley

Quite right! I specifically state in my textbook (which just happens to be available on amazon.com .. search for "Gene Wright Quantitative" and it will show up) to press CLEAR before calculating the Y-intercept!

Need to give myself a C- grade for this mess!

Gene

                        
Re: brain bugs
Message #13 Posted by marc on 10 Apr 2002, 11:16 p.m.,
in response to message #11 by Ellis Easley

Why didn't you count from 40 to 48 instead of from 1 to 40? ^_^ (I friend of mine suggested that when I told it about your problem...)

                              
Re: brain bugs
Message #14 Posted by Ellis Easley on 11 Apr 2002, 11:27 a.m.,
in response to message #13 by marc

What I was doing was using an oscilloscope to observe the signals on the pins of an IC on a printed circuit board. Usually, only pin 1 is explicitly marked and you know the total number of pins (the highest pin number), so my habit is to count up or down from pin 1 or pin (max), whichever is nearer to the pin I want.

This was back in the days of dual-inline packages when the largest package was about 64 pins. "Nowadays" pin counts are so high, circuit board usually have numbered tick marks every 10 pins to help you locate individual pins. That is, if you have access to the pins at all - with ball grid array packages which are very popular now, you don't have direct access to the pins on the top or the bottom of the board. There was a period in between when "smaller" surface mount parts (84 or 100 pins) would be marked on the circuit board with the numbers of the corner pins. But in any of these cases, at some point you have to count to get to the pins in the middle.

      
Re: HP-10B / HP-10BII error on regression - example
Message #15 Posted by Jeff on 6 Apr 2002, 5:49 p.m.,
in response to message #1 by Gene

My 20s agrees with Excel and the BAII+.

      
Re: HP-10B / HP-10BII error on regression - example
Message #16 Posted by Rupert (Northern Italy, EU) on 7 Apr 2002, 5:20 p.m.,
in response to message #1 by Gene

The HP48G+ too gives '508.333333333+.291666666667*X' (Correlation:.455).

Choosing the best fit model it gives '4.4530492363*X^.715680669564' (Correlation:.524).


[ Return to Index | Top of Index ]

Go back to the main exhibit hall