geometric-mean ( seq -- x )
Statistics

Prev:mean ( seq -- x )
Next:harmonic-mean ( seq -- x )


Vocabulary
math.statistics

Inputs
seqa sequence


Outputs
xa non-negative real number


Word description
Computes the geometric mean of all elements in seq. The geometric mean measures the central tendency of a data set and minimizes the effects of extreme values.

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


Errors
Throws a signal-error. (square-root of 0) if the sequence is empty.

Definition