Function vector_stddev (o2scl)¶
-
template<class vec_t>
double o2scl::vector_stddev(size_t n, const vec_t &data)¶ Standard deviation with specified mean.
This function computes
\[ \sqrt{\frac{1}{N-1} \sum_{i} \left( x_i - \mu \right)^2} \]where \( \mu \) is the mean computed with vector_mean().This function produces the same results as
gsl_stats_sd()
.If
n
is 0 or 1, this function will call the error handler.
-
template<class vec_t>
double o2scl::vector_stddev(const vec_t &data)¶ Standard deviation with specified mean.
This function computes
\[ \sqrt{\frac{1}{N-1} \sum_{i} \left( x_i - \mu \right)^2} \]where \( \mu \) is the mean computed with vector_mean().This function produces the same results as
gsl_stats_sd()
.If
n
is 0 or 1, this function will call the error handler.
-
template<class vec_t>
double o2scl::vector_stddev(size_t n, const vec_t &data, double mean)¶ Standard deviation with specified mean.
This function computes
\[ \sqrt{\frac{1}{N-1} \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_m()
.If
n
is 0 or 1, this function will call the error handler.
-
template<class vec_t>
double o2scl::vector_stddev(const vec_t &data, double mean)¶ Standard deviation with specified mean.
This function computes
\[ \sqrt{\frac{1}{N-1} \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_m()
.If
n
is 0 or 1, this function will call the error handler.