{{sidenavigation.sidenavigationExpandLabel}}
{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}
{{$root.getMsg("downLoadHelpAsPdf")}} {{helpModel.downloadHelpPdfDataStatus}}

Variance

Returns the statistic variance of all instances of a field or array. The variance is defined as

variance.png

where M is the mean of values in a field and N is the number of values in a field.

Usage:

Variance( fld )
Variance( fld, condFld )
Variance( fld, condFld, cond )
Variance( array )

Parameters:

fld The name of a field whose values should be used to calculate the variance.
condFld The name of the field that groups the values of fld (if fld isn't an array).
cond A string declaring the type of grouping to be used on condFld. This only makes sense for groups based on Date, DateTime, Time, and Boolean fields. See Summary Field Conditions for a list of strings you can use here.
array The name of an array variable whose values should be used to calculate the variance.

Returns:

A number.

Examples:

//returns the value of variance for a field Temperature grouped by Region
variance({data.Temperatur}, {data.Region})
// connection of values, average and variance
local numbervar array dataset1 := [3,3,3,3,3];
local numbervar array dataset2 := [1,2,3,4,5];
average(dataset1);     // is 3
average(dataset2);     // is 3 as well!
variance(dataset1);    // is 0 because all values match the average
variance(dataset2);    // is 2.5 because the values are scattered

Notes:

  • If the values in fld should be grouped, a group based on condFld is needed. If the group does not exist in the report, you can add it using i-net Designer or using API method: Engine.addGroup.
i-net Clear Reports
This application uses cookies to allow login. By continuing to use this application, you agree to the use of cookies.


Help - Variance