AVEDEV
返回数据点与其平均值的绝对偏差的平均值。
语法
expression.AVEDEV(args);
expression - 表示 ApiWorksheetFunction 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| args | 必需 | ApiRange | ApiName | number | number[] | 最多 255 个数值,将返回这些数值绝对偏差的平均值。第一个参数是必需的,后续参数是可选的。参数可以是数字、名称或数字数组。 |
返回值
number
示例
此示例演示如何返回数据点与其平均值之间绝对偏差的平均值。
// How to get an average of the absolute deviations.
// Use function to get the average of the absolute deviations of data points from their mean.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.AVEDEV(78, 98, 123, 45, 70, 67, 3, 9, 289));