Show 

Home > DQL Guide > DQL Lexicon > variance

variance

Type

Statistical Operator

Purpose

The variance operator calculates the average of the squared deviations from the mean (the average of the squared difference between each item value and the mean value) in a set of data. The result usually appears as a statistic in the summary area at the end of each group or the end of the report.

Syntax

FIELDNAME|VARIABLE : variance [other

 statistical operators] ; | .

Returns

A numeric value.

Usage

Variance is used as an indicator of variability in a set of data.

The variance operator can also be used when creating a report using Query by Model. To generate the variance in Query by Model, highlight the column whose variance you want to calculate, then select variance in the Summarize pick list.

Example

for MEMBERS with TOTAL DUE > 175 ;

list records

LAST NAME in order ;

TOTAL DUE : item mean sum variance .

end

 

This script tells DataEase: (1) Process all the MEMBERS records that have a value greater than $175 in the TOTAL DUE field, (2) list the members by LAST NAME in alphabetical order, and (3) list each member's TOTAL DUE and include the mean, sum, and variance of all the TOTAL DUE amounts in the report output.

The output from this query might look as follows:

 

Last Name

Total Due

Christino

$280.00

Perrault

$215.00

Stafford

$185.00

Strachan

$205.00

Mean Total Due:

$221.25

Sum Total Due

$885.00

Variance in data set:

$1689.58