HP Forums
(45) Straight-Line Fitting - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (45) Straight-Line Fitting (/thread-14447.html)

(45) Straight-Line Fitting - SlideRule - 01-31-2020 12:34 PM

  The Hewlett-Packard HP-45 pocket calculator includes a key ∑+ that accumulates and stores the sums ∑1(=n), ∑x, ∑, and ∑y, with another key that directs the calculator to compute the mean of x and its standard deviation. An independent y entry can be summed simultaneously.
  Another problem occurring often in data reduction is to find the least-squares slope and intercept of a straight line and their standard deviations. For this case the sums ∑xy and ∑ are needed, in addition to those provided by the ∑+ key. An efficient (though not unique) procedure for accumulating the necessary sums with the HP-45 is the following: In succession, key in the data pairs (xi, yi) together with keyboard steps in the order: xi, ENTER↑, ENTER↑, yi, ENTER↑, STO + 3, , STO + 4, R↓, ×, x⇄y, ∑+. After processing all data pairs in this manner the sums can be recalled from storage as needed, with ∑y in R3, ∑ in R4, n in R5, ∑ in R6, ∑x in R7 and ∑xy in R8. It is then a simple task to calculate the slope, intercept, and standard deviations using the well-known least-squares formulas. If the standard deviations are not required, the sum ∑ can be omitted, with a saving of six keyboard steps (steps 5, 9, 10, 11, 12, 13 in the previous list).

source: AJP Volume 42, COMPUTER NOTES, Straight-Line Fitting with an HP-45 Calculator, W. C. ELMORE (Swarthmore College), April 1974, pg. 253