AVG_DEV
Applies to PredictiveInsight only.
Syntax
AVG_DEV(data [, keyword])
Parameters
data
The values to compute the average deviation of. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your IBM® product.
keyword
This optional keyword determines how the computation is performed over the input data range. Select one of the following:
ALL - Performs the computation on all cells in data (default)
COL - Performs the computation separately for each column of data
ROW - Performs the computation separately for each row of data
For more details on using keywords in IBM® Campaign, see Format Specifications.
For more details on using keywords in IBM® PredictiveInsight, see Format Specifications.
Description
AVG_DEV calculates the average deviation of the values in the specified data range from the mean. The arithmetic mean is calculated by summing the contents of all cells divided by the number of cells. The full equation for AVG_DEV is as follows:
The number of columns returned by AVG depends on keyword.
*
If keyword is ALL, AVG returns one new column, containing a single value (the average deviation of all cells in data).
*
If keyword is COL, AVG returns a new column for each input column. Each new column contains one value (the average deviation of all cells in the corresponding input column).
*
If keyword is ROW, AVG returns one new column containing the average deviation across each row of data.
*
Examples
TEMP = AVG_DEV(MERGE(3, 4, 5)) or TEMP = AVG_DEV(MERGE(3, 4, 5), ALL)
Creates a new column named TEMP containing the value 0.67.
Creates a new column named TEMP containing the value 2.
Creates a new column named TEMP containing a single value which is the average deviation of the contents of column V1.
Creates a new column named TEMP containing a single value which is the average deviation of the contents of columns V1, V2, and V3.
Creates a new column named TEMP containing a single value which is the average deviation of the cells in rows 10-20 of column V1.
Creates a new column named TEMP containing a single value which is the average deviation of the cells in rows 1-5 of columns V1 through V4.
Creates three new columns named TEMP, VX, and VY. The single value in the TEMP column is the average deviation of the contents of column V1, the single value in the VX column is the average deviation of the contents of column V2, and the single value in the VY column is the average deviation of the contents of column V3.
Creates two new columns named TEMP and VX, both containing the single value 0.
Creates three new columns named TEMP, VX, and VY, each containing a single value. The value in column TEMP is the average deviation of the cells in rows 1-5 of column V1, the value in column VX is the average deviation of the cells in rows 1-5 of column V2, and the value in column VY is the average deviation of the cells in rows 1-5 of column V3.
Creates a new column named TEMP, containing a zero for each value of column V1 (the average deviation of any number is zero).
Creates a new column named TEMP where each cell entry is the average deviation of the corresponding row across columns V1, V2, and V3.
Creates a new column named TEMP, where the cells in rows 1-5 contain the average deviation of the corresponding row across columns V1 through V3. The other cells in TEMP are empty.
Related Functions
AVG or MEAN
SUM or TOTAL