From ec95e33b98e63b2b5e7bac31400c2c30998e052f Mon Sep 17 00:00:00 2001 From: Dmitry Kutlenkov Date: Sun, 17 May 2020 21:14:11 +0300 Subject: DOC: Clarifications for np.var --- numpy/core/fromnumeric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/fromnumeric.py') 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. -- cgit v1.2.1