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.

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.

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.

Visual Explanation — Percentiles on a Distribution

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.

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) × 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 = 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)
Lower 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.

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.

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.
Components of the box-and-whisker plot
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.

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
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
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
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
Step 4 — Compute the IQRSubtract Q₁ from Q₃ to obtain the interquartile range.
IQR = 3125 − 2325 = 800 g
5
Step 5 — Determine Outlier FencesLower 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

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.

Comparison of IQR and Standard Deviation as variability measures
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.
⚖️ 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.

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.

From descriptive summaries to inferential methods
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).

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.

Practice Problems

PROBLEM 1CONCEPTUAL
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.
PROBLEM 2BASIC 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.
PROBLEM 3INTERMEDIATE
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.
PROBLEM 4APPLIED
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.
PROBLEM 5CRITICAL 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.

Lesson 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