Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

STANDARD-DEVIATION - Standard deviation of arguments

The STANDARD-DEVIATION function returns a numeric value that approximates the standard deviation of its arguments.
The type of this function is numeric.

Format


FUNCTION STANDARD-DEVIATION ({argument-1}...)


Argument

  1. argument-1 must be class "numeric".

Returned values

  1. The returned value is the approximation of the standard deviation of the argument series.

  2. The returned value is calculated as follows:

    • The difference between each argument value and the arithmetic mean of the argument series is calculated and squared.

    • The values obtained are then added. This quantity is divided by the number of values in the argument series.

    • The square root of the quotient obtained is then calculated. The returned value is the absolute value of this square root.

  3. If the argument series consists of only one value, or if the argument series consists of all variable occurrence data items and the total number of occurrences for all of them is one, the returned value is zero.

  4. The error default value is -1.


See also:
        VARIANCE

Example 9-43

...
DATA DIVISION.
WORKING-STORAGE SECTION.
01  R PIC 99V9999.
01  RES PIC 99.9999.
PROCEDURE DIVISION.
P1 SECTION.
MAIN.
    COMPUTE R = FUNCTION STANDARD-DEVIATION (2 4 6).
    MOVE R TO RES.
    DISPLAY RES UPON T.
    STOP RUN.

Result:               01.6329