35s Quadratic Regression  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: 35s Quadratic Regression (/thread178215.html) 
35s Quadratic Regression  J Noël  02022011 I am new to HP programming and recently acquired a 35s. I was surprised to see it cannot do Quadratic Regression, so I wrote a basic program that will develop the twelve inputs necessary to use the built in 3*3 lin. solve equation. Q001 LBL Q Q002 CLVARS Q003 CLSTK Q004 SF 10 Q005 (eqn) QUADREG Q006 (eqn) TOTAL SETS Q007 PSE Q008 INPUT N Q009 STO N Q010 1 Q011 STO M Q012 (eqn) X Q013 PSE Q014 INPUT X Q015 STO X Q016 (eqn) Y Q017 PSE Q018 INPUT Y Q019 STO Y Q020 STO +D Q021 RCL X Q022 * Q023 STO +H Q024 RCL Y Q025 RCL X Q026 (X SQUARED) Q027 * Q028 STO +L Q029 RCL X Q030 STO +B Q031 STO +E Q032 (X SQUARED) Q033 STO +C Q034 STO +F Q035 STO +I Q036 RCL X Q037 3 Q038 (Y to the X) Q039 STO +G Q040 STO +J Q041 RCL X Q042 4 Q043 (Y to the X) Q044 STO +K Q045 RCL M Q046 STO +A Q047 RCL N Q048 RCL A Q049 X<Y Q050 GTO Q012 Q051 RTN When it is finished, there will be values stored in memory locations A through L. Launch and Solve the 3*3 lin. solve builtin EQN and R/S your way through the alreadysaved values. It will return the X, Y, and Z results of the Quadratically Regressed X,Y inputs from the program. If anyone knows a better way to do this, please share!
REPLACE THIS TEXT WITH YOUR LISTING Re: 35s Quadratic Regression  Namir  02022011 You can download my free HP35S Stat Pac from here (the download link is near the bottom of that web page), and look for program NCS_POLY1. This program performs quadratic fitting.
Namir Edited: 2 Feb 2011, 12:06 p.m.
Re: 35s Quadratic Regression  J Noël  02022011 So if I may ask a newbie question, how do I use the solver to solve for various values of Y (or x) in the equation y=ax^2+bx+c?
Re: 35s Quadratic Regression  Chris Randle (UK)  02022011 Press [EQN]
This is covered in the user's guide, chapter 7. Pay special attention to the bit about initial guesses in 78 as that is of particular importance with a quadratic. Re: 35s Quadratic Regression  Csaba Tizedes (Hungary)  02022011 Years before I wrote this  It wasn't too popular (I dunno whi... :P ;) ) Cs.
Re: 35s Quadratic Regression  J Noël  02022011 Boy, I feel dumb. I did not put the * symbols between the A and X.
Thank you for the help!
Re: 35s Quadratic Regression  Norman Dziedzic  02032011 I just noticed the 30b has this built in. Another + for the 30b.
From the linked post: Excel HP32SII
A 2.1329E3
Re: 35s Quadratic Regression  Katie Wasserman  02032011 The 20b has this as well.
Re: 35s Quadratic Regression  Mark Harman  02032011 I thought that quadratic regressions were only limited to the 30b. The manual confirms this.
Mark Edited: 3 Feb 2011, 5:30 p.m.
Re: 35s Quadratic Regression  Csaba Tizedes (Hungary)  02042011 I hope, you're realized that, my program uses just LINEAR regression to fit quadratic function.
Re: 35s Quadratic Regression  Dieter  02042011 Quote:Yes, that's a quite clever approach  though not exactly a strict leastsquare regression. ;) Hmm... since some calculators seem to offer a preprogrammed quadratic regression your idea might be used to fit a cubic function on these models...?
Dieter
Re: 35s Quadratic Regression  Katie Wasserman  02042011 Mark, You're right, I stand corrected. I misread the statistics section in the combined 20b/30b manual on this.
Thanks!
