1#ifndef STAN_MATH_PRIM_FUN_WELFORD_VAR_ESTIMATOR_HPP
2#define STAN_MATH_PRIM_FUN_WELFORD_VAR_ESTIMATOR_HPP
26 Eigen::VectorXd delta(q -
m_);
28 m2_ += delta.cwiseProduct(q -
m_);
welford_var_estimator(int n)
void sample_variance(Eigen::VectorXd &var)
void add_sample(const Eigen::VectorXd &q)
void sample_mean(Eigen::VectorXd &mean)
(Expert) Numerical traits for algorithmic differentiation variables.
scalar_type_t< T > mean(const T &m)
Returns the sample mean (i.e., average) of the coefficients in the specified std vector,...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...