summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSteven D'Aprano <steve@pearwood.info>2016-10-04 16:24:45 (GMT)
committerSteven D'Aprano <steve@pearwood.info>2016-10-04 16:24:45 (GMT)
commitfae2829c7a3bd3ac1b2e57c1bc3894ce459af0e1 (patch)
treedecbc228cd60d473ad5ea58ad24574c7e4588c4b /Doc
parentd3dbba41744dd223f9367882c9e2e65a0c56138e (diff)
downloadcpython-fae2829c7a3bd3ac1b2e57c1bc3894ce459af0e1.zip
cpython-fae2829c7a3bd3ac1b2e57c1bc3894ce459af0e1.tar.gz
cpython-fae2829c7a3bd3ac1b2e57c1bc3894ce459af0e1.tar.bz2
Issue #27181 remove geometric_mean and defer for 3.7.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/statistics.rst29
1 files changed, 0 insertions, 29 deletions
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst
index 232fb752..c020a34 100644
--- a/Doc/library/statistics.rst
+++ b/Doc/library/statistics.rst
@@ -39,7 +39,6 @@ or sample.
======================= =============================================
:func:`mean` Arithmetic mean ("average") of data.
-:func:`geometric_mean` Geometric mean of data.
:func:`harmonic_mean` Harmonic mean of data.
:func:`median` Median (middle value) of data.
:func:`median_low` Low median of data.
@@ -113,34 +112,6 @@ However, for reading convenience, most of the examples show sorted sequences.
``mean(data)`` is equivalent to calculating the true population mean μ.
-.. function:: geometric_mean(data)
-
- Return the geometric mean of *data*, a sequence or iterator of
- real-valued numbers.
-
- The geometric mean is the *n*-th root of the product of *n* data points.
- It is a type of average, a measure of the central location of the data.
-
- The geometric mean is appropriate when averaging quantities which
- are multiplied together rather than added, for example growth rates.
- Suppose an investment grows by 10% in the first year, falls by 5% in
- the second, then grows by 12% in the third, what is the average rate
- of growth over the three years?
-
- .. doctest::
-
- >>> geometric_mean([1.10, 0.95, 1.12])
- 1.0538483123382172
-
- giving an average growth of 5.385%. Using the arithmetic mean will
- give approximately 5.667%, which is too high.
-
- :exc:`StatisticsError` is raised if *data* is empty, or any
- element is less than zero.
-
- .. versionadded:: 3.6
-
-
.. function:: harmonic_mean(data)
Return the harmonic mean of *data*, a sequence or iterator of