Fitting a Line to Your Data

After you have done the experiment part of your Science Fair Project, you will most likely have some data that you recorded (for example, time and distance). In most situations, you will have two variables that you are comparing. One variable is called the independent variable, the other is called the dependent variable.

Independent or Dependent?

How can I figure out which variable is independent and which variable is dependent? There are a couple ways to think about it:

Why does it matter if the variable is independent or dependent?

This is the easy part. The independent variable is represented by the x axis, and the dependent variable is represented by the y axis on your graph.

Then simply plot the points where the values coincide. You may be able to connect these points to form a line (or come fairly close). This is where line fitting comes in.

For example, If we are given two points (x1, y1) and (x2, y2) there is only one line that can pass through both of them.

2 point line

If, however, we have more than two points we will not generally be able to find a line that exactly fits the data. There is still one line that best represents the data, but it does not follow through each point.

n points line

The mathematical technique to find a line (or curve) that best matches the points of data that you collected is called regression.

How to do Linear Regression and include it in your results:

See also