# Homework Help: 'best-fit' line on a graph

1. Sep 30, 2007

### MIA6

I have a question about the 'best-fit' line on a graph. Usually, in my physics lab, we did experiment, then plot the points on a graph. After that, my teacher would let us draw a best-fit line. However, we didn't connect the points to make this best-fit line since my teacher said many times that drawing a best-fit line doesn't mean to connect the points but go between these points. But sometimes how can you figure out this is a straight line or a curve (parabola)? How can you find the slope since you don't know which two points are actually on the line? However, when I took a physics exam, the question let me plot the points given on the table, then I did. Next, let me draw a best-fit line, so I drew a line that kind of go between the points, however, I saw other people draw a line that connecting these points, half a parabola. And It was correct. so I must be wrong. I am so confused with the best-fit line. Hope you can help.

2. Sep 30, 2007

### EnumaElish

A unique k-th order polynomial can always be fitted to k arbitrary points. That polynomial is guaranteed to go through each point in the data. But sometimes that's not practical. Imagine a data set with one million points. In this case the unique polynomial must have one million terms. The alternative is to average out the points using the technique of least squares. Even then, there is a question of functional form. To continue with the example of one million points, a 10th-order polynomial is almost guaranteed to be a better fit than a 5th-order polynomial (can you think of the reason)? A useful statistic is the adjusted R-square.

3. Sep 30, 2007

### Proggle

There is no absolute method for fitting curves. It's a matter of balance between what is simple to work with and what is accurate.

Like Enuma said, you could come up with a function that goes through all points, but that is not practical most of the time.

If you have a plot that behaves in an approximately linear way (a straight line represents the trend of the data points), it is very easy to work with a linear fit.

When you fit it manually, what you are trying to do is visually minimize the sum of the errors. The error is the vertical distance between the fit and the actual point, so you may be tempted to try and draw the line passing exactly through the points. But many times, the way to minimize the sum of the errors involves coming close to most points, rather than being exact on a few.

Not sure how clear that was, but I hope it helps.

4. Sep 30, 2007

### dlgoff

To know how well your equation matches your data you can determine what's called Goodness of fit.