COBOL Manual for TNS and TNS/R Programs
Intrinsic Functions
HP COBOL Manual for TNS and TNS/R Programs—522555-006
14-31
MEAN Function
MEAN Function
MEAN, a numeric function, returns the arithmetic mean (average) of its arguments.
argument
is a numeric argument.
argument can be an array; for example,
FUNCTION MEAN (ARRAY1(ALL))
returns the arithmetic mean of the elements of the array ARRAY1.
The returned value is the arithmetic mean (average) of the argument series; that is
where n is the number of arguments.
( )
MEANFUNCTION argument
VST440.vsd
argument
i
i
1=
n
∑
n
------------------------