# How good is a fit for a set of points?

Tags:
1. Oct 31, 2014

### Uriel

Hello, I have the following problem.

I have a system of differential equations, with two parameters that satisfy certain condition.

0 < 1.5(1-a) < b < 1.

So when I fix the value of a I can find values of b satisfying this and its associated equilibrium point.

When I calculate (with computer) the equilibrium points for this values and plot them I obtain the following:

https://dl.dropboxusercontent.com/u/38427886/plot.png [Broken]

And when I plot them on the same graph I have

https://dl.dropboxusercontent.com/u/38427886/plots.png [Broken]

As you can see, they seem to be on the same curve, so I made a polynomial fit of second degree. Now, from the fact that all the points for different a, seem to have the same behavior I would like to know how they deviate from the fit that I made to the last set (because it has more points to work with).

Here's where I'm stuck, because I don't know exactly what can I do.

The only idea that I have is to take the distance for every point to the curve, then square that, sum all the distances and finally divide for the number of points.

The think is, I want to know if anyone knows an intelligent way to know how well my discrete set of points adjust to a given curve.

P.S. (I know my English is terrible, I apologize)

Last edited by a moderator: May 7, 2017
2. Nov 1, 2014

### FactChecker

Your idea of the sum-squared-errors is fairly well known and accepted. And I think that averaging it to account for different numbers of points is a good one. Sometimes it is more important to be close in one dimension than in the other, so the errors on the two coordinates are weighted appropriately. Or you may have a reason to give different weights to different areas of the X-Y plane. That all depends on your application and you should be judicious and be ready to explain your reasons for the weights.