[HP-12C] Angular coefficent from linear regression off by 1
01-21-2019, 08:10 PM
Post: #31
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: [HP-12C] Angular coefficent from linear regression off by 1
(01-19-2019 05:36 PM)Albert Chan Wrote:  Manual suggested method, slope = f(1) - f(0), may lose *many* significant digits, due to subtraction cancellation.

OK, then let's combine a manual calculation from the stored sums for the slope and the 0 y^ method for the intercept. The latter should be exact by design as the calculator evaluates 0*slope + intercept. I assume this calculation is even done with the internal extended precision.

Code:
RCL 1 RCL 6 x RCL 2 RCL 4 x - RCL 1 RCL 3 x RCL 2 ENTER x - ÷ 0 y^, r X<>Y ENTER R↓ R↓ GTO 00

On exit the stack holds all relevant data:

T: r
Z: r
Y: slope
X: intercept

You may replace the last ENTER with RCL 1 X<>Y, so that T finally holds the number of data points.

Dieter
 « Next Oldest | Next Newest »

 Messages In This Thread [HP-12C] Angular coefficent from linear regression off by 1 - Marcio - 05-01-2016, 11:23 AM RE: HP-15C and 12C give different results to the same data set - bshoring - 05-01-2016, 07:12 PM RE: [HP-12C] 9-digit angular coefficent from linear regression off by 1 - Dieter - 05-01-2016, 11:37 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Marcio - 05-02-2016, 11:16 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - HP67 - 05-03-2016, 12:14 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Marcio - 05-03-2016, 12:37 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Werner - 05-02-2016, 11:48 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Marcio - 05-02-2016, 12:09 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 05-02-2016, 12:30 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Werner - 05-02-2016, 02:50 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 05-03-2016, 11:56 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Csaba Tizedes - 05-05-2016, 07:07 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Csaba Tizedes - 05-06-2016, 07:50 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 05-06-2016, 01:11 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Csaba Tizedes - 05-12-2016, 10:20 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Csaba Tizedes - 08-03-2016, 07:38 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 08-03-2016, 10:10 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Albert Chan - 01-19-2019, 05:36 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 01-21-2019 08:10 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - bshoring - 05-09-2016, 07:33 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 05-11-2016, 05:58 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - bshoring - 05-12-2016, 06:32 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Csaba Tizedes - 05-12-2016, 10:05 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Dieter - 05-13-2016, 06:24 AM RE: [HP-12C] Angular coefficent from linear regression off by 1 - HP67 - 05-03-2016, 01:01 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Marcio - 05-03-2016, 01:20 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Thomas Radtke - 05-06-2016, 01:55 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - HP67 - 05-03-2016, 01:33 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - Marcio - 05-03-2016, 01:49 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - HP67 - 05-03-2016, 01:59 PM RE: [HP-12C] Angular coefficent from linear regression off by 1 - bshoring - 05-13-2016, 07:54 PM

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