Function vector_chi_squared (o2scl)

O2scl : Function List

template<class vec_t, class vec2_t, class vec3_t>
double o2scl::vector_chi_squared(size_t n, const vec_t &obs, const vec2_t &exp, const vec3_t &err)

Compute the chi-squared statistic.

This function computes

\[ \sum_i \left( \frac{\mathrm{obs}_i - \mathrm{exp}_i} {\mathrm{err}_i}\right)^2 \]
where \( \mathrm{obs} \) are the observed values, \( \mathrm{exp} \) are the expected values, and \( \mathrm{err} \) are the errors.

template<class vec_t, class vec2_t, class vec3_t>
double o2scl::vector_chi_squared(const vec_t &obs, const vec2_t &exp, const vec3_t &err)

Compute the chi-squared statistic.

This function computes

\[ \sum_i \left( \frac{\mathrm{obs}_i - \mathrm{exp}_i} {\mathrm{err}_i}\right)^2 \]
where \( \mathrm{obs} \) are the observed values, \( \mathrm{exp} \) are the expected values, and \( \mathrm{err} \) are the errors.