cancel
Showing results for
Did you mean:

## Aggregate: Variance (Var) DC Motor

## Aggregate: Variance (Var)

Estimates the how much dispersion exists (how much the values are spread out) within a sample set of data. This aggregate function calculates the variance of the numeric values in the reference column (the column to which var is applied) among those rows that are identical.

All duplicate rows are discovered by conducting a column-by-column examination (excluding the column to which var is being applied) before they are collapsed into unique single rows. For each resulting single row, the value in the reference column from the contributing duplicate row becomes part of the variance calculation. The header of the reference column receives a name change to become “Var of <column name>”.

If there are text values in the reference column, they will be ignored within the varcalculation. Note also that the aggregate var function requires at least two values. In other words, there must be at least two identical rows available for aggregation for each unique single row that is returned. Rows that occur only once will contribute only one value in the reference column for the calculation—resulting in an error.

If the set under analysis represents all data points (referred to as a “population”) use of varp is recommended for a more accurate result. Related functions that deal with statistical variance are stdev and stdevp.

## Example

The dataset below will be used to show how var operates. All numbers are numeric values (not text) in order to illustrate behavior of this aggregate function.

Column AColumn BColumn C
onetwo0.2
onetwo0.1
onetwo1.1
onetwo0.2
onetwo0.6
oneone0.2
oneone0.27
onetwo0.2
onetwo0.4

As shown in the table below, applying the var function to Column C reduces the row count from nine to two. The value in the column Var of Column C shows the variance of theColumn C sample data values in the duplicate rows that were collapsed during the operation.

Column AColumn BVar of Column C
onetwo0.12333333333333334
oneone0.00245
Labels (1)
• ### Best Practices

0 Replies 