Loading…

Interquartile range (IQR)

What is interquartile range (IQR) in statistics, and how is it computed from quartiles?

Subject: Statistics Chapter: Numerical Descriptive Measures Topic: Measures of Position Quartiles and Interquartile Range Answer included
what is interquartile range interquartile range IQR quartiles Q1 Q3 median box plot
Accepted answer Answer included

Interquartile range (IQR)

In descriptive statistics, “what is interquartile range” refers to the numerical width of the middle half of a dataset after the observations are arranged in order. It uses quartiles as reference points and is widely used in box-and-whisker plots and outlier screening.

The interquartile range is defined by \[ \mathrm{IQR} = Q_3 - Q_1, \] where \(Q_1\) is the lower quartile (25th percentile) and \(Q_3\) is the upper quartile (75th percentile).

The IQR measures spread in a way that is resistant to extreme values because it ignores the lowest 25% and highest 25% of the data.

Quartiles and the ordered data view

Let the ordered observations be \(x_{(1)} \le x_{(2)} \le \dots \le x_{(n)}\). The median is commonly denoted \(Q_2\). The lower quartile \(Q_1\) and upper quartile \(Q_3\) locate the 25% and 75% positions in the ordered list, respectively, so that approximately 25% of observations lie at or below \(Q_1\) and approximately 75% lie at or below \(Q_3\).

Multiple quartile conventions exist in textbooks and software. A widely taught convention for hand calculation (often aligned with Tukey-style box plots) treats \(Q_1\) as the median of the lower half of the ordered data and \(Q_3\) as the median of the upper half; when \(n\) is odd, the overall median \(Q_2\) is not included in either half.

Other conventions compute quartiles as the 25th and 75th percentiles using interpolation between adjacent order statistics, especially when the desired percentile position falls between integers. The IQR definition \(\mathrm{IQR} = Q_3 - Q_1\) remains unchanged, while numeric values may shift slightly across conventions.

Worked example with a clean five-number summary

Consider the dataset (already in ascending order): \[ 4,\ 7,\ 7,\ 9,\ 10,\ 12,\ 13,\ 15,\ 18,\ 20,\ 21. \] Here \(n = 11\), so the median is the 6th value: \(Q_2 = 12\).

Lower half: \(4, 7, 7, 9, 10\) gives \(Q_1 = 7\). Upper half: \(13, 15, 18, 20, 21\) gives \(Q_3 = 18\).

\[ \mathrm{IQR} = Q_3 - Q_1 = 18 - 7 = 11. \]

Statistic Symbol Value
Minimummin4
Lower quartileQ17
MedianQ212
Upper quartileQ318
Maximummax21
Interquartile rangeIQR11
Box plot highlighting the interquartile range A number-line box plot for the sample data. The colored box spans from Q1 to Q3 (the IQR). The median is a contrasting line inside the box. Whiskers reach the minimum and maximum for this example. 0 4 8 12 16 20 24 Value scale Sample data (dots) Q1 = 7 Median = 12 Q3 = 18 min = 4 max = 21 IQR = Q3 − Q1 = 18 − 7 = 11
The colored box spans from \(Q_1\) to \(Q_3\), representing the middle 50% of the ordered data. The median is the vertical line inside the box; whiskers connect to the minimum and maximum for this dataset.

IQR and outlier screening (Tukey fences)

A common rule for flagging potential outliers uses inner fences based on the interquartile range: \[ \text{Lower fence} = Q_1 - 1.5\cdot \mathrm{IQR}, \qquad \text{Upper fence} = Q_3 + 1.5\cdot \mathrm{IQR}. \] Values outside these fences are often treated as outliers for exploratory analysis and for box-plot whisker conventions in many textbooks.

For the example above, \(\mathrm{IQR}=11\), so \[ Q_1 - 1.5\cdot \mathrm{IQR} = 7 - 1.5\cdot 11 = 7 - 16.5 = -9.5, \qquad Q_3 + 1.5\cdot \mathrm{IQR} = 18 + 16.5 = 34.5. \] All observations \(4\) through \(21\) fall within \([-9.5, 34.5]\), so no outliers are flagged by this rule.

Interpretation and statistical role

  • Robustness: IQR is resistant to extreme values compared with the range.
  • Comparability: IQR supports comparisons of variability across groups with different centers.
  • Graphical linkage: IQR is the box length in a box-and-whisker plot, connecting numeric summaries to visualization.

Common sources of disagreement in results

Differences in quartile conventions explain many mismatches between hand calculations and software output. The IQR depends on \(Q_1\) and \(Q_3\), and those quartiles can be defined by “median-of-halves” rules or by percentile interpolation rules. Reporting the chosen convention (or the software’s quartile method) prevents ambiguity, especially for small samples.

Vote on the accepted answer
Upvotes: 0 Downvotes: 0 Score: 0
Community answers No approved answers yet

No approved community answers are published yet. You can submit one below.

Submit your answer Moderated before publishing

Plain text only. Your name is required. Links, HTML, and scripts are blocked.

Fresh

Most recent questions

109 questions · Sorted by newest first

Showing 1–10 of 109
per page
  1. Mar 5, 2026 Published
    Formula of the Variance (Population and Sample)
    Statistics Numerical Descriptive Measures Measures of Dispersion for Ungrouped Data
  2. Mar 5, 2026 Published
    Mean Median Mode Calculator (Formulas, Interpretation, and Example)
    Statistics Numerical Descriptive Measures Measures of Central Tendency for Ungrouped Data
  3. Mar 4, 2026 Published
    How to Calculate Standard Deviation in Excel (STDEV.S vs STDEV.P)
    Statistics Numerical Descriptive Measures Measures of Dispersion for Ungrouped Data
  4. Mar 4, 2026 Published
    Suppose T and Z Are Random Variables: How T Relates to Z in the t Distribution
    Statistics Estimation of the Mean and Proportion Estimation of a Population Mean σ Not Known the T Distribution
  5. Mar 4, 2026 Published
    What Does R Squared Mean in Statistics (Coefficient of Determination)
    Statistics Simple Linear Regression Coefficient of Determination
  6. Mar 3, 2026 Published
    Box and Plot Graph (Box Plot) Explained
    Statistics Numerical Descriptive Measures Box and Whisker Plot
  7. Mar 3, 2026 Published
    How to Calculate a Z Score
    Statistics Continuous Random Variables and the Normal Distribution Standardizing a Normal Distribution
  8. Mar 3, 2026 Published
    How to Calculate Relative Frequency
    Statistics Organizing and Graphing Data Organizing and Graphing Quantitative Data
  9. Mar 3, 2026 Published
    Is zero an even number?
    Statistics Numerical Descriptive Measures Measures of Central Tendency for Ungrouped Data
  10. Mar 3, 2026 Published
    Monty Hall Paradox (Conditional Probability Explained)
    Statistics Probability Marginal and Conditional Probabilities
Showing 1–10 of 109
Open the calculator for this topic