Percentile
A percentile locates a value within an ordered distribution. The 95th percentile, often written p95, describes a point near the upper end: approximately 95% of the distribution lies at or below it. For finite samples, the exact value depends on the calculation convention and ties.
Sort before finding the position
Consider 20 request durations: 18 are 50 ms and two are 1,000 ms. Under the nearest-rank convention, the p95 position is the ceiling of 0.95 ร 20, which is 19. The 19th sorted value is 1,000 ms. The mean is (18 ร 50 + 2 ร 1,000) / 20 = 145 ms.
This illustrates why a mean and a high percentile can describe different aspects of the same requests. A p95 of 1,000 ms does not mean that 95% of requests took exactly 1,000 ms. Here all observations are at or below that value because of ties.
State the method and population
Some methods interpolate between observations rather than selecting a ranked observation. NIST describes sample percentile estimation and the existence of different methods. Small samples and extreme percentiles can be particularly sensitive to the convention.
Do not average per-server p95 values to obtain a combined p95. Combine compatible observations or suitable distribution summaries. Similarly, adding component p95 values does not generally produce a request's end-to-end p95. Percentiles summarize observed distributions; they do not guarantee future response times.
References
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
