mean ( seq -- x )
Statistics
Next:geometric-mean ( seq -- x )


Vocabulary
math.statistics

Inputs and outputs
seqa sequence
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.

Definition
IN: math.statistics

: mean ( seq -- x ) 0 mean-ddof ; inline