How do I construct a straight line through data points?
can also be called:
Most scientists use a computer program to plot a best-fit line for a set of data but constructing one for yourself is a good way to learn how it's done. Because a computer isn't doing it, you may find that your "best-fit" line is slightly different from your lab partners. In most cases, that is okay, as long as you've mimicked the trend of the data.
Why (and when) should I use a best fit line?
If you find yourself faced with a question that asks you to draw a trend line, linear regression or best-fit line, you are most certainly being asked to draw a line through data points on a scatter plot. You may also be asked to approximate the trend, or sketch in a line that mimics the data. This page is designed to help you complete any of these types of questions. Work through it and the sample problems if you are unsure of how to complete questions about trends and best-fit lines.
How do I construct a best-fit line?A best-fit line is meant to mimic the trend of the data. In many cases, the line may not pass through very many of the plotted points. Instead, the idea is to get a line that has equal numbers of points on either side. Most people start by eye-balling the data.
- Take a look at the data and as yourself these questions
- Does the data look like a line? or a big blob? Try to approximate the general trend of the data with your mind (even if it's just a blob)
- Does the trend of the points look positively
- If you blur your eyes, can you see a thick line trending in one direction or another? This is another way to visualize the trend of the data.
- Now that you have an idea of the general trend of the data, there are two possible ways to construct a best-fit line by eye. You may use either of them; both are correct and relatively easy ways to get a pretty accurate representation of a best-fit line. Pick the one that makes the most sense to you. The first method involves enclosing the data in an area:
- Evaluate your best fit line. Think back to the questions in number 1. Does your line look like you thought it should?
- Do you see that there are approximately the same number of data points on each side of the line?
- And are they evenly distributed (that is, make sure that plots with a variety of x values are on top (and bottom) of the line, not most above at the low end and most below at the high end)?
- Does your line minimize the average distance from it to each of the data points?
You can also download and print a single sheet for constructing a best fit line with the area method (Acrobat (PDF) 33kB Sep10 08) or the dividing method (Acrobat (PDF) 34kB Sep10 08).
Where is this used in the geosciences?There are many instances in the geosciences where scientists use a best fit line. In the introductory geosciences, we use them for:
- flood frequency curves
- earthquake forecasting
- Meteorite impact prediction
- earthquake frequency vs. magnitude
- climate change
Next steps - Some practice problems
If you would like to know more about best-fit lines, you can use the links below to read more about them