fitting functions output reduced chi-squared as error