- qspec.models. reduced_chi2 ( model , x , y , sigma_y )[source]
-
The reduced $\chi^2$ of a model with its current parameter values
model.vals$$ \chi^2_\mathrm{red} = \frac{1}{N - n}\sum\limits_{i=1}^N \left(\frac{y_i - f(x_i)}{\sigma_{y,i}}\right)^2, $$where $N$ is the number of data points and $n$ the number of free parameters.