HP Forums

Full Version: Advantage Pac Curve Fitting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

After the regression coefficients have been calculated, projections may be made based on the curve fit. I'm disappointed that you may only key in an x value to see an estimated y value. How about keying in a known y value? I thought about adding this feature to the CFIT program, similar to the Curve Fitting program originally published in the HP-67 Standard Pac. Are there any issues with running a tweaked program from main memory, with the advantage pac still installed?

Projecting Y onto X may seem harmless from a mathematical point of view. However, some statistician may frown upon that, because (the way I understand it) the measurement in variable X have no error in its measurement while those of variable Y has normally distributed errors. For some reason statisticians frown on calculating X^ ... and the really get into a hissy fit (pun intended) if you calculate the confidence interval of X^.

Namir

Edited: 21 June 2011, 8:17 p.m.

Well, suppose you measure the gross weight of a UPS truck (y) with various numbers of packages (x) in it, and you get the regression equation ˆy = 2.17x+2463. The slope, 2.17, is the average weight per package, and the y intercept, 2463, is the weight of the empty truck. The value of ˆy when x is 0 isn't always meaningful, but in this case, it has physical meaning!

Edited: 21 June 2011, 10:36 p.m.

From what I've read it's not the same if you just invert the resulting regression equation as opposed to swapping x and y in the data set and do a new regression to predict x from y. So in order to do it correctly, you need to accumulate the reverse statistic in parallel for this kind of calculation.

You were asking about supplying a value for Y and calculating X. Some statisticians will cry foul because the relation of the regression line is to correlated Y with X and not X with Y.

The point I was trying to make is that a least squares fit has applications other than statistics. For instance, I use it to iterate between finite element analyses results, when determining the starting point for the next iteration. The relation between X and Y is not statistical, but is based on geometry and material properties used in the model. If the material(s) have a linear stress-strain relationship, then the straight line fit would represent the combined spring rate (for complex models this would be difficult to calculate directly). And geometry can introduce non-linear behavior (e.g. belleville spring). For such uses, it would be nice to have the option to calculate estimates in either direction, where Y=load and X=deflection.


Edited: 22 June 2011, 8:48 a.m.

Makes sense to me.

The HP 20s has (IMHO) both!

Just to bad it hasn't RPN.

I modified the CFIT program over the weekend to include Y predictions. One thing I noticed is that if you call the subroutines (e.g. "A~", BFIT, etc.) from the module and get an error, a R/S will continue execution from within the unmodified CFIT program.

The HP-33s and HP-35s provide the capability you want and have rpn.