Standard Pac and Linear regression
11-13-2019, 09:29 PM
Post: #14 SlideRule Senior Member Posts: 1,324 Joined: Dec 2013
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.

BEST!
SlideRule
 « Next Oldest | Next Newest »

 Messages In This Thread Standard Pac and Linear regression - Trond - 11-11-2019, 04:40 PM RE: Standard Pac and Linear regression - Joe Horn - 11-11-2019, 05:23 PM RE: Standard Pac and Linear regression - Trond - 11-11-2019, 06:38 PM RE: Standard Pac and Linear regression - Valentin Albillo - 11-11-2019, 07:31 PM RE: Standard Pac and Linear regression - Trond - 11-11-2019, 08:01 PM RE: Standard Pac and Linear regression - Trond - 11-11-2019, 11:28 PM RE: Standard Pac and Linear regression - Ángel Martin - 11-12-2019, 05:53 AM RE: Standard Pac and Linear regression - Valentin Albillo - 11-12-2019, 06:09 AM RE: Standard Pac and Linear regression - Trond - 11-12-2019, 09:12 PM RE: Standard Pac and Linear regression - SlideRule - 11-12-2019, 11:59 AM RE: Standard Pac and Linear regression - Dave Britten - 11-12-2019, 12:27 PM RE: Standard Pac and Linear regression - Dave Britten - 11-13-2019, 12:20 PM RE: Standard Pac and Linear regression - Trond - 11-14-2019, 12:43 AM RE: Standard Pac and Linear regression - KeithB - 11-13-2019, 04:09 PM RE: Standard Pac and Linear regression - SlideRule - 11-13-2019 09:29 PM

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