HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Probability, Statistics & Reliability

Quantiles and percentiles

A percentile is the value that a stated fraction of the data falls at or below — the number you quote when the mean would hide exactly the behavior you care about.

Also known as: percentile ranks · quartiles

The formula

For a distribution with cumulative distribution function F, the quantile function is:

Q(p) = inf{ x : F(x) ≥ p },   0 < p < 1

Reading: Q(p) is the smallest value that at least a fraction p of the population sits at or below. The 95th percentile is Q(0.95); the median is Q(0.5); quartiles are Q(0.25) and Q(0.75).

From n sorted sample values x_(1) ≤ x_(2) ≤ ... ≤ x_(n), the two estimates you'll actually run into:

nearest rank:   take x_(r) where r = ⌈p·n⌉

Reading: count up the sorted list until you've covered fraction p, and report that data point. No interpolation, always a value you actually measured.

interpolated (R-7, the Excel/NumPy/R default):
  h = (n − 1)·p + 1
  Q̂(p) = x_(⌊h⌋) + (h − ⌊h⌋) · ( x_(⌊h⌋+1) − x_(⌊h⌋) )

Reading: compute a fractional rank h, then slide linearly between the two data points that bracket it.

normal population:  x_p = μ + z_p·σ
  z_0.90 = 1.2816    z_0.95 = 1.6449    z_0.99 = 2.3263

Reading: if the data is normal, every percentile is just the mean plus so many standard deviations. The 95th percentile lives 1.645 sigmas above center.

Where you meet it

  • The telemetry dashboard. "Mean latency 40 ms" and "p95 latency 300 ms" describe the same data link, and the second number is the one that determines whether the control loop misses deadlines. Network, DAQ, and range-timing specs are written against p95 and p99 precisely because tail behavior — not average behavior — is what breaks a real-time system.
  • The reliability review. A bearing's L10 (older literature says B10) life is the tenth percentile of the failure distribution: the life that 90 percent of a large group of identical bearings will meet or exceed, per ISO 281 and the ABMA standards [11][12]. When the vendor quotes 20,000 hours L10, one bearing in ten is statistically gone by then. That is a percentile statement, not a warranty.
  • The stress report at the review board. A-basis and B-basis material allowables in MMPDS and CMH-17 are percentile claims with a confidence wrapper: A-basis means at least 99 percent of the population exceeds the value, established with 95 percent confidence; B-basis means at least 90 percent exceeds it, same confidence [9][10]. Single load path, no redistribution — the board expects A-basis. Redundant structure — B-basis.
  • The vibe lab. Random vibration maximum expected environments for spaceflight hardware are stated as P95/50 — the level not exceeded on at least 95 percent of flights, estimated with 50 percent confidence — per NASA-STD-7001B and NASA-HDBK-7005 [13]. The shaker profile taped to the amp rack is a percentile.

How it works

A quantile answers a rank question, not an arithmetic one. That gives it two properties the mean doesn't have. First, robustness: the median of a 10,000-sample thermal run doesn't move when one thermocouple channel rails at full scale, because one wild point can only shift ranks by one slot. Second, transform invariance: for any increasing function, the quantile of the transform is the transform of the quantile — Q(p) of log(x) is log( Q(p) of x ). That's why you can compute percentiles of dB data directly and convert afterward, and why lognormal and Weibull percentile math stays clean. Means have neither property.

The first gotcha: there is no single "the" sample percentile. Hyndman and Fan catalogued nine different definitions living inside mainstream statistics packages, all defensible, all giving different numbers on small samples [6][7]. NIST's own handbook defaults to a different rule (R-6, rank h = (n + 1)·p) than Excel's PERCENTILE.INC, R, and NumPy (R-7, rank h = (n − 1)·p + 1) [8]. On ten sorted latency readings — 12, 14, 15, 17, 18, 20, 23, 28, 35, 60 ms — the 90th percentile is 37.5 ms by R-7, 57.5 ms by R-6, and 35 ms by nearest rank. Same data, a 53 percent spread in the reported number, and every one of them defensible. Ask for p95 on those ten points and Excel's PERCENTILE.EXC returns an error outright, because R-6 can't reach past p = n/(n+1) ≈ 0.909 with only ten samples. If a percentile lands in a spec, a test report, or an SLA, name the method. "p95 per R-7 linear interpolation" ends the argument before it starts.

The second gotcha: tail percentiles are data-hungry. A 99th percentile estimated from 20 samples is essentially your maximum observed value wearing a lab coat. As a rule of thumb, you want well beyond 1/(1 − p) samples before Q(p) means much — dozens of points past the percentile you're quoting, not one or two. This is exactly why the allowables world doesn't report the sample percentile at all. A B-basis value is a one-sided tolerance bound, B = x̄ − k·s, where k covers both the percentile and the sampling uncertainty. For a normal population and n = 10 coupons, k = 2.355 — far above the population factor z_0.90 = 1.282 — and it only relaxes to 1.777 at n = 30. A-basis at n = 10 demands k = 3.981. The gap between 1.282 and 2.355 is the price of admitting you estimated μ and σ from ten coupons; it shrinks toward z_p as the sample grows. (Those factors verify by simulation: x̄ − 2.355·s at n = 10 undershoots the true 10th percentile in 95.0 percent of trials.)

The third gotcha: percentiles don't aggregate. The average of twenty-four hourly p95 latencies is not the daily p95, and there is no fix-up factor — the daily figure must be recomputed from the pooled raw data (or from a merged histogram/sketch). Dashboards that average percentiles across time windows or across nodes report a number with no definition. Store the raw data, or store a mergeable summary; never average the percentiles themselves.

Last, the vocabulary trap. A percentile is a value in the data's units (p95 = 300 ms). A percentile rank runs the other direction — it's the percentage standing, PR(x) = 100 · (# of values ≤ x) / n (your part's bore is at the 82nd percentile of the lot). Quartiles are the 25/50/75 points; the interquartile range IQR = Q3 − Q1 is the spread measure that survives outliers. Same family, different directions — mixing them up in a test report reads fine and means the wrong thing.

History

The pieces arrived one at a time, and mostly from people measuring humans rather than hardware. Antoine Augustin Cournot used valeur médiane for the middle value in 1843 [3]. In 1879 Donald McAlister, working on the law of the geometric mean, wrote that since two particular measures "with the mean, divide the curve of facility into four equal parts," he proposed to call them the higher and lower quartiles [2]. Francis Galton picked the word up in his 1882 anthropometric report to the British Association [2], and in 1885, publishing results from his Anthropometric Laboratory, he minted percentile: the value "which 50 per cent. exceeded, and 50 per cent. fell short of, is the Median Value, or the 50th per-centile" [1][4]. Galton needed the machinery because he was ranking people — height, grip strength, reaction time — where a rank statement is honest and a mean can be meaningless.

The umbrella word came last. Quantile — the collective term for all of them — traces to M. G. Kendall's 1940 note on the large-sample distribution of quantiles, roughly sixty years after the specific terms it generalizes [2][5]. And the definitional mess in your software is a documented, dated event too: in 1996 Rob Hyndman and Yanan Fan surveyed the statistical packages of the day, found nine incompatible sample-quantile formulas in circulation, and argued for a standard [6]. Thirty years on, the packages still disagree, which is why the method-naming habit in the section above exists.

Related tools

  • /tools/bearing-life-l10 — L10 basic rating life is the 10th-percentile failure life in calculator form
  • /tools/stress-strain — the material properties this feeds come from A-basis/B-basis percentile allowables
  • /tools/rms-peak — mean-square level versus the extremes, the same center-versus-tail distinction

Sources

  1. https://mathshistory.st-andrews.ac.uk/Miller/mathword/p/
  2. https://mathshistory.st-andrews.ac.uk/Miller/mathword/q/
  3. https://web.universiteitleiden.nl/fsw/verduin/stathist/1stword.htm
  4. https://galton.org/bib/JournalItem.aspx_action=view_id=141
  5. https://www.jstor.org/stable/2983633
  6. https://robjhyndman.com/publications/quantiles/
  7. https://en.wikipedia.org/wiki/Quantile
  8. https://www.itl.nist.gov/div898/handbook/prc/section2/prc262.htm
  9. https://www.mmpds.org/wp-content/uploads/2015/03/mmpds_2015_statistical_property_analysis_overview.pdf
  10. https://www.montana.edu/dcairns/documents/introduction_to_aerospace-web/12-DesignAllowables.pdf
  11. https://www.machinedesign.com/mechanical-motion-systems/bearings/article/21831664/the-meaning-of-bearing-life
  12. https://www.regalrexnord.com/regal-rexnord-insights/what-is-l10-life
  13. https://s3vi.ndc.nasa.gov/ssri-kb/static/resources/nasa-std-7001b.pdf

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →