mean_chi_squared#

ctis.inverters.merit.mean_chi_squared(observed, expected, uncertainty, axis=None)[source]#

Compute \(\langle \chi^2 \rangle = \biggl\langle \left( \frac{O - E}{\sigma} \right)^2 \biggr \rangle\) , where \(O\) is the observed value, \(E\) is the expected value, and \(\sigma\) denotes the standard deviation of the uncertainty.

Parameters:
  • observed (ScalarArray) – The measured values.

  • expected (ScalarArray) – The values predicted by the model.

  • uncertainty (ScalarArray) – The uncertainty of the values predicted by the model.

  • axis (None | str | Sequence[str]) – The logical axis or axes over which to average the result.

Return type:

ScalarArray