# @VARIANCEP

The @VARIANCEP() function calculates the statistical variance of the specified data set (expList). The calculation is based upon the entire population. Variance is a measure of the dispersion of a set of data points around their mean (average) value.

Syntax

@VARIANCEP (SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH, expList)
ParameterDescription

SKIPNONE

Includes all cells specified in expList, regardless of their content, during calculation of the variance.

SKIPMISSING

Excludes all #MISSING values from expList during calculation of the variance.

SKIPZERO

Excludes all zero (0) values from expList during calculation of the variance.

SKIPBOTH

Excludes all zero (0) values and #MISSING values from expList during calculation of the variance.

expList

Comma-delimited list of member specifications, variable names, functions, or numeric expressions. expList provides a list of numeric values across which the variance is calculated.

Notes

• @VARIANCEP is different from @VARPER, which calculates the percent variance (difference) between two members.

• @VARIANCEP assumes that expList represents the entire population. If you want expList to represent a sample of the population, use @VARIANCE.

• @VARIANCEP is calculated using the "biased" or "n" method.

• @VARIANCEP uses the following formula:

Example

The following example is based on the Sample Basic database. Assume that the Measures dimension contains an additional member, Sales Var. This example uses the @RANGE function to generate expList and calculates the variance of the sales values for a product family.

FIX (Product)
"Sales Var" = @VARIANCEP(SKIPBOTH,@RANGE(Sales,@CHILDREN(Product)));
ENDFIX

This example produces the following report:

                                     Jan      New York
Actual        Budget
======        ======
Sales       Colas            678           640
Root Beer        551           530
Cream Soda       663           510
Fruit Soda       587           620
Diet Drinks      #MI           #MI
Product        2479          2300

Sales Var   Product         2765.69       3125