std
なお,不偏標準偏差を求めるには
np.sqrt(sum(x**2)/(len(x)-1))
としなくてはならないが,これはnp.std(x,ddof=1) (ddofはDelta Degrees of Freedomの意味)で得ることができる.
標準偏差(standard deviation)を求める.xが平均ゼロのnumpy arrayだとすると
np.sqrt(sum(x**2)/len(x))
と同じ結果が得られる.
np.std obtains standard deviation. If x is the numpy array of zero-mean, then
np.std(x)
give the identical result as
np.sqrt(sum(x**2)/len(x))
Unbiased standard deviation (when each data are independent) can be given by
np.sqrt(sum(x**2)/(len(x)-1))
and the identical result is given by
np.std(x,ddof=1),
where ddof is the Delta Degrees of Freedom.