Math Homework. Do It Faster, Learn It Better.

Fitting Linear Equations to Data

If you are given two ordered pairs , you can find the equation of a line connecting them.

So, if you think that there is a linear relationship between two variables, you can use any two data points to create a linear model of the relationship.

(Remember that there may not always be a linear relationship. If your variables are the height of a tree on one axis, and the age of the tree on the other, a linear model might make sense. On the other hand, if your variables are the length of a person's hair on one axis and their blood pressure on the other, there is probably no relation at all, and the linear model you create will not be meaningful.)

If you have many ordered pairs of data, first make a scatter plot . Then find two points on or near the "line of best fit" (roughly, the line which most closely shows the general linear trend of the data), and find the equation of the line connecting them. (There are more sophisticated ways of finding the line of best fit, but they belong in a more advanced course!)