Shortcut:
| Click |
Uses least-squares curve fitting procedures to find the polynomial of a user-specified order that best fits the data. A least-squares curve fit is one in which the sum of the square of the errors between the actual data and the polynomial model are minimized:

DPlot converts the input curve to a form most likely to achieve a good fit (or at least most likely to avoid scaling errors), depending on the type of scaling currently in effect. The actual form of the output polynomial is:

Correlation coefficient
The correlation coefficient presented by DPlot is a measure of how well the polynomial is correlated to the data. A correlation coefficient of 1.0 denotes a perfect fit, while a correlation coefficient less than 0.9 should probably be discarded. A high correlation coefficient less than 1.0 does not necessarily indicate an especially good curve fit (see below).
The correlation coefficient is described mathematically as:

Limitations
In general, least squares curve fits are very poor predictors of trends in the data outside the limits of the input. Extrapolation outside the limits of the input is not recommended for any but 1st order fits. The figure shown below illustrates the problem associated with extrapolating outside the limits of the input data. Even though the generated curve fits the input perfectly, values outside the limits of the data are, at best, suspect.

Bear in mind that the least squares procedure operates only on existing data points. A generated curve fit might fit the data points exactly, but produce completely unexpected results between data points. This is particularly true for high order polynomials. As in the figure above, the generated curve in the figure below fits the input data precisely. However, in this case, a 1st or 2nd order fit would produce a much more realistic model of the input data, even though the resulting polynomial would not be perfectly correlated.

A high (but less than 1.0) correlation coefficient is not necessarily an indication that a curve fit is appropriate for the input data. Consider the following examples, commonly referred to as Anscombe's Quartet:
|
|
|
|
The input data in each example has a mean Y value of 7.5, a mean X value of 9, a standard deviation in the Y values of 2.03, and a best fit line of Y=3+0.5*X with a correlation coefficient of approximately 0.81. It should be obvious from the above that the correlation coefficient alone is not a good predictor of the goodness of the fit or, especially, the goodness of the fit for one data set relative to another. You should always view a graphical representation of a curve fit before making any judgments concerning the appropriateness of that fit.
|
Related macro commands |
____________________________
See also:
Page url: http://www.dplot.com/help/index.htm?helpid_curvefit.htm