Skip to content
Sections
Personal tools
You are here: Home » Education » ME2016 » Interactive Numerical Methods » Curve Fitting

Curve Fitting

NOTE:  If the applet below does not appear, you may need to download the latest version of Java or enable Java applets in your browser (in IE: Tools/Internet Options/Advanced/Java)

Curve Fitting Theory

Consider the problem of fitting a polynomial through a set of data points: , ,..., .  The polynomial can be parameterized as:

where  and  are the parameters and  is the error or residual.

Note:  this problem is called linear regression because the equation above is linear in the coefficients , and not because the equation happens to represent a straight line.  Fitting the quadratic  would also be a linear regression problem.

To find the straight line that best fits the data set, we use a least-squares formulation:

Minimize  where 

For a straight line curve fit, the sum of squares of the residuals, , reaches a minimum where:

  and

To express how good of a fit this best-fit line is, one can consider the coefficient of determination:

where  is the total sum of squares of the residuals between the data points and the mean:

For additional details about Linear Regression, review "Chapter 17: Least Squares Regression" in Numerical Methods for Engineers by Chapra and Canale. A succinct on-line overview can be found at Wikipedia

You can also develop a better understanding of these concepts by exploring them interactively with the applet below.  

Start Exploring!

In the interactive window below you can perform the following operations:

  • Move a data point: click-and-drag a data point to a different position
  • Add a data point: ctrl-click in the location where you want to add it
  • Remove a data point: ctrl-click on the data point to be removed
  • Retrieve a pre-programmed data set: click on one of the buttons S0 through S3
  • Print this entire page: click the printer button at the top right of this web-page

Learn by Exploring

Created by cparedis
Contributors : Ivan Lee and Chris Paredis
(c) Ivan Lee and Chris Paredis 2006
Last modified 10/16/2006 08:53 PM
« July 2008 »
Su Mo Tu We Th Fr Sa
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
07/09/2008
15:30-16:30 SRL Meeting July 9th
Log in
 
 

Powered by Plone