VARIANCE macro
The VARIANCE
macro
is available only in HCL®
Campaign.
Syntax
VARIANCE(data [, keyword])
Parameters
data
The
numerical values to compute the variance 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 HCL
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 HCL Campaign, see Format Specifications.
{ALL | COL | ROW}
. These
keywords do not apply in HCL
Campaign
because the input data is always a single column
or field. The macro will always behave as if the COL
keyword were specified. Therefore, you do not need to specify these
keywords when using HCL
Campaign .Description
VARIANCE
calculates the variance of all the values in the specified data range.
Variance is the standard deviation squared. The variance is calculated
as follows: where the x's are the samples, n is the number of samples, and mean is the average of the distribution.
VARIANCE
returns an error.Examples
TEMP = VARIANCE(V1) Creates
a new column named |
TEMP = VARIANCE(V1:V3)
Creates a new column named |
TEMP = VARIANCE(V1[10:20])
Creates a new column named |
TEMP = VARIANCE(V1[1:5]:V4)
Creates a new column named |
TEMP = VARIANCE(V1:V3, COL)
Creates three new columns named |
TEMP = VARIANCE_(V1[1:5]:V3, COL) or TEMP
= VARIANCE(V1[1:5]:V3[1:5], COL) Creates
three new columns named |
TEMP = VARIANCE(V1:V3, ROW)
Creates a new column named |
TEMP = VARIANCE(V1[1:5]:V3,ROW) or TEMP
= VARIANCE(V1[1:5]:V3[1:5], ROW) Creates
a new column named |