HP 48G Linear Regression Best Fit Line
12-11-2021, 05:38 PM (This post was last modified: 12-13-2021 05:32 AM by Rodger Rosenbaum.)
Post: #19
 Rodger Rosenbaum Junior Member Posts: 35 Joined: Dec 2013
RE: HP 48G Linear Regression Best Fit Line
MNH, of course, wants to do this on his HP48G (EMu48, I think).

I wouldn't use the technique described on that WikiPedia page; there's no need to involve complex variables.

It can be done with the built-in LR function. if the data are input via the standard method to enter single variable data, ΣDAT will contain the X and Y data. The various summary statistics variables are used to compute the linear regression (LR), and a small program can compute the orthogonal regression from those same variables.

I called the program ORTH and used it to solve MNH's problem.

Here it is:

<< LR SWAP DROP DUP CORR DUP SIGN 4 ROLLD SQ / SWAP INV -
2 / DUP SQ 1 + √ ROT * + DUP ΣX * NEG ΣY + NΣ / >>

To use this, enter the data in the usual way as if to enable the later use of the
LR function. The result will be the slope and intercept for the line which minimizes the SSE with the deviation from the line in the orthogonal direction.
 « Next Oldest | Next Newest »

 Messages In This Thread HP 48G Linear Regression Best Fit Line - MNH - 12-05-2021, 11:22 PM RE: HP 48G Linear Regression Best Fit Line - ttw - 12-06-2021, 01:24 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-09-2021, 01:26 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-08-2021, 10:41 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-09-2021, 01:34 AM RE: HP 48G Linear Regression Best Fit Line - ijabbott - 12-09-2021, 10:05 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-10-2021, 02:34 AM RE: HP 48G Linear Regression Best Fit Line - Albert Chan - 12-11-2021, 02:24 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-09-2021, 05:21 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-09-2021, 10:21 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-10-2021, 05:51 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-10-2021, 10:37 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-11-2021, 02:09 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-11-2021, 03:16 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-11-2021, 03:48 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-11-2021, 04:47 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-11-2021, 11:36 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-11-2021, 12:13 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-19-2021, 12:31 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-19-2021, 12:48 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-11-2021 05:38 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-12-2021, 02:34 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-18-2021, 10:13 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-19-2021, 01:08 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-25-2021, 02:26 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-25-2021, 02:41 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-25-2021, 03:46 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-25-2021, 04:39 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-25-2021, 04:59 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-19-2021, 12:10 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-19-2021, 12:46 AM RE: HP 48G Linear Regression Best Fit Line - Joe Horn - 12-19-2021, 03:19 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-19-2021, 03:54 AM RE: HP 48G Linear Regression Best Fit Line - Joe Horn - 12-19-2021, 09:04 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-12-2021, 02:47 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-19-2021, 03:23 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-19-2021, 03:26 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-19-2021, 04:00 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-19-2021, 08:12 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-19-2021, 10:39 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-20-2021, 12:15 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-21-2021, 01:51 AM RE: HP 48G Linear Regression Best Fit Line - Albert Chan - 12-20-2021, 01:11 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-21-2021, 12:59 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-22-2021, 09:16 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-22-2021, 09:30 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-21-2021, 08:42 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-22-2021, 09:28 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-22-2021, 09:32 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-22-2021, 09:58 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-22-2021, 02:09 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-22-2021, 02:19 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-22-2021, 02:26 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-22-2021, 09:25 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-22-2021, 09:34 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-22-2021, 10:02 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-22-2021, 10:08 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-23-2021, 03:35 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-23-2021, 04:13 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-23-2021, 12:41 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-23-2021, 01:07 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-23-2021, 04:01 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-23-2021, 04:32 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-23-2021, 08:17 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-24-2021, 01:06 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-24-2021, 10:34 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-24-2021, 01:42 PM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-25-2021, 12:49 AM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-24-2021, 02:07 PM RE: HP 48G Linear Regression Best Fit Line - Rodger Rosenbaum - 12-26-2021, 10:42 AM RE: HP 48G Linear Regression Best Fit Line - MNH - 12-26-2021, 01:16 PM

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