beginner 12 minutes

Percentiles and Quartiles

Calculate percentiles and quartiles using an explicit convention. Interpret ranks, IQR and box-plot flags without confusing them with percentages.

•
On This Page

A percentile is a position, not a percent correct

A percentile describes location within a distribution. A test score at the 90th percentile is relatively high in a reference group; it does not mean 90% of questions were answered correctly. Always state the reference group, period and variable.

For a population distribution, quantiles can be defined through its cumulative distribution. In a finite sample, software uses different interpolation conventions. Ties and small samples mean that “exactly 25% below the first quartile” is not generally true.

Worked example with an explicit rule

Sort eight hypothetical durations: 2, 3, 4, 7, 8, 10, 12, 20 minutes. Using the median-of-halves rule for this even-sized dataset:

  • Median Q₂ = (7 + 8)/2 = 7.5.
  • Lower half: 2, 3, 4, 7; Q₁ = (3 + 4)/2 = 3.5.
  • Upper half: 8, 10, 12, 20; Q₃ = (10 + 12)/2 = 11.
  • Interquartile range IQR = 11 − 3.5 = 7.5 minutes.

The IQR summarizes the middle portion of the distribution and is less affected by extreme values than the range. The range here is 20 − 2 = 18 minutes. Neither measures sampling uncertainty in an estimated mean.

Why a calculator may give another answer

A common linear-interpolation convention places percentile p at zero-based index h = (n − 1)p, then interpolates between adjacent sorted values. For Q₁, h = 7 × 0.25 = 1.75, so the value is 3 + 0.75(4 − 3) = 3.75. For Q₃, h = 5.25 gives 10.5.

These differ from the median-of-halves values without either calculation being an arithmetic error. State the convention and use it consistently. For odd samples, median-of-halves implementations can also differ on whether the overall median is included in the halves.

Box-plot fences are screening rules

Using the first convention, the lower fence is 3.5 − 1.5(7.5) = −7.75 and the upper fence is 11 + 1.5(7.5) = 22.25. The value 20 is below the upper fence, so it is not flagged by that rule.

A flag does not prove an observation is wrong; an unflagged value is not automatically typical. Check units, records, subgroup differences and the process generating the data. Do not delete values simply to improve a result. A box plot also hides detail such as multiple clusters, so pair it with a distribution plot when useful.

Practice

For 1, 2, 4, 6, 8, 10, calculate Q₁ and Q₃ using the median of each three-value half.

Show the explanation

The lower half is 1, 2, 4, so Q₁ = 2. The upper half is 6, 8, 10, so Q₃ = 8. IQR = 6. State this convention instead of assuming all software uses it.

Continue

Read data visualization and spread. OpenStax introduces percentile and quartile interpretation.

Did this explanation help?

Your response helps us identify lessons that need more work.