Background:
-----------------
In a Statistics 101 for Physical Scientists, you might get introduced to a data fitting problem with a definition of chi-square as
chi_square = Sum_i={1, N} { (data[i] - model[i, parameters]) / epsilon[i] }**2
that is there are N data points, M parameters (with M<N) and with N data points, and with epsilon being the estimate of the noise/variance in the data.
In the ideal case, a "Good Fit" will have chi_square ~(N-M), the degrees of freedom in the fit. So, "reduced chi-square" is
reduced_chi_square = chi_square / (N-M)
which will mean that a good fit will have reduced_chi_square = 1, in the ideal case. And error bars on parameters are typically defined such that they increase chi_square by 1.
Note that chi_square is used for two different purposes:
a) assessing the quality of the fit
b) estimating the error bars on the parameters.
In the field I work in there are decades-long debates about many of the terms in the definition of chi_square:
1. what is N? No, really this is subtle and hard. What constitutes an independent measurement? If you think every sample is obviously independent, you are probably wrong.
2. how do you accurately estimate epsilon? Basically, no one analyzes data for which simple estimates of uncertainties dominate. You can always make a better measurement until the point where you would spend more time estimating epsilon (which most sane people do not do) or the subtle assumption in your model start to fail. So easily estimated uncertainties for the data could be off by a factor 2 or 10 or 50.
As far as I know, in the physical sciences outside of "rare event particle physics", it is really rare to have data for which chi_square is easily determined and anywhere close to N-M. Being off by factors of 100 is not unusual. So, many people use chi_square (and related stats) to assess the quality of the fit. For error bars, they basically say:
"OK, let's assume this fit is 'Good'. If I scale the estimate of epsilon should be scaled by sqrt(reduced_chi_square).
That would make reduced_chi_square=1, and then the error bars will be those that increase chi_square by 1"
Another way to think about that is to say the error bars are those that increase chi_square by reduced_chi_square.
What happens in lmfit
------------------------------
By default (when `scale_covar=True`) lmfit reports "chi_square" and "reduced_chi_square" according to the epsilon used (and many, many people just use epsilon=1). The parameter uncertainties use the rescaled covariance matrix as suggested above. This effectively asserts that epsilon should have been set such that so that reduced_chi_square = 1, and then the reported uncertainties on the parameters are the "1-sigma" uncertainties or standard error.
For test cases where the uncertainties are actually known, this has been shown to be reliable. Perhaps surprisingly, the simple and fast estimates of parameter uncertainties from `leastsq` are usually quite close to the values determined by more-or-less brute force with conf_interval(). You have to go out of your way or have very asymmetrically and highly correlated parameters for the uncertainties from `leastsq` to be wrong enough to be misleading.
Hope that helps,
--Matt