Weighted Least Squares Formula Explained