 These differences must be considered whenever the solution to a nonlinear least squares problem is being sought.The method of least squares is often used to generate estimators and other statistics in regression analysis.Consider a simple example drawn from physics.