Extended Statistics Program
Description
By Eddie Shore, November 2011 (Eddie's Math and Calculator Blog)
This statistics program offers four regression models:
Linear (LIN): y = a + b x
, Flags 1 and 2 are Clear
Logarithmic (LOG): y = b + a ln x
, Flag 1 is Set, Flag 2 is Clear
Power (PWR): y = b × xa
, Flags 1 and 2 are Set
Exponential (EXP): y = b × eax
, Flag 1 is Clear, Flag 2 is Set
Caution: With this program, a new set of data must be entered for each calculation.
Instructions:
- Run Program A: f A
- Set and/or clear flags 1 and 2 to select the regression model
- Enter y data point, press ENTER
- Enter x data point, press f B
- Repeat steps 2 and 3 as necessary
- Run Program C: f C
Example:
Fit the following data to the four regressions: linear, logarithmic, exponential, and power ( Source: HP 33S Manual)
(40.5, 104.5), (38.6, 102), (37.9, 100), (36.2, 97.5), (35.1, 95.5), (34.6, 94)
A run through for Linear Regression (key strokes are similar for the others, just set and/or clear flags where necessary):
f A
104.5 ENTER 40.5 f B
102 ENTER 38.6 f B
100 ENTER 37.9 f B
97.5 ENTER 36.2 f B
95.5 ENTER 35.1 f B
94 ENTER 34.6 f B
f C
Results: r ≈ 0.9955, a ≈ 1.7601, b ≈ 33.5271
Logarithmic: b = 65.8446, a = -139.0088, r = 0.9965
Power: b = 0.6640, a = 8.9730, r = 0.9959
Exponential Regulation: b = 0.0177, a = 51.1312, r = 0.9945
Program Resources
Labels
Name |
Description |
|
A |
Initialization |
|
B |
Enter Data |
|
C |
Analysis |
|
Flags
Number |
Description |
|
1 |
statistics register |
|
2 |
statistics register |
|
Program
Line |
Display |
Key Sequence |
|
000 |
|
|
|
001 |
42,21,11 |
f LBL A |
|
002 |
42 32 |
f ∑ |
|
003 |
43 32 |
g RTN |
|
004 |
42,21,12 |
f LBL B |
|
005 |
43, 6, 1 |
g F? 1 |
|
006 |
43 12 |
g LN |
|
007 |
34 |
x↔y |
|
008 |
43, 6, 2 |
g F? 2 |
|
009 |
43 12 |
g LN |
|
010 |
34 |
x↔y |
|
011 |
49 |
∑+ |
|
012 |
43 32 |
g RTN |
|
013 |
42,21,13 |
f LBL C |
|
014 |
42 49 |
f L.R. |
|
015 |
43, 6, 2 |
g F? 2 |
|
016 |
12 |
eˣ |
|
017 |
31 |
R/S |
|
018 |
34 |
x↔y |
|
019 |
31 |
R/S |
|
020 |
1 |
1 |
|
021 |
42 48 |
f ŷ,r |
|
022 |
34 |
x↔y |
|
023 |
43 32 |
g RTN |
|