BUSINESS ANALYTICS • DESCRIPTIVE ANALYTICS AND VISUALIZATION

Percentiles & IQR — Compute and interpret percentiles and IQR

Master the tools that reveal where values fall within a distribution and how to measure its central spread.

Historical Context & Motivation

Long before modern business analytics platforms automated summary statistics, scholars and practitioners struggled with a fundamental question: how does a single data point relate to the rest of its distribution? Averages alone proved insufficient—two datasets can share the same mean yet exhibit radically different spreads and shapes. The development of percentiles and the interquartile range (IQR) arose from centuries of effort to quantify position and variability in ways that are robust to extreme values. Understanding their origins illuminates why these measures remain indispensable in contemporary data-driven decision-making.

1756
Boscovich's Median Concept
Roger Joseph Boscovich introduced early ideas about fitting lines to data by minimizing absolute deviations, implicitly relying on the concept of the median—the 50th percentile—as a robust center of a distribution.
1882
Galton's Percentile Grades
Sir Francis Galton formalized the idea of dividing an ordered dataset into hundredths, coining the term percentile to rank individuals' measurements relative to a reference population.
1977
Tukey's Box Plot & IQR
John Tukey published Exploratory Data Analysis, popularizing the box-and-whisker plot and the interquartile range as a standard measure of spread that resists the influence of outliers.
2000s
Analytics Dashboards Go Mainstream
With the rise of tools like Excel, Tableau, and Python's pandas library, percentiles and IQR calculations became one-click operations embedded in business intelligence workflows, from supply-chain monitoring to customer segmentation.

The core question these tools answer is straightforward yet powerful: where does a particular observation sit relative to all others, and how tightly or loosely are the central values clustered? Whether you are benchmarking quarterly revenue against industry peers or flagging anomalous shipping times, percentiles and IQR provide the precise language for that analysis.

Core Principles & Definitions

Before computing anything, it is essential to internalize the conceptual foundations that make percentiles and IQR meaningful. These measures belong to the family of order statistics—summaries derived from ranking data from smallest to largest. Unlike the mean and standard deviation, which are heavily influenced by extreme values, percentile-based measures are resistant (robust) statistics, making them especially valuable in business contexts where outliers—massive one-time orders, fraudulent transactions, or data-entry errors—are common.

1

Percentile (Pₖ)

The kth percentile is the value below which k percent of the data fall. For example, the 90th percentile of delivery times means 90% of deliveries arrive at or below that duration.
2

Quartiles (Q₁, Q₂, Q₃)

Special percentiles that divide a dataset into four equal parts. Q₁ = 25th percentile, Q₂ = 50th percentile (the median), Q₃ = 75th percentile. They form the backbone of box-plot analysis.
3

Interquartile Range (IQR)

IQR = Q₃ − Q₁. It measures the spread of the middle 50% of a dataset, ignoring the most extreme values on both tails. A larger IQR signals greater variability in the central data.
4

Robustness

Because percentiles rely on rank order rather than magnitude, they are far less sensitive to outliers than mean-based measures. A single extreme revenue figure will skew the mean but leave Q₂ virtually unchanged.
5

Outlier Detection via IQR

The IQR-based fence rule flags any observation below Q₁ − 1.5 × IQR or above Q₃ + 1.5 × IQR as a potential outlier. This heuristic, introduced by Tukey, remains a standard screening tool.
KEY TAKEAWAY
Think of percentiles like a leaderboard at a sales conference. Knowing your raw revenue tells you nothing about how you compare to peers; knowing you sit at the 85th percentile tells you that you outperformed 85% of participants. The IQR, then, is the spread between the typical middle performers—from the 25th to the 75th percentile—capturing the competitive 'core' of the field while ignoring the superstars and the laggards.

Visual Explanation — The Box Plot

The most iconic visualization of percentiles and IQR is the box-and-whisker plot. It compresses an entire distribution into five numbers: the minimum, Q₁, the median (Q₂), Q₃, and the maximum—with whiskers typically extending to 1.5 × IQR from the box edges. The diagram below illustrates this anatomy using a hypothetical dataset of monthly customer acquisition costs (CAC) across 30 regional offices.

The box spans from Q₁ ($60) to Q₃ ($109), capturing the middle 50% of customer acquisition costs. The pink median line at $85 splits the box. Whiskers extend to the most extreme non-outlier values, and the red dot at $142 marks a potential outlier beyond Q₃ + 1.5 × IQR ($182.50 fence not reached here, but shown for illustration as a flagged data point).

Notice how the box plot communicates skewness at a glance. In the diagram above, the distance from Q₂ to Q₃ ($24) exceeds the distance from Q₁ to Q₂ ($25), suggesting the upper half of the distribution is roughly symmetric to the lower half—but the outlier at $142 reveals a right tail that the box alone would hide. In business reporting, this kind of rapid visual assessment lets managers immediately focus attention on anomalies rather than wading through raw tables.

Mathematical Framework

Several methods exist for computing percentiles; the most common in introductory business analytics courses is the percentile locator formula. Once the data are sorted in ascending order, the formula finds the position (index) within the ordered array corresponding to the desired percentile rank. Different software packages (Excel's PERCENTILE.INC vs. PERCENTILE.EXC, Python's numpy.percentile with various interpolation methods) implement slightly different conventions, but the foundational logic is the same.

PERCENTILE LOCATOR (POSITION)
L = (k / 100) × (n + 1)
L = locator (position in the sorted data), k = desired percentile (e.g., 25 for Q₁), n = number of data points. If L is not a whole number, interpolate between the two surrounding ordered values.

When L falls on a whole number, the percentile equals the data value at that position. When L is fractional, the convention is to linearly interpolate. For instance, if L = 4.75, the percentile is 0.25 × (value at position 4) + 0.75 × (value at position 5). This ensures a smooth, continuous mapping from rank to value.

INTERPOLATION FORMULA
Pₖ = x₍ᵢ₎ + (d)(x₍ᵢ₊₁₎ − x₍ᵢ₎)
i = integer part of L (floor), d = fractional part of L, x₍ᵢ₎ = value at position i in the sorted array.
INTERQUARTILE RANGE
IQR = Q₃ − Q₁ = P₇₅ − P₂₅
The IQR captures the range of the middle 50% of data values. It is always non-negative and has the same units as the original data.
OUTLIER FENCES
Lower fence = Q₁ − 1.5 × IQR Upper fence = Q₃ + 1.5 × IQR
Any observation below the lower fence or above the upper fence is flagged as a suspected outlier. This threshold captures approximately 99.3% of data in a normal distribution.

Detailed Breakdown — Percentile Interpretation in Business

Percentiles are not merely an academic exercise; they appear throughout the business landscape in performance benchmarking, risk management, service-level agreements (SLAs), and compensation analysis. Understanding how to read and act on percentile information is a core competency for any analyst or manager. The diagram below maps common business use cases to specific percentile regions, showing where each metric typically lives along the distribution.

This diagram maps four typical business applications to the percentile spectrum. The lower quartile often flags risk. The median anchors benchmarking. The upper percentiles (P₉₀–P₉₉) define service-level commitments, and the top quartile identifies high performers.
Common percentile benchmarks across business functions
PercentileBusiness ContextInterpretation Example
P₁₀Downside risk in portfolio VaRThere is a 10% chance that the daily portfolio loss will exceed this value.
P₂₅ (Q₁)Compensation benchmarkingEntry-level pay floor: 25% of the market pays below this salary.
P₅₀ (Median)Industry standard comparisonHalf of comparable firms have a customer satisfaction score below this level.
P₇₅ (Q₃)Target for 'above-average' KPIAchieving this conversion rate places the campaign in the top 25% of all campaigns run.
P₉₅Service-level agreements95% of API response times fall at or below this threshold; used as the SLA ceiling.

Worked Example — Quarterly Sales Analysis

A regional manager collects quarterly revenue figures (in $000s) from 12 branch offices: 45, 52, 55, 58, 63, 67, 72, 78, 84, 91, 103, 150. She needs to compute Q₁, Q₂, Q₃, the IQR, and identify any potential outliers using the 1.5 × IQR rule.

Computing Quartiles and IQR for Branch Revenue
1
Step 1 — Sort the DataThe data are already arranged in ascending order: 45, 52, 55, 58, 63, 67, 72, 78, 84, 91, 103, 150. We have n = 12 observations.
n = 12; data sorted ✓
2
Step 2 — Locate Q₁ (25th Percentile)Apply the locator formula: L = (25/100) × (12 + 1) = 3.25. The integer part is 3 and the fractional part is 0.25. Q₁ is located between the 3rd value (55) and the 4th value (58). Interpolating: Q₁ = 55 + 0.25 × (58 − 55) = 55 + 0.75 = 55.75.
Q₁ = $55,750
3
Step 3 — Locate Q₂ (50th Percentile / Median)L = (50/100) × (12 + 1) = 6.5. The median lies between the 6th value (67) and the 7th value (72). Q₂ = 67 + 0.5 × (72 − 67) = 67 + 2.5 = 69.5.
Q₂ (Median) = $69,500
4
Step 4 — Locate Q₃ (75th Percentile)L = (75/100) × (12 + 1) = 9.75. Q₃ lies between the 9th value (84) and the 10th value (91). Q₃ = 84 + 0.75 × (91 − 84) = 84 + 5.25 = 89.25.
Q₃ = $89,250
5
Step 5 — Compute IQRIQR = Q₃ − Q₁ = 89.25 − 55.75 = 33.50. This means the middle 50% of branch revenues span a range of $33,500.
IQR = $33,500
6
Step 6 — Identify OutliersLower fence = Q₁ − 1.5 × IQR = 55.75 − 1.5 × 33.50 = 55.75 − 50.25 = 5.50. Upper fence = Q₃ + 1.5 × IQR = 89.25 + 50.25 = 139.50. Any value below $5,500 or above $139,500 is a suspected outlier. The branch with $150,000 exceeds the upper fence.
$150K branch is flagged as a potential outlier
💡 Managerial Insight
The $150K branch warrants investigation—but 'outlier' is a statistical label, not automatically a problem. This branch may have a lucrative enterprise client, a seasonal spike, or a data-entry error. The IQR-based flag directs attention; domain expertise provides the explanation.

Strengths, Limitations & Comparisons

Percentiles and IQR are powerful, but no single statistic tells the whole story. Analysts should understand when to reach for these tools versus alternatives like the mean, standard deviation, or coefficient of variation. The table below provides a side-by-side comparison to guide that choice.

Mean/Std Dev vs. Median/IQR: choosing the right summary
CriterionMean & Std DevMedian & IQR
Sensitivity to outliersHighly sensitive — a single extreme value can dramatically shift both the mean and the standard deviation.Robust — outliers have negligible effect because calculations depend on rank, not magnitude.
Best for distribution shapeSymmetric, bell-shaped (normal) distributions where the mean is a good center.Skewed distributions, heavy tails, or data with known outliers (income, real estate prices).
Mathematical tractabilityAlgebraically convenient — amenable to further statistical inference (t-tests, regression).Less tractable — non-parametric tests use ranks, but fewer closed-form results exist.
InterpretabilityRequires understanding of 'average distance from the mean'—less intuitive for non-technical stakeholders.Highly intuitive — 'the middle 50% of our customers spend between $X and $Y.'
Outlier detectionZ-score method (|z| > 3), which itself depends on the mean and std dev, so outliers distort the very tool detecting them.1.5 × IQR fence rule — self-contained and robust, since the IQR is not influenced by the outliers it seeks to identify.
⚖️ WHEN TO USE EACH
Use the mean and standard deviation when your data are reasonably symmetric and you intend to feed them into parametric models. Use the median and IQR when presenting to non-technical stakeholders, when your data exhibit skewness (e.g., income, housing prices, website traffic), or when outlier resistance is critical. In practice, report both to give your audience the fullest picture.

Connection to Advanced Analytics

Percentiles and IQR form the conceptual bedrock for several advanced analytical methods you will encounter in later coursework and professional practice. The table below maps the introductory concepts from this lesson to their more sophisticated extensions, showing how mastering the basics positions you for deeper work.

From foundational percentiles to advanced analytics
This Lesson (Foundational)Advanced ExtensionApplication Domain
Percentile rankQuantile regression — models the conditional quantile (e.g., median) of a response variable, not just the conditional mean.Predicting median house price given square footage, controlling for skewed price distributions.
IQR-based outlier fencesRobust covariance estimation (MCD, minimum covariance determinant) for multivariate outlier detection.Fraud detection in high-dimensional transaction data.
Box plotViolin plots & ridgeline plots — overlay kernel density estimates on box plots for richer distributional insight.Comparing customer lifetime value distributions across market segments.
P₉₅ / P₉₉ thresholdsValue at Risk (VaR) & Expected Shortfall (CVaR) — percentile-based risk measures mandated by Basel III regulations.Setting capital reserves for a bank's trading portfolio.

The transition from descriptive percentiles to inferential and predictive applications is natural. Once you are comfortable interpreting where a single observation falls, the next question is why it falls there—which is precisely the domain of regression, classification, and machine-learning models. Your fluency with quartiles and IQR will make concepts like quantile loss functions, robust scaling (used in scikit-learn's RobustScaler), and tail-risk metrics far more intuitive.

Practice Problems

PROBLEM 1CONCEPTUAL
A company reports that its average customer wait time is 8 minutes, but the median wait time is only 4 minutes. What does this discrepancy suggest about the shape of the wait-time distribution, and why might a manager prefer to report the median over the mean in a stakeholder presentation?
PROBLEM 2BASIC CALCULATION
Given the following monthly website conversion rates (%) for 10 campaigns: 2.1, 3.4, 3.8, 4.2, 4.9, 5.3, 5.7, 6.1, 7.0, 9.5, compute Q₁, Q₃, and the IQR using the L = (k/100)(n + 1) locator formula.
PROBLEM 3INTERMEDIATE
Using the data from Problem 2, determine the outlier fences and state whether any conversion rate qualifies as a suspected outlier. Then compute the 90th percentile (P₉₀) and explain what it means in a marketing context.
PROBLEM 4APPLIED
A logistics director analyzes delivery times (in hours) for 20 shipments: 18, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 38, 42, 55, 72. The company's SLA guarantees that 95% of deliveries will arrive within a stated time window. Calculate Q₁, Q₃, IQR, the upper outlier fence, identify any outliers, and determine the P₉₅ threshold the SLA should specify.
PROBLEM 5CRITICAL THINKING
Two product lines, A and B, both have a median monthly profit of $50,000. Product A has an IQR of $8,000 and Product B has an IQR of $30,000. A risk-averse CFO must allocate additional budget to one product line. Construct an argument, grounded in the properties of IQR and percentile distributions, for which product line deserves the investment. Under what circumstances might the other product line be a better choice?

Lesson Summary

Percentiles rank any observation against its dataset: the kth percentile (Pₖ) is the value below which k% of the data fall. The three quartiles — Q₁ (P₂₅), Q₂ (P₅₀), and Q₃ (P₇₅) — divide the ordered data into four equal groups and serve as the foundation for the box-and-whisker plot. Percentiles are computed using the locator formula L = (k/100)(n + 1) followed by linear interpolation when L is not a whole number.

The interquartile range (IQR = Q₃ − Q₁) measures the spread of the middle 50% of data and is highly resistant to outliers. The 1.5 × IQR fence rule provides a robust method for flagging suspected outliers. In business contexts, percentiles power SLA thresholds, compensation benchmarking, risk management (VaR), and performance evaluation. While the mean and standard deviation suit symmetric data and parametric inference, the median and IQR excel wherever skewness, heavy tails, or outliers threaten to mislead stakeholders.

Varsity Tutors • Business Analytics • Percentiles & IQR — Compute and interpret percentiles and IQR