mean ( seq -- x )
Statistics

Next:geometric-mean ( seq -- x )


Vocabulary
math.statistics

Inputs
seqa sequence


Outputs
xa non-negative real number


Word description
Computes the arithmetic mean of the elements in seq.

Examples
USING: math.statistics prettyprint ; { 1 2 3 } mean .
2


Errors
Throws a signal-error. (divide by zero) if the sequence is empty.

See also
geometric-mean, harmonic-mean

Definition