Title: General Principles of the Method of Least Squares, with Applications