Biostatistics • Descriptive Statistics & Visualization

Percentiles & IQR — Compute and interpret percentiles and IQR

Quantify the position and spread of biomedical data using rank-based measures that resist the pull of outliers.

A scatter plot connecting biological data with a DNA strand and health signal.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

The challenge of summarizing how individual observations rank within a larger dataset has occupied statisticians for well over a century. While the mean and standard deviation became the workhorses of parametric statistics, researchers in public health and medicine quickly recognized that biological measurements—body mass index, serum cholesterol, gestational age at birth—are frequently skewed by extreme values. A single outlier can drag the mean far from the center of the distribution, rendering it a misleading summary. This practical problem drove the development of percentiles and the interquartile range (IQR)—rank-based measures that describe position and spread without being unduly influenced by extreme observations.

1885 • Galton's Ogive Curve

Francis Galton introduced the ogive (cumulative frequency curve) and used percentile-like divisions to describe the distribution of human traits such as height and intelligence, establishing the conceptual framework for rank-based statistics.

1900 • Quartiles Formalized

Karl Pearson and the biometric school at University College London formalized the use of quartiles (Q₁, Q₂, Q₃) as robust summaries of biological variation, emphasizing their resistance to non-normal distributions encountered in anthropometric data.

1977 • Tukey's Box-and-Whisker Plot

John Tukey's seminal book Exploratory Data Analysis popularized the box plot, which visually encodes Q₁, the median, Q₃, and the IQR. This graphic became ubiquitous in biostatistics for comparing distributions across treatment groups.

2000s • CDC Growth Charts & Clinical Percentiles

The U.S. Centers for Disease Control and Prevention released pediatric growth charts that express weight-for-age and BMI-for-age as percentiles. Clinicians now routinely classify children above the 85th or 95th percentile as overweight or obese, making percentile-based reasoning a cornerstone of preventive medicine.

The central question these tools address is deceptively simple: Where does a given observation fall relative to the rest of the data, and how tightly clustered is the middle bulk of the distribution? Answering this question with percentiles and the IQR provides a robust, distribution-free summary that remains valid even when data are heavily skewed—a common occurrence in biomedical research.

SECTION 2

Core Principles & Definitions

Before computing anything, it is essential to ground the discussion in precise definitions. Percentiles and the IQR belong to the family of order statistics—summaries that depend only on the rank of each observation after the data have been sorted from smallest to largest. Because they do not require the data to follow a normal (Gaussian) distribution, they are classified as nonparametric or distribution-free measures.

1

Percentile (Pₖ)

The kth percentile is the value below which k percent of the observations fall. For example, if a patient's systolic blood pressure is at the 90th percentile, 90 % of the reference population has a lower reading.
2

Quartiles (Q₁, Q₂, Q₃)

Quartiles are three specific percentiles that divide the sorted data into four equal-frequency groups. Q₁ = P₂₅, Q₂ = P₅₀ (the median), and Q₃ = P₇₅. Together they summarize both the center and spread of a distribution.
3

Interquartile Range (IQR)

IQR = Q₃ − Q₁. It captures the range spanned by the middle 50 % of the data, making it a robust measure of variability that is unaffected by extreme values in either tail.
4

Robustness

A statistic is robust if its value does not change dramatically when a small number of data points are added, removed, or altered. The median and IQR have high breakdown points (≈ 25 %), meaning up to 25 % of the data can be corrupted before the statistic becomes misleading.
5

Outlier Fences

Tukey defined mild outliers as observations beyond Q₁ − 1.5 × IQR or Q₃ + 1.5 × IQR. Extreme outliers lie beyond ± 3 × IQR. These fences are central to the box-plot methodology used in biostatistics exploratory analysis.
✦

KEY TAKEAWAY

Think of percentiles like an elevator in a 100-story building. Each floor represents 1 % of the population. If your lab value is on the 75th floor (Q₃), you are higher than 75 % of the occupants below you, and the IQR tells you how many floors separate the 25th from the 75th floor—a compact measure of how spread out the 'middle crowd' is.

SECTION 3

Visual Explanation — Percentiles on a Distribution

Distribution of Serum LDL Cholesterol (mg/dL) — Percentile MarkersFrequencyLDL Cholesterol (mg/dL)Q₁95P₂₅Median (Q₂)130P₅₀Q₃165P₇₅IQR = 165 − 95 = 70 mg/dLDistribution areaIQR span (middle 50 %)
The shaded curve represents the frequency distribution of serum LDL cholesterol in a hypothetical cohort. The dashed vertical lines mark Q₁ (P₂₅ = 95 mg/dL), the median (P₅₀ = 130 mg/dL), and Q₃ (P₇₅ = 165 mg/dL). The green bracket at the bottom shows the IQR of 70 mg/dL, which captures the middle 50 % of all observations.

The diagram above illustrates a slightly right-skewed distribution typical of lipid panel results in a population study. Notice that the median is not equidistant between Q₁ and Q₃—it sits closer to Q₁, reflecting the rightward skew caused by a minority of patients with very high LDL. This asymmetry is precisely why percentile-based summaries are preferred over the mean and standard deviation in clinical reporting: the IQR faithfully reflects the spread of the central bulk of the data without being stretched by the long right tail.

SECTION 4

Mathematical Framework

Several algorithms exist for computing percentiles. The most commonly taught method in biostatistics courses uses a locator value (also called the percentile rank position) to determine whether the desired percentile falls exactly on an observation or between two observations. This is sometimes termed the L-method or the percentile locator formula. Statistical software packages (R, SAS, Python) implement up to nine different interpolation variants, but the conceptual foundation is the same.

PERCENTILE LOCATOR

L=(k/100)×nL = (k / 100) × n

where k = desired percentile (e.g., 25 for Q₁), n = number of observations in the sorted dataset, and L = locator value. If L is not a whole number, round up to the next integer—the observation at that position is Pₖ. If L is a whole number, Pₖ is the average of the observations at positions L and L + 1.

INTERQUARTILE RANGE

IQR=Q3−Q1=P75−P25IQR = Q₃ − Q₁ = P₇₅ − P₂₅

The IQR measures the spread of the middle 50 % of the data. A larger IQR indicates greater variability among the central observations, while a smaller IQR suggests tighter clustering around the median.

OUTLIER FENCES (TUKEY)

Lowerfence=Q1−1.5×IQRUpperfence=Q3+1.5×IQRLower fence = Q₁ − 1.5 × IQR Upper fence = Q₃ + 1.5 × IQR

Any observation falling below the lower fence or above the upper fence is flagged as a potential outlier. Extreme outliers lie beyond Q₁ − 3 × IQR or Q₃ + 3 × IQR.

ℹ

Note on Alternative Methods

The inclusive method (used by some textbooks) defines Q₁ as the median of the lower half of the data and Q₃ as the median of the upper half. For large biostatistical datasets (n > 50), the differences between methods are negligible. Always report which method you used for reproducibility.

SECTION 5

Detailed Breakdown — Anatomy of the Box Plot

The box-and-whisker plot is the canonical visualization of percentile-based summaries. Introduced by John Tukey, it encodes the five-number summary (minimum, Q₁, median, Q₃, maximum) along with outlier information into a compact graphic that is indispensable for comparing groups in clinical trials and epidemiological studies. Understanding its anatomy is essential before interpreting published biostatistics figures.

Anatomy of a Box-and-Whisker PlotFasting Blood Glucose (mg/dL) — Hypothetical Cohort70Min*85Q₁ (P₂₅)98Median (P₅₀)115Q₃ (P₇₅)155Max*210245OutliersIQR = 115 − 85 = 30 mg/dL* Whiskers extend to the mostextreme data point within1.5 × IQR of the box edge.Upper fence = Q₃ + 1.5 × IQR= 115 + 1.5 × 30 = 160Points at 210 and 245 exceedthe fence → plotted as outliers.
A horizontal box plot of fasting blood glucose values. The box spans from Q₁ (85) to Q₃ (115), the bold vertical line marks the median (98), and the whiskers extend to the most extreme non-outlier data points. The open circles at 210 and 245 represent outliers exceeding the upper fence of 160 mg/dL.
ComponentVisual ElementInterpretation
BoxRectangle from Q₁ to Q₃Contains the middle 50 % of observations (the IQR).
Median lineBold vertical line inside the boxShows the center of the distribution; divides the data into equal halves.
WhiskersLines extending from box edgesReach to the furthest observation within 1.5 × IQR of the box boundary.
Outlier markersOpen circles beyond whiskersIndividual observations exceeding the 1.5 × IQR fence; warrant investigation.

Components of the box-and-whisker plot

SECTION 6

Worked Example — Infant Birth Weights

A neonatology researcher records the birth weights (in grams) of 12 infants admitted to the NICU: 1850, 2100, 2250, 2400, 2500, 2650, 2700, 2900, 3050, 3200, 3400, 4100. The data are already sorted in ascending order. Compute Q₁, Q₂ (median), Q₃, and the IQR. Then determine whether any observations qualify as outliers.

Computing Percentiles & IQR for Birth Weight Data (n = 12)

  1. 1

    Step 1 — Compute the Locator for Q₁ (P₂₅)

    Apply the locator formula: L = (k / 100) × n = (25 / 100) × 12 = 3.0. Since L is a whole number, Q₁ is the average of the 3rd and 4th observations in the sorted list.
    Q₁ = (2250 + 2400) / 2 = 2325 g
  2. 2

    Step 2 — Compute the Median (P₅₀)

    L = (50 / 100) × 12 = 6.0. Since L is a whole number, the median is the average of the 6th and 7th observations.
    Median = (2650 + 2700) / 2 = 2675 g
  3. 3

    Step 3 — Compute Q₃ (P₇₅)

    L = (75 / 100) × 12 = 9.0. Since L is a whole number, Q₃ is the average of the 9th and 10th observations.
    Q₃ = (3050 + 3200) / 2 = 3125 g
  4. 4

    Step 4 — Compute the IQR

    Subtract Q₁ from Q₃ to obtain the interquartile range.
    IQR = 3125 − 2325 = 800 g
  5. 5

    Step 5 — Determine Outlier Fences

    Lower fence = Q₁ − 1.5 × IQR = 2325 − 1.5 × 800 = 2325 − 1200 = 1125 g. Upper fence = Q₃ + 1.5 × IQR = 3125 + 1200 = 4325 g. All observations fall within [1125, 4325], so no outliers are present. However, the 4100 g observation is notably close to the upper fence and would merit clinical attention.
    Fences: [1125, 4325] g — 0 outliers

SECTION 7

IQR vs. Standard Deviation — Strengths & Limitations

In practice, biostatisticians choose between the IQR and the standard deviation depending on the shape of the distribution and the research question. Each measure has trade-offs that are worth examining explicitly.

FeatureIQRStandard Deviation (SD)
RobustnessHigh — breakdown point ≈ 25 %. Extreme values do not affect Q₁ or Q₃.Low — a single extreme value can inflate SD substantially.
Distributional assumptionNone — valid for any distribution shape.Most interpretable under normality (68-95-99.7 rule).
Information usedOnly rank information (2 order statistics).All n observations contribute through squared deviations.
Efficiency under normalityLess efficient — discards information in the tails.Maximum-likelihood estimator; most efficient for normal data.
Common useSkewed data: hospital length of stay, cost data, biomarker concentrations.Symmetric data: blood pressure in large samples, standardized test scores.

Comparison of IQR and Standard Deviation as variability measures

⚖️

WHEN TO USE WHICH

A useful heuristic in biostatistics: report the median and IQR when the distribution is skewed or contains outliers (e.g., healthcare costs, survival times), and report the mean and SD when the data are approximately normal. Many journals require authors to justify their choice explicitly.

SECTION 8

Connections to Advanced Theory

Percentiles and the IQR are not merely descriptive curiosities—they connect directly to several advanced areas of biostatistical theory, including quantile regression, nonparametric hypothesis testing, and reference interval construction. Understanding the descriptive foundation makes these inferential extensions far more intuitive.

Descriptive ConceptAdvanced ExtensionApplication in Biostatistics
Percentile PₖQuantile regressionModel how the kth percentile of a response (e.g., birth weight) changes with covariates, rather than modeling only the conditional mean.
Median (P₅₀)Wilcoxon rank-sum / signed-rank testsNonparametric tests that compare medians (or ranks) between groups when normality cannot be assumed.
IQRRobust scale estimation (MAD)The Median Absolute Deviation (MAD) generalizes the IQR idea; it is used in robust regression and anomaly detection.
P₂.₅ and P₉₇.₅Reference intervals (clinical)The 2.5th–97.5th percentile range defines the 'normal' reference interval for lab results (e.g., serum creatinine 0.6–1.2 mg/dL).

From descriptive summaries to inferential methods

As you advance into regression modeling and clinical decision-making, you will repeatedly encounter percentile-based reasoning. Quantile regression, for instance, allows a researcher to ask not just 'Does this treatment change the average outcome?' but 'Does this treatment change the outcome for patients at the extremes of the distribution?'—a question of enormous clinical relevance. The descriptive skills you build here form the conceptual substrate for those more powerful tools.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A patient's hemoglobin A1c is reported at the 60th percentile relative to the general adult population. Explain what this means in plain language and state whether this should be considered clinically abnormal.
Show answer
Being at the 60th percentile means that 60 % of adults in the reference population have an HbA1c value lower than this patient's, and 40 % have a value higher. This is a positional statement, not a diagnostic one. Whether the value is clinically abnormal depends on the absolute HbA1c level and the clinical thresholds (e.g., ≥ 6.5 % for diabetes). A percentile near the middle of the distribution suggests the patient is close to average, but the reference population's health status matters—if the population itself has high HbA1c levels, even a 'middling' percentile could correspond to a clinically concerning value.

Question 2: BASIC CALCULATION

Given the following sorted white blood cell counts (×10³/μL) from 10 patients: 4.2, 5.1, 5.8, 6.3, 7.0, 7.5, 8.2, 9.1, 10.4, 12.0, compute Q₁, the median, Q₃, and the IQR using the locator method.
Show answer
For n = 10: Q₁ locator L = (25/100) × 10 = 2.5, which is not a whole number, so round up to position 3 → Q₁ = 5.8. Median locator L = (50/100) × 10 = 5.0, a whole number, so median = average of positions 5 and 6 = (7.0 + 7.5)/2 = 7.25. Q₃ locator L = (75/100) × 10 = 7.5, round up to position 8 → Q₃ = 9.1. Therefore, IQR = Q₃ − Q₁ = 9.1 − 5.8 = 3.3 × 10³/μL. The middle 50 % of WBC counts in this sample span 3.3 thousand cells per microliter.

Question 3: INTERMEDIATE

Using the data from Problem 2, compute the Tukey outlier fences. Is the observation 12.0 × 10³/μL classified as an outlier? If a 13th patient with WBC = 16.5 × 10³/μL were added to the original data, would the IQR change? Explain why or why not.
Show answer
Lower fence = Q₁ − 1.5 × IQR = 5.8 − 1.5 × 3.3 = 5.8 − 4.95 = 0.85. Upper fence = Q₃ + 1.5 × IQR = 9.1 + 4.95 = 14.05. The value 12.0 falls below 14.05, so it is not classified as an outlier by Tukey's criterion. If a 13th patient at 16.5 were added, we would need to recompute Q₁ and Q₃ for n = 11 (the original 10 values plus 16.5 inserted at the end). However, because 16.5 falls in the upper tail, Q₁ and Q₃ would shift by at most one position, resulting in only a minor change to the IQR. This illustrates the robustness of the IQR—adding a single extreme value has negligible impact, unlike the standard deviation, which would increase substantially.

Question 4: APPLIED

A public health study reports the following five-number summary for hospital length of stay (days) among COVID-19 patients: Min = 1, Q₁ = 4, Median = 7, Q₃ = 14, Max = 62. (a) Compute the IQR and the upper outlier fence. (b) A hospital administrator proposes using the mean ± SD to set staffing benchmarks. Based on the five-number summary, argue for or against this proposal.
Show answer
(a) IQR = 14 − 4 = 10 days. Upper fence = Q₃ + 1.5 × IQR = 14 + 15 = 29 days. Since the maximum is 62, there are likely outliers above 29 days. (b) The five-number summary reveals severe right skew: the median (7) is much closer to Q₁ (4) than to Q₃ (14), and the maximum (62) is far from Q₃. In such a distribution, the mean would be pulled upward by the long tail of patients with extended stays, and the SD would be inflated by those same extreme values. Staffing benchmarks based on mean ± SD would overestimate the 'typical' stay and underestimate the frequency of very long stays. The median and IQR provide a more accurate picture of the central tendency and variability that most patients experience. The administrator should use percentile-based summaries for planning.

Question 5: CRITICAL THINKING

A clinical laboratory establishes its reference interval for serum ferritin by collecting samples from 200 healthy adults and reporting the 2.5th and 97.5th percentiles. (a) Explain why percentiles rather than mean ± 2 SD are used. (b) If the distribution of ferritin is strongly right-skewed, how would the reference interval differ between the two methods? (c) Discuss how a small sample size (e.g., n = 30) would affect the reliability of the percentile-based reference interval and suggest a statistical remedy.
Show answer
(a) Percentiles are used because serum ferritin is not normally distributed in most populations—it is typically right-skewed, especially in men. The mean ± 2 SD method assumes approximate normality and would produce a symmetric interval around the mean, which could include negative lower bounds (biologically impossible) or exclude a disproportionate fraction of high-normal values. (b) Under right skew, the mean is pulled toward the tail, so mean − 2 SD might be too high (excluding low-normal individuals), while mean + 2 SD might be too low (flagging genuinely healthy high-ferritin individuals as abnormal). The percentile-based interval naturally accommodates the asymmetry, producing a wider upper bound and a narrower lower bound that better reflect the actual distribution. (c) With n = 30, the sample 2.5th percentile corresponds to roughly the 0.75th observation—essentially the minimum—making the estimate highly unstable. Confidence intervals for the percentiles would be extremely wide. A remedy is to fit a parametric or semi-parametric model (e.g., a Box-Cox transformation to approximate normality) and derive the reference limits from the fitted distribution, or to use bootstrap resampling to estimate percentiles and their confidence intervals. CLSI guideline EP28-A3c recommends a minimum of 120 reference individuals.

SUMMARY

Lesson Summary

Summary

Percentiles describe the rank position of an observation within a dataset: the kth percentile (Pₖ) is the value below which k % of observations fall. The three quartiles (Q₁ = P₂₅, Q₂ = P₅₀, Q₃ = P₇₅) partition the data into four equal-frequency groups, and the interquartile range (IQR = Q₃ − Q₁) measures the spread of the middle 50 %. These rank-based summaries are computed using the locator formula L = (k/100) × n, where a non-integer locator is rounded up and an integer locator triggers averaging of two adjacent observations.

Because they depend only on order, the median and IQR are robust to outliers and do not assume normality—properties that make them ideal for skewed biomedical data such as hospital costs, survival times, and biomarker concentrations. The box-and-whisker plot visually encodes the five-number summary, with Tukey fences (±1.5 × IQR) identifying potential outliers. These descriptive tools lay the foundation for advanced methods including quantile regression, nonparametric tests, and clinical reference intervals.

Varsity Tutors • Biostatistics • Percentiles & IQR