Post Reply 
Standard Pac and Linear regression
11-13-2019, 09:29 PM
Post: #14
RE: Standard Pac and Linear regression
If your interest extends to the archives, then hp41 howto do simple linear regression? (Posted by David E on 17 Dec 2002) should have modest appeal.

If you use the sigma+ button (top left on the keypad)(after clearing the summation registers using the CLSigma button - shift x<>y key, just below the sigma+ key), you can accumulate the sums of x, x^2, y, y^2, and xy in memory registers 11 through 15 respectively, while register 16 will get the value of n (the number of x,y pairs). To put in your numbers, enter y first, then "ENTER", and then enter your x value - then hit the sigma+ key.
After you have entered all you pairs of values, you need to remember (or be told - or, left as an exercise for the student, derive!) the least-squares fitting expressions for slope, intercept, and correlation coefficient. In case you are rusty:

the slope is (n*SUMxy - SUMx*Sumy)/(n*SUMx^2 - (Sumx)^2)

the intercept has the numerator SUMy*SUMx^2 - SUMxy*SUMx (with the same denominator as for the slope)

r is (n*SUMXY - SUMx*SUMy) / ( SQRT(n*SUMx^2 - (SUMx)^2) * SQRT(n*SUMy^2 - (SUMy)^2) )

The above and more awaits your perusal.

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Standard Pac and Linear regression - Trond - 11-11-2019, 04:40 PM
RE: Standard Pac and Linear regression - SlideRule - 11-13-2019 09:29 PM

User(s) browsing this thread: 1 Guest(s)