LINEAR REGRESSION

Definition

The process of finding a line that accurately represents the trend of a collection of data points is called linear regression, and the least squares method is the most frequently used approach to finding a line that best represents a trend.

Interpretation:

Any non-vertical straight line (you'd be in a fine mess if your weight trend line were vertical, wouldn't you?) can be expressed in the form: 

Y = mX + b
where m is the slope, giving the change in the Y axis value for each unit change along the X axis, and b is the intercept, the point at which the line crosses the Y axis when X is zero.   Do you remember that equation from Algebra?   It's the equation of a line in slope intercept form.  

I bet you are asking, "crosses the Y axis, what Y axis?"   Do you keep using the same one over on the left side of the chart?   No, that would not give you an accurate line.   You will need to keep moving the axis, everytime you calculate a range of points.   On a 30-day linear regression, you will have a virtual Y axis every 30 days.

To find m and b for the line that best fits a collection of data points D1, D2, ....., Dn, we calculate: