Hi,


Could someone explain to me or point out some documentation on how to compute a given percentile from a histogram ?



calculate percentiles from a histogram
A histogram gives you the number $n\_i$ of observations between some $x\_i$ and $x\_{i+1}$. I'm assuming a total of $n$ observation. So, to get an approximation for the upper $p$-percentile, you want to find the maximal $j$ such that $\sum\_{i=j}^\infty n\_i\geq p\*n$. Then, the empirical upper $p$-percentile is between $x\_j$ and $x\_{j+1}$.


