Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ variance() [3/7]

template<typename EigMat , require_eigen_t< EigMat > * = nullptr, require_not_vt_var< EigMat > * = nullptr>
value_type_t< EigMat > stan::math::variance ( const EigMat &  m)
inline

Returns the sample variance (divide by length - 1) of the coefficients in the specified matrix.

Template Parameters
EigMattype inheriting from EigenBase that does not have an var scalar type.
Parameters
mmatrix
Returns
sample variance of coefficients
Exceptions
<code>std::invalid_argument</code>if the matrix has size zero

Definition at line 25 of file variance.hpp.