-------- Original-Nachricht --------

Datum: Mon, 17 Dec 2007 15:31:03 +0900

Von: Phil R. [email protected]

An: [email protected]

Betreff: Re: Curve fitting to data

data:

-1 99

10 0

fitting 21 data points with 4 parameters.

Dear Phil,

it is of course preferable to have some idea about the underlying

relationship between data graphed, such as

y = a*x^2 + b*x + c,

and then fit that model (this can be done by solving a linear

equation,

Matrix([x_0^2,x_0,1],…,[x_n^2,x_n,1])*([a,b,c]^transpose)=[y_0,…,y_n]^transpose

(numbering data points as ((x_0,y_0),…(x_n,y_)) and

[…] indicating rows in the matrix or row vectors)),

as this is a linear equation in the parameters a,b,c .

You can do that with any software that solves linear or matrix

equations, i.e., rsruby or rb-gsl .

It is of course also true that one can basically draw arbitrary

curves to connect data points, if you don’t know that a model

like the above is “true”.

Now, one additional line of thought is pursued in the discipline

of “approximation theory” (see eg., Wikipedia, or for a deeper

insight,

http://books.google.de/books?id=ODZ1OYR3w4cC&dq=powell+approximation+theory&pg=PP1&ots=EcBMamoYaB&sig=YUJjf_bhjy65LEFeC963CrjwPV4&prev=http://www.google.de/search?q=powell+approximation+theory&ie=utf-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&sa=X&oi=print&ct=title&cad=one-book-with-thumbnail&hl=de#PPA93,M1).

Here, one starts with a points, as yours, and asks,

Given a distance measure between the data and the curve (“norm”) and a

set of admissible model curves (e.g., all continuous curves on an

interval),

which curves will minimize that norm ?

There are indeed some results available, such as Chebyshev or

Remez(Remes) approximation procedures.

This kind of procedure can be recommended when the functional

relationship of your data is rather complicated/not enormously

interesting/you distrust

simple models, you know something about the general wiggliness of the

underlying curve (see the Jackson theorems in Powell’s book), and you

need to have information about what you would have measured at some

point you didn’t actually measure and the result should be not too far

off …

Best regards,

Axel