waltlabtools.core.gmnd

gmnd(data)[source]

Geometric meandian.

For details, see https://xkcd.com/2435/. This function compares the three most common measures of central tendency for a given dataset: the arithmetic mean, the geometric mean, and the median.

Parameters

data (array-like) -- The data for which to take the measure of central tendency.

Returns

central_tendencies (dict of str -> numeric) -- The measures of central tendency, ordered by their distance from the geometric meandian. Its keys are:

  • "gmnd" : geometric meandian (always first)

  • "arithmetic" : arithmetic mean

  • "geometric" : geometric mean

  • "median" : median