之前做模型拟合的时候需要计算样本的方差和均值,Matlab的std函数算出来就是不对经,一看才知道matlab的给定的标准差计算公式是:
For a random variable vector A made up of N scalar observations, the standard deviation is defined as
where μ is the mean of A:
The standard deviation is the square root of the variance. Some definitions of standard deviation use a normalization factor of N instead of N-1, which you can specify by setting w
to