Calculates the standard deviation of the specified data set (expList). The calculation is based upon a sample of a population. Standard deviation is a measure of how widely values are dispersed from their mean (average).
This function assumes that expList represents a sample of a population. If you want expList to represent the entire population, use @STDEVP. For large samples, the functions return similar values.
@STDEV is calculated using the "nonbiased" or "n-1" method.
@STDEV uses the following formula:
Syntax
@STDEV (SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH, expList)
Parameter | Description |
---|---|
SKIPNONE | Includes all cells specified in expList, regardless of their content, during calculation of the standard deviation. |
SKIPMISSING | Excludes all #MISSING values from expList during calculation of the standard deviation. |
SKIPZERO | Excludes all zero (0) values from expList during calculation of the standard deviation. |
SKIPBOTH | Excludes all zero (0) values and #MISSING values from expList during calculation of the standard deviation. |
expList | Comma-delimited list of member specifications, variable names, functions, or numeric expressions. expList provides a list of numeric values across which the standard deviation is calculated. |
Notes
The @STDEV function replaces the @STDDEV function. The only difference between the functions is the SKIP parameter in the @STDEV function. Although the old @STDDEV function is supported for migration purposes, you can no longer select it in the Calculation Script Editor or Formula Editor.
Example
The following example is based on the Sample Basic database. Assume that the Measures dimension contains an additional member, Std Deviation. This example calculates the standard deviation (based on a sample of a population) of the sales values for all products and uses the @RANGE function to generate expList.
FIX (Product) "Std Deviation" = @STDEV(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 Std Deviation Product 60.73 64.55
See Also