finish linear regression formula