#### Variance

- Variance(Number a[ ])
- Variance(Currency a[ ])
- Variance(DBField field)
- Variance(DBField field, String groupby)

This function computes the variance of all the values referred to by the argument.

Parameters

- a - A Number array.
- field - Values of DBField or formula field.
- groupby - A constant string which indicates the DBField, formula or parameter grouped by.

Return value

Returns a Number type value.

Examples

- `Number x = Variance([1.0, 2.0, 3.0, 4.5, 45.0, 67.0])`
- `Number x[6] = [1.0, 2.0, 3.0, 4.5, 45.0, 67.0];
  Number y = Variance(x)`
- `Number x = Variance(@dbfield)`
- `Number x = Variance(@formula)`
- `Number x = Variance(@dbfield, @dbfield_groupby)`
- `Number x = Variance(@dbfield, @formula_groupby)`
- `Number x = Variance(@dbfield, @parameter)`

Note: If a field_variable is assigned to a variable, for example x, the variable x will lose the characteristic of representing a group of values. So, the following formula will be treated as incorrect.

`Number x = @dbfield;
Number y = Variance(x); // system will prompt you that there is no such kind of function.`