Function vector_stddev_fmean (o2scl)¶
-
template<class vec_t>
double o2scl::vector_stddev_fmean(size_t n, const vec_t &data, double mean)¶ Standard deviation with specified mean known in advance.
This function computes
\[ \sqrt{\frac{1}{N} \sum_{i} \left( x_i - \mu \right)^2} \]where the value of \( \mu \) is given inmean
.This function produces the same results as
gsl_stats_sd_with_fixed_mean()
.If
n
is zero, this function will return zero without calling the error handler.
-
template<class vec_t>
double o2scl::vector_stddev_fmean(const vec_t &data, double mean)¶ Standard deviation with specified mean known in advance.
This function computes
\[ \sqrt{\frac{1}{N} \sum_{i} \left( x_i - \mu \right)^2} \]where the value of \( \mu \) is given inmean
.This function produces the same results as
gsl_stats_sd_with_fixed_mean()
.If
n
is zero, this function will return zero without calling the error handler.