AVEDEV
Returns the average of the absolute deviations of data points from their mean.
Syntax
expression.AVEDEV(args);
expression - A variable that represents a ApiWorksheetFunction class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| args | Required | ApiRange | ApiName | number | number[] | Up to 255 numeric values for which the average of the absolute deviations will be returned. The first argument is required, subsequent arguments are optional. Arguments can be numbers, names, or arrays of numbers. |
Returns
number
Example
Measure how spread out a set of numbers is from their average in a spreadsheet.
// Find the average distance of values from their mean in a spreadsheet.
// Summarize data variability by averaging all absolute deviations in a spreadsheet.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.AVEDEV(78, 98, 123, 45, 70, 67, 3, 9, 289));