Fix the interpolation formulae which led to absurd results.  For quantile() and percentile(). 
Fix the interpolation formulae which led to absurd results.  For quantile() and percentile(). 

Fix the interpolation formulae in the docs which led to absurd results.  For quantile() and percentile().

Example, for median of a = [1,2,10,11], you expect to obtain i+g=2.5 for method = linear (or weibull, or hazen, or median_unbiased or normal_unbiased).

Instead, you obtain a /negative/ index.

The correted formula is:

i + g = q * (n - alpha - beta + 1 ) + alpha

Notice among other things that n belongs in the numerator, not the denominator! 

As a check, the corrected formula does lead to the correct index 2.5 for each of the cases above.

MYSTERY: Surely the original formula was the result of a small typo/thinko?  Then, why does the correction look so completely different?

RESOLUTION OF MYSTERY: 
Take our formula, massage it, and swap q with (i+g), and you end up with the original formula.
In other words, the original author of the doc. simply confused their percentile with their index halfway through the creation of the doc. Then, they massaged it to isolate (i+g) on the left.
numpy/numpy,mattip/numpy,rgommers/numpy,rgommers/numpy,numpy/numpy,endolith/numpy,charris/numpy,mhvk/numpy,mhvk/numpy,rgommers/numpy,charris/numpy,mattip/numpy,mhvk/numpy,endolith/numpy,anntzer/numpy,mattip/numpy,charris/numpy,mattip/numpy,anntzer/numpy,anntzer/numpy,numpy/numpy,rgommers/numpy,anntzer/numpy,endolith/numpy,mhvk/numpy,charris/numpy,mhvk/numpy,endolith/numpy,numpy/numpy