Functions and operators : VAR( )

VAR( )

Calculates the variance of a set of values. Variance is a statistical measure expressing how large the difference between the values are. The variance increases as the difference between the numbers increase.

Syntax

VAR(expr)

Arguments

expr

The expression specifying the values to use in the calculation. The data type must be numeric.

groupLevel

The numeric index of the group whose values to use in the calculation. 0 indicates the table, 1 indicates the first group, 2 indicates the second group, and so on. If you do not supply a value for groupLevel, the function performs the calculation over all the values in the table.

Returns

The variance of the specified set of values.

Example

The following example calculates the variance of values in the StockPrice data field at the table level.

VAR([StockPrice])

The following example calculates the variance of values in the TotalCost data field for each group at the first level.

VAR([TotalCost], 1)