Derivation Of Least Squares