Linear Regression and Error Analysis