summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorMad Physicist <madphysicist@users.noreply.github.com>2015-12-11 16:47:43 -0500
committerMad Physicist <madphysicist@users.noreply.github.com>2015-12-11 16:47:43 -0500
commit41de3c2d8c84dbfa406ccb77dd67d55f555bee8a (patch)
tree93cc537351d4283e2c5131d82e2c6f14bbfb5012 /numpy/lib/function_base.py
parentdcdc9dea7863685cc04ddb89c6da6e466cab3ed3 (diff)
downloadnumpy-41de3c2d8c84dbfa406ccb77dd67d55f555bee8a.tar.gz
Updated typos in histogram bin estimator equations
In all cases, it's either ...*n^(-1/3) or .../n^(1/3), not both. The actual functions are implemented correctly.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 9261dba22..3298789ee 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -268,14 +268,14 @@ def histogram(a, bins=10, range=None, normed=False, weights=None,
large datasets respectively. Switchover point is usually x.size~1000.
'FD' (Freedman Diaconis Estimator)
- .. math:: h = 2 \\frac{IQR}{n^{-1/3}}
+ .. math:: h = 2 \\frac{IQR}{n^{1/3}}
The binwidth is proportional to the interquartile range (IQR)
and inversely proportional to cube root of a.size. Can be too
conservative for small datasets, but is quite good
for large datasets. The IQR is very robust to outliers.
'Scott'
- .. math:: h = \\frac{3.5\\sigma}{n^{-1/3}}
+ .. math:: h = \\frac{3.5\\sigma}{n^{1/3}}
The binwidth is proportional to the standard deviation (sd) of the data
and inversely proportional to cube root of a.size. Can be too
conservative for small datasets, but is quite good