From 41de3c2d8c84dbfa406ccb77dd67d55f555bee8a Mon Sep 17 00:00:00 2001 From: Mad Physicist Date: Fri, 11 Dec 2015 16:47:43 -0500 Subject: 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. --- numpy/lib/function_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib/function_base.py') 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 -- cgit v1.2.1