compute regression line for linear sequence