PredX returns values outside of data range
04-17-2017, 08:39 AM (This post was last modified: 04-18-2017 03:44 PM by JMB.)
Post: #1
 JMB Member Posts: 97 Joined: Jan 2016
PredX returns values outside of data range
I'm using the App Statistics 2Var to do a quadratic fitting to the following data:

C1: 1, 1.05, 1.1, 1.14, 1.16
C2: 68, 67.2, 62.8, 59.1, 54.7

Once the fitting is done, using PredX and PredY in HOME I get:

PredY(1.1) -> 63.3070360465 OK
PredX(63.3070360465) -> 0.9 ??? I expected 1.1

After some investigation I realized that the fitting parabola is symmetrical with respect a vertical axis at x=1, so PredY(0.9)=PredY(1.1)=63.3070360465, and mathematically both PredX(63.3070360465)=0.9 and PredX(63.3070360465)=1.1 are correct solutions.

Perhaps in cases like this, when PredX has more than one solution, the calculator should favor a value that is inside the data range (1.1 in this case), instead of returning the first solution found (0.9 in this case).
04-17-2017, 11:22 AM
Post: #2
 roadrunner Senior Member Posts: 374 Joined: Jun 2015
RE: PredX retuns values outside of data range
In CAS you could do:

fsolve((eval(S1(5))) = 63.3070360465,X)

to get:

[1.1,0.915714357502]

04-17-2017, 03:54 PM
Post: #3
 KeithB Member Posts: 290 Joined: Jan 2017
RE: PredX retuns values outside of data range
So extrapolation is not allowed? Isn't that the point of a "Pred"?
04-17-2017, 04:05 PM (This post was last modified: 04-17-2017 04:07 PM by Tim Wessman.)
Post: #4
 Tim Wessman Senior Member Posts: 2,277 Joined: Dec 2013
RE: PredX retuns values outside of data range
When implementing this we had some long discussions about what to do here and couldn't come up with a good solution. There really isn't a "nice" way to do this since you could just as easily want the "other" answer. It gets even more tricky when you support N degree polynomials or trig fits.

What we basically decided was that just "looking at the plot" was a perfectly acceptable solution.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
04-17-2017, 04:50 PM
Post: #5
 JMB Member Posts: 97 Joined: Jan 2016
RE: PredX retuns values outside of data range

So what Tim is essentially saying is that, as usual, you have to be smarter than the machine and not trust it blindly! Then using the method described by roadrunner one can get the right solution.
04-17-2017, 05:10 PM
Post: #6
 Tim Wessman Senior Member Posts: 2,277 Joined: Dec 2013
RE: PredX retuns values outside of data range
I'm not certain, but I think most calcs only offer the
"predx" type of capability and others don't do the "predy" at all.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
04-17-2017, 05:54 PM
Post: #7
 KeithB Member Posts: 290 Joined: Jan 2017
RE: PredX retuns values outside of data range
(04-17-2017 05:10 PM)Tim Wessman Wrote:  I'm not certain, but I think most calcs only offer the
"predx" type of capability and others don't do the "predy" at all.

Isn't it usually the opposite? PredY simply means you plug in the new X and see what the model returns.
04-17-2017, 05:59 PM
Post: #8
 Tim Wessman Senior Member Posts: 2,277 Joined: Dec 2013
RE: PredX retuns values outside of data range
Correct. I mis-typed there. Thanks!

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
 « Next Oldest | Next Newest »

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