Re: Triple D'oh! Message #8 Posted by james (UK) on 14 Nov 2003, 4:25 p.m., in response to message #7 by Nelson M. Sicuro (Brazil)
Hi Gang
It's always the little things - reminds me of the hours I spent gazing at FORTRAN listings wondering why the program didn't work and someone would look over my shoulder and point out the ',' that should have been a '.'
My apologies in advance for the formatting - can't work out how to get a superscript 2 for the squares or a sigma sign so please read x2 as x-squared and E as sigma.
The apparent bug results from the fact that the standard deviation function operates on two variables, x and y. Every time you key E+ the calculator accumulates Ex, Ey, Exy, Ex2 and Ey2. When E- is keyed the calculator makes the appropriate adjustment to Ex, Ey, Exy, Ex2 and Ey2. If you are only using one variable, the y-register should be cleared first before starting so that y (and Ey, Exy, and Ey2 ) will always be equal to 0. The apparent bug arises when, having called s, which returns both s(x) in the x register and s(y) in the y register, you then enter, in this case, the 4th x (114) which pushes s(x) into the y register and key E- then the calculator will in making the appropriate adjustments to Ex, Ey, Exy, Ex2 and Ey2 subtract the square of s(x) from the current Ey2 which was 0 and now becomes -s(x)2. When you recalculate s, s(x) can be calculated but s(y) can't be calculated as it now involves trying to take the square root of a negative number and the apprpriate error message is displayed – in the case of the 34C, error3. Extract from the 34C handbook “A nonzero number in the y-register during one-variable calculations of s, r, L.R. may result in a display of Error3”.
s(y) = square root of {[n Ey2 - ( Ey )2]/n(n-1)}.
With my 12C, 34C and 41CV there is no error display provided that I am careful to ensure that after getting s(x) I key 0 [ENTER] before keying the 4th x (114) and E-.
I'm now off to try and make peace with my HPs for ever doubting them!
Best
James
|