# NavList:

## A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding

**Re: Linear regression and other tools**

**From:**Lars Bergman

**Date:**2018 Oct 11, 11:47 -0700

Brad,

A simple example may clarify what I am trying to explain. Consider three pairs of observational data:

X Y

3 15

4 20

5 30

A linear fit of these data gives the expression Y_{fit} = 7.5 · X - 8.333 which is a straight line that minimize the sum of the squares of the vertical distances between all given Y-values and that line. The formulas to get the two coefficients is shown at the link Tony pointed at.

The (arithmetic) mean of the X values is X_{mean} = (3 + 4 + 5) / 3 = 4. If you put this mean value into above expression you get Y_{fit} = 7.5 · 4 - 8.333 = 21.667. This result is actually precisely equal to the mean of the Y values, Y_{mean} = (15 + 20 + 30) / 3 = 21.667.

So the mean of your X-values and the mean of your Y-values is a point on that best fit line. You don't need to calculate the regression coeficients.

Lars