Post Reply 
"SOLVER" function as in Excel
01-02-2022, 11:35 AM (This post was last modified: 01-03-2022 05:56 AM by C.Ret.)
Post: #7
RE: "SOLVER" function as in Excel
(01-02-2022 07:44 AM)robmio Wrote:  One last question: if I have to interpolate a series of data: X = {7,2,6,4,5} Y = {6,2,4,9,3}, how can I utilize your program ?

Don't use a program ! there is plenty of way to achieve that on the HP Prime in a few minute without any program coding.

Did you ever notice that there is an outlier in your data ? Did you plot your set ?

  1. Press the Apps button, finger scroll the list of applications and touch Statistics 2Var icon and start it.
  2. In the C1 column enter your list of X values {7,2,6,4,5}
  3. In the C2 column enter your list of Y values {6,2,4,9,3}
  4. Press the Plot button to plot your set. Adjust zoom and center windows using your fingers.
  5. Notice the outlier point #4 at (4,9) . Having a good extrapolation will be difficult
  6. Touch the Menu \ Fit. The default fitting is the linear equation. Obviously not close enough !
  7. Confirm bad fitting, have a look at the statistics:
    Press Num button and touch Stats menu twice to look at the Coefficient of determination R²= 0.073 (really bad)
  8. Press ESC key to quit statistics view and press the Symb button to choose for a more appropriate fitting.
  9. Select Type1 and touch Choose to select a more appropriate fitting model One. I may suggest is to used the exponential Y = b*exp(m*X).
  10. Press Plot button to see the improvement on the graph. Much better. But point #4 at (4,9) is really too far .
    Now a quick look at the statistics show a better fit R²=0.222; Still not good enough.
  11. Let try to get a more adapted response !
    Let apply weights at each point to try to get a more efficient "extrapolation".
  12. Press Num button to enter weight in the thrid column : column C3 { 100,100,100,1,100 }
    I am 100% confident in all the points except for point #4 : 1% reliable only ?
  13. Press Symb button to go back to fitting model and add C3 in the last box. the série S1 is definite by C1 (X value) C2 (Y value) C3 (Weights)
  14. Press Plot button to see the effect of the weight's adjustment.
    Much better ! Now R²= 0.906. Don't know if this is good enough for your specific application.


To get the equation, press Symb touch Y = 1.32*exp(0.198*X) and press SHIFT COPY button. You can paste in the HOME menu to get a clear view of it.

The résidus can be display in the HOME view :
Press HOME button, press the Tool button and select App Functions, select (1)Statistics 2Var and (3)Resid
The résidus are { 0.795 , 0.125 , -0.267 , 6.17 (outlier) , -.474 )
The predicted value can be obtained the same way:
PREDY(4) display 2.92 (instead of the 9 of your initial inputs)
PREDY(1) returns 1.61
PREDY(9) returns 7.88


   


It is so easy to use the power of the HP Prime without any code programming.
of course, your skill in programming will made all this automatic or more enhance or sophisticated.
But, the basic feature of this calculator and the clear and crisp tactile display is a real advantage over other pockets.



Edited severeal times to attempt to correct a broken english.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
"SOLVER" function as in Excel - robmio - 01-01-2022, 08:17 PM
RE: "SOLVER" function as in Excel - rawi - 01-02-2022, 03:59 AM
RE: "SOLVER" function as in Excel - robmio - 01-02-2022, 05:35 AM
RE: "SOLVER" function as in Excel - robmio - 01-02-2022, 06:44 AM
RE: "SOLVER" function as in Excel - robmio - 01-02-2022, 07:44 AM
RE: "SOLVER" function as in Excel - C.Ret - 01-02-2022 11:35 AM
RE: "SOLVER" function as in Excel - robmio - 01-03-2022, 06:39 AM
RE: "SOLVER" function as in Excel - rawi - 01-02-2022, 08:21 AM
RE: "SOLVER" function as in Excel - robmio - 01-03-2022, 06:23 PM
RE: "SOLVER" function as in Excel - robmio - 01-04-2022, 01:18 PM
RE: "SOLVER" function as in Excel - robmio - 01-04-2022, 01:22 PM
RE: "SOLVER" function as in Excel - C.Ret - 01-04-2022, 08:22 PM
RE: "SOLVER" function as in Excel - rawi - 01-04-2022, 08:47 AM



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