Pierre GM wrote:
On Dec 18, 2009, at 10:34 PM, Andrew Straw wrote:
Fernando Perez wrote:
On Fri, Dec 18, 2009 at 2:28 PM, Andrew Straw <strawman@...36...> wrote:
(This still leaves open the question of what the notches actually _are_...)
No idea. I'd still leave the code instead written as
notch_max = med + (iq/2) * (pi/np.sqrt(row))
Further searching turned this up: http://seismo.berkeley.edu/~kirchner/eps_120/Toolkits/Toolkit_01.pdf
It says that
median +/- 1.57 * (iq / sqrt(n)) is the median, plus or minus its standard error.
I can't find any further support for this notion, though.
Looks like the std error of the median is (1.253*std error of the mean=1.253*std dev/sqrt(nb of obs)).
The 1.57 looks like it's 1.253^2, but I wouldn't bet anything on it...
Also, I think that formula is only for normally distributed data. Which, especially if you're using boxplots, medians, and quartiles, may not be a valid assumption.
Maybe we should at least raise a warning when someone uses notch=1. The current implementation seems dubious, at best, IMO.