How To Calculate Least Squares Fit