ABSTRACT
In this chapter we are going to learn how to fit measurement data to a model using the least squares method. We will also discuss something about error and accuracy in data fitting.
Figure 10.1 shows a plot of some experimental data, where we measured y as a function of x. We would like to fit a third-order polynomial of the following form to this data:
yˆ = a1 + a2x+ a3x 2 + a4x
3. (10.1)
We could write the model as a product of a matrix and a vector:
yˆ = Xa. (10.2)
The X matrix is often called the design matrix and the vector a contains the fit parameters. Equation 10.2 is actually given as
yˆ1 yˆ2 yˆ3 ... yˆN
=
1 x1 x 2 1 x
1 x2 x 2 2 x
1 x3 x 2 3 x
... ...