(statistics) The calculation of a curve of some particular character (as a logarithmic curve) that most closely approaches a number of points in a plane.
| Sci-Tech Dictionary: curve fitting |
(statistics) The calculation of a curve of some particular character (as a logarithmic curve) that most closely approaches a number of points in a plane.
| 5min Related Video: Curve fitting |
| Sci-Tech Encyclopedia: Curve fitting |
A procedure in which the basic problem is to pass a curve through a set of points, representing experimental data, in such a way that the curve shows as well as possible the relationship between the two quantities plotted. It is always possible to pass some smooth curve through all the points plotted, but since there is assumed to be some experimental error present, such a procedure would ordinarily not be desirable. See also Interpolation.
The first task in curve fitting is to decide (1) how many degrees of freedom (number of unspecified parameters, or independent variables) should be allowed in fitting the points, and (2) what the general nature of the curve should be. Since there is no known way of answering these questions in a completely objective way, curve fitting remains something of an art. It is clear, however, that one must make good use of any background knowledge of the quantities plotted in order to answer the two questions. Thus, if one knew that a discontinuity might occur at some value of the abscissa, one would try to fit the points above and below that value by separate curves.
Against this background knowledge of what the curve should be expected to look like, one may observe the way the points fall on the paper. One may even find it advantageous to make a few rough attempts to draw a reasonable curve “through” the points.
A knowledge of the accuracy of the data is needed to help answer the question of the number of degrees of freedom to be permitted in fitting the data, If the data are very accurate, one may use as many degrees of freedom as there are points. The curve can then be made to pass through all the points, and it serves only the function of interpolation. At the opposite extreme when the data are very rough, one may attempt to fit the data by a straight line representing a linear relation, Eq. (1), between
1. 
y and x. Using the above information and one's knowledge of the functions that have been found useful in fitting various types of experimental curves, one selects a suitable function and tries to determine the parameters left unspecified. At this point there are certain techniques that have been worked out to choose the optimum value of the parameters.
One of the most general methods used for this purpose is the method of least squares. In this method one chooses the parameters in such a way as to minimize the sum, Eq. (2), where
2. ![S = \sum^n_{i=1}[y_i - f(x_i)]^2](http://content.answers.com/main/content/img/McGrawHill/Encyclopedia/math/2d288a7fd445942f587fa29426351e79.png )
yi is the ordinate of ith point and f(xi) the ordinate of the point on the curve having the same abscissa xi as this point. See also
| Wikipedia: Curve fitting |
Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. Curve fitting can involve either interpolation, where an exact fit to the data is required, or smoothing, in which a "smooth" function is constructed that approximately fits the data. A related topic is regression analysis, which focuses more on questions of statistical inference such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization, to infer values of a function where no data are available, and to summarize the relationships among two or more variables. Extrapolation refers to the use of a fitted curve beyond the range of the observed data, and is subject to a greater degree of uncertainty since it may reflect the method used to construct the curve as much as it reflects the observed data.
Contents |
Let's start with a first degree polynomial equation:

This is a line with slope a. We know that a line will connect any two points. So, a first degree polynomial equation is an exact fit through any two points.
If we increase the order of the equation to a second degree polynomial, we get:

This will exactly fit a simple curve to three points.
If we increase the order of the equation to a third degree polynomial, we get:

This will exactly fit four points.
A more general statement would be to say it will exactly fit four constraints. Each constraint can be a point, angle, or curvature (which is the reciprocal of the radius of an osculating circle). Angle and curvature constraints are most often added to the ends of a curve, and in such cases are called end conditions. Identical end conditions are frequently used to ensure a smooth transition between polynomial curves contained within a single spline. Higher-order constraints, such as "the change in the rate of curvature", could also be added. This, for example, would be useful in highway cloverleaf design to understand the forces applied to a car, as it follows the cloverleaf, and to set reasonable speed limits, accordingly.
Bearing this in mind, the first degree polynomial equation could also be an exact fit for a single point and an angle while the third degree polynomial equation could also be an exact fit for two points, an angle constraint, and a curvature constraint. Many other combinations of constraints are possible for these and for higher order polynomial equations.
If we have more than n + 1 constraints (n being the degree of the polynomial), we can still run the polynomial curve through those constraints. An exact fit to all the constraints is not certain (but might happen, for example, in the case of a first degree polynomial exactly fitting three collinear points). In general, however, some method is then needed to evaluate each approximation. The least squares method is one way to compare the deviations.
Now, you might wonder why we would ever want to get an approximate fit when we could just increase the degree of the polynomial equation and get an exact match. There are several reasons:
Now that we have talked about using a degree too low for an exact fit, let's also discuss what happens if the degree of the polynomial curve is higher than needed for an exact fit. This is bad for all the reasons listed previously for high order polynomials, but also leads to a case where there are an infinite number of solutions. For example, a first degree polynomial (a line) constrained by only a single point, instead of the usual two, would give us an infinite number of solutions. This brings up the problem of how to compare and choose just one solution, which can be a problem for software and for humans, as well. For this reason, it is usually best to choose as low a degree as possible for an exact match on all constraints, and perhaps an even lower degree, if an approximate fit is acceptable.
For more details, see the polynomial interpolation article.
Other types of curves, such as conic sections (circular, elliptical, parabolic, and hyperbolic arcs) or trigonometric functions (such as sine and cosine), may also be used, in certain cases. For example, trajectories of objects under the influence of gravity follow a parabolic path, when air resistance is ignored. Hence, matching trajectory data points to a parabolic curve would make sense. Tides follow sinusoidal patterns, hence tidal data points should be matched to a sine wave, or the sum of two sine waves of different periods, if the effects of the Moon and Sun are both considered.
For algebraic analysis of data, "fitting" usually means trying to find the curve that minimizes the vertical (i.e. y-axis) displacement of a point from the curve (e.g. ordinary least squares). However for graphical and image applications geometric fitting seeks to provide the best visual fit; which usually means trying to minimize the orthogonal distance to the curve (e.g. total least squares), or to otherwise include both axes of displacement of a point from the curve. Geometric fits are not popular because they usually require non-linear and/or iterative calculations, although they have the advantage of a more aesthetic and geometrically accurate result.
Coope[1] approaches the problem of trying to find the best visual fit of circle to a set of 2D data points. The method elegantly transforms the ordinarily non-linear problem into a linear problem that can be solved without using iterative numerical methods, and is hence an order of magnitude faster than previous techniques.
The above technique is extended to general ellipses[2] by adding a non-linear step, resulting in a method that is fast, yet finds visually pleasing ellipses of arbitrary orientation and displacement.
Note that while this discussion was in terms of 2D curves, much of this logic also extends to 3D surfaces, each patch of which is defined by a net of curves in two parametric directions, typically called u and v. A surface may be composed of one or more surface patches in each direction.
For more details, see the computer representation of surfaces article.
Many statistical packages such as R and numerical software such as the GNU Scientific Library, SciPy and OpenOpt include commands for doing curve fitting in a variety of scenarios. There are also programs specifically written to do curve fitting; see the external links section below for more details.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)
| Best of the Web: Curve fitting |
Some good "Curve fitting" pages on the web:
Math mathworld.wolfram.com |
| smoothed data (statistics) | |
| navigation accuracy measurement system (navigation) | |
| Statistical Curve Fitting (in accounting) |
| What is the application of curve fitting in enggineering? | |
| Difference between line of best fit and curve of best fit? | |
| Curve fitting y equals ax plus b least square fitting? |
Copyrights:
![]() | Sci-Tech Dictionary. McGraw-Hill Dictionary of Scientific and Technical Terms. Copyright © 2003, 1994, 1989, 1984, 1978, 1976, 1974 by McGraw-Hill Companies, Inc. All rights reserved. Read more | |
![]() | Sci-Tech Encyclopedia. McGraw-Hill Encyclopedia of Science and Technology. Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Read more | |
![]() | Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Curve fitting". Read more |
Mentioned in