HP 48G Linear Regression Best Fit Line
|
12-19-2021, 01:08 AM
Post: #27
|
|||
|
|||
RE: HP 48G Linear Regression Best Fit Line
(12-18-2021 10:13 PM)MNH Wrote:(12-11-2021 05:38 PM)Rodger Rosenbaum Wrote: 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. After you enter the data into ΣDAT you need to get into the statistics menu and execute the "Fit data" function (it's the 3rd function in the list). Doing this will fill in all the summary statistics such as ΣX, ΣY, ΣXY, etc. Without doing this the LR function, and the ORTH program won't work. A check for all the data being entered is this: Recall ΣDAT to the stack; you should see a two column, 7 row matrix. Execute the calculator's ABS function. This will calculate the square root of the sum of the squares (the Frobenius norm) of all the elements of the ΣDAT matrix. You should get 79589.685862 If this is ok, try the LR function (ordinary least squares) and you should get on the stack (reverse order from what ORTH will get): Intercept: 30074.5044063 Slope: (-7.71315429794E-3) Now clear the stack and execute ORTH; you should get on the stack: -1161.69645637 1121788.42831 I also checked the ORTH result with a method using the singular value decomposition and got exactly the same result. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)