Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

10.66 variance()

PrototypesHeader File(s)
double
variance(const RWMathVec<double>&)
<rw/math/mathvec.h>
float
variance(const RWMathVec<float>&)
<rw/math/mathvec.h>
double
variance(const RWMathVec<DComplex>&)
<rw/math/mathvec.h>
double
variance(const RWGenMat<double>&)
<rw/math/genmat.h>
float
variance(const RWGenMat<float>&)
<rw/math/genmat.h>
double
variance(const RWGenMat<DComplex>&)
<rw/math/genmat.h>
double
variance(const RWMathArray<double>&)
<rw/math/mtharray.h>
float
variance(const RWMathArray<float>&)
<rw/math/mtharray.h>
double
variance(const RWMathArray<DComplex>&)
<rw/math/mtharray.h>

10.66.1 Description

The function variance() takes a vector or matrix x as an argument and returns its variance y as in:

where <x> is the mean of the vector and N is the length of the vector or the number of rows times columns, in the case of a matrix. Note that this is the biased variance.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.