Why does standard deviation retain the measurement unit?
std takes the square root of mean squared deviations. By default the denominator is the population count N.
numpy.std in practice
Readings two and six kilowatts sit two kilowatts from their mean of four. The default deviation is two kilowatts. State the degrees-of-freedom correction when estimating from a sample.
import numpy as np
np.std([2,6],ddof=0)Result 2.0
中文
标准差为什么和原测量使用相同单位?
std 对离均差的平方求平均后开平方,默认用总体分母 N。
numpy.std 算例
2 和 6 千瓦围绕 4 千瓦各偏离 2,默认标准差为 2 千瓦。用样本估计时需明确报告选择的自由度修正。
import numpy as np
np.std([2,6],ddof=0)结果 2.0