Page images
PDF
EPUB

JOURNAL OF RESEARCH of the National Bureau of Standards

Vol. 86, No. 1, January-February 1981

Fitting Curves and Surfaces with Monotonic and Non-
Monotonic Four Parameter Equations

John Mandel*

National Bureau of Standards, Washington, DC 20234

August 6, 1980

This is a series of three papers in which methods are presented, with instructions on computational details, on the empirical fitting of tabulated data. Part I deals with fitting functions of a single argument; Part II with functions of two arguments; and Part III with functions of three or more arguments.

Key words: Curve fitting; empirical fitting; surface fitting.

Part I. Fitting Functions of a Single Argument

1. Introduction

The ready availability of calculators and computers has had a profound effect on the use of tables of complicated functions. For example, in statistical work one may be required in a specific computer program, to call on critical values of the F distribution for specified degrees of freedom in the numerator and the denominator, at specified levels of significance. It is totally impractical to store the entire F table in the memory of the computer, but it is entirely feasible to let the computer calculate the required value by a suitable approximation formula.

Similar situations occur for physical or chemical properties that are tabulated as functions of temperature, pressure, wave-length, etc.

The object of this paper is to present a widely applicable procedure for finding empirical representations of tabulated values. The tabulated values are of course assumed to be derived from reasonably smooth functions of the arguments. The approximation formulas are expected to generate values that are practically interchangeable with the corresponding tabulated values.

We will present the procedure in three parts. Part I is concerned with the empirical fitting of curves, i.e., functions of a single argument. Part II deals with functions of two arguments. The case of functions of more than two arguments is discussed in Part III.

Part I consists of two sections. In section 1, we deal with monotonic functions, and in section 2, with functions that have a single maximum or a single minimum.

2. Monotonic functions

2.1 The general formula

Polynomials, which are widely used for empirical fitting, have well-known shortcomings for the fitting of monotonic functions: they often have undesirable maxima, minima, and inflection points. The formula we propose in this section applies to monotonic functions, with or without a single inflection point in the range over which the curve is fitted. The formula is

[merged small][subsumed][ocr errors][merged small]

for

where (x,y) are the coordinates of the points to be fitted by a monotone curve; and x.,y.,A, and B are four parameters the values of which have to be estimated. Note that B need not be an integer.

A simpler formula would be:

y=y.+A(x-x.) B

(2)

but this formula presents difficulties for x<x, because of the ambiguity of defining (x - x) for negative values of x-x.. Equation (1) is totally free of this shortcoming. We will refer to eq (1) as the "four parameter equation" for monotonic functions and denote it by the symbol MFP.

2.2 Nature of the MFP function

Table 1 presents the properties of the MFP function in diagrammatic form. The function is defined for the entire range x = -∞ to x = +∞∞. Note that for B<o, the curve is discontinuous at x, and consists essentially of two branches, each of which is free of points of inflection. Note also that in this case (B<0), the curve has finite asymptotes, equal to y., both at + and -∞.

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]

For B>o, y becomes infinite both at x = -∞ and x = +∞ and has a point of inflection at x.

For B = 1, the curve becomes a straight line and for B = o, it becomes a constant. It is worth noting that the curve is increasing when AB>o and decreasing when AB<o.

It is apparent that by choosing appropriate portions of the curve, with the proper parameter values, great flexibility is available, and it may therefore be expected that the curve will provide good fits for many sets of empirical data representing monotone functions with no more than one point of inflection. This does not mean, of course, that it will provide satisfactory fits for all sets of monotone data.

Figures (1a) through (le) show some examples of curves that were generated by eq (1). The four parameters are given for each case. The figures demonstrate the flexibility that can be achieved through the use of this general formula.

2.3 Method of fitting

The procedure we use for finding the four parameters consists of two steps: (a) finding initial values for x. and B; (b) iterating, using the Gauss-Newton procedure, to improve these estimates.

[blocks in formation]

Both steps are presented with a great deal of detail, in spite of the fact that standard procedures can be found in the literature for non-linear fitting. The reason for this is the intent to make this paper essentially self-contained.

[merged small][merged small][merged small][merged small][ocr errors][merged small][merged small]

which is the equation of a straight line in y, versus z1, for which the intercept y, and the slope A are readily estimated by linear regression.

The variable z, can be regarded as a reexpression of x, in a transformed scale. The new scale must be such that z, is linearly related to y. For the purpose of comparing different pairs of (x.,B) in achieving a good fit, a convenient measure is therefore the correlation coefficient between z, and y. We will use this measure throughout the paper with the understanding that it is merely a comparative measure for the adequacy of a (x,B) pair of values, and that we are not concerned here with the statistical properties of this measure.

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small]

Now x and y are given for N points of the curve, and y', can be approximately calculated for the midpoints of the intervals between successive x-values. The value of y can also be estimated approximately at these midpoints. This yields N-1 sets of values x, y, and y', from which xy', can be calculated. A multiple linear regression of y on xy', and on y',, allowing for the constant term y., then gives estimates of the coefficients Yo, and. We ignore the first and use the two others to estimate x, and B.

B

2.5 Illustrative example for finding initial values of x, and B

An important statistical application of empirical curve and surface fitting is to represent standard statistical tables by formulas that can be used for ready interpolation or for incorporation into computer programs. Our first example is the two-tail 5 percent critical value of Student's t, for values of v, the degrees of freedom, ranging from 2 to ∞. The data used for the fit consist of 20 selected pairs of (v, t.), where t, is the critical value in question [2]. The data are given in table 2. We substituted 10,000 for v = ∞.

The calculations for the initial values estimation are shown in table 3. The midpoints of x and y are denoted x and ym. The derivative y', is approximated by ▲y/▲x (column 5). For example:

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]

The multiple linear regression is carried out by regressing column (4) on a column consisting of unity for all rows (for the coefficient y.) and on columns (6) and (5). Thus, the first observational equation is:

[blocks in formation]
« PreviousContinue »