Sunday, 20 May 2007

st.statistics - calculate percentiles from a histogram

A histogram gives you the number ni of observations between some xi and xi+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 sumi=jinftynigeqpn. Then, the empirical upper p-percentile is between xj and xj+1.

No comments:

Post a Comment