summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorDmitry Kutlenkov <kutlenkov.dmitri@gmail.com>2020-05-17 21:14:11 +0300
committerDmitry Kutlenkov <kutlenkov.dmitri@gmail.com>2020-05-17 21:14:11 +0300
commitec95e33b98e63b2b5e7bac31400c2c30998e052f (patch)
tree7cc4cbd7064dc78c0014ec9ed944b3eddde547e1 /numpy/core/fromnumeric.py
parent4f88a0267a3a4992aacde45df7719fdef713bedc (diff)
downloadnumpy-ec95e33b98e63b2b5e7bac31400c2c30998e052f.tar.gz
DOC: Clarifications for np.var
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index fa8941828..7193af839 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -3562,9 +3562,9 @@ def var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=np._NoValue):
Notes
-----
The variance is the average of the squared deviations from the mean,
- i.e., ``var = mean(abs(x - x.mean())**2)``.
+ i.e., ``var = mean(x)``, where ``x = abs(a - a.mean())**2``.
- The mean is normally calculated as ``x.sum() / N``, where ``N = len(x)``.
+ The mean is typically calculated as ``x.sum() / N``, where ``N = len(x)``.
If, however, `ddof` is specified, the divisor ``N - ddof`` is used
instead. In standard statistical practice, ``ddof=1`` provides an
unbiased estimator of the variance of a hypothetical infinite population.