Function std
Source pub fn std(args: &[Value]) -> Result<Value, RuntimeError>
Expand description
计算标准差
计算数字数组的样本标准差(方差的平方根)。
§返回值
Number - 样本标准差
std = √variance = √[Σ(xᵢ - mean)² / (n - 1)]
Set data [2, 4, 6, 8, 10]
Set sd Std(data) # 3.162...
Set scores [85, 90, 78]
Set sd Std(scores) # 6.0