Functions vector_chi_squared¶
-
template<class
vec_t
, classvec2_t
, classvec3_t
>
doubleo2scl
::
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
, classvec2_t
, classvec3_t
>
doubleo2scl
::
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.