The interquartile range (IQR) is the range of the middle 50% of data. It’s robust to outliers and useful for understanding data spread and identifying unusual values.

Formula

IQR = Q3 - Q1

where:
Q1 = 25th percentile (first quartile)
Q3 = 75th percentile (third quartile)

Ungrouped Data

Process:

  1. Arrange data in order
  2. Find Q1 (25th percentile)
  3. Find Q3 (75th percentile)
  4. Calculate Q3 - Q1

Example: Dataset: 10, 15, 20, 25, 30, 35, 40 Q1 ≈ 17.5, Q3 ≈ 32.5 IQR = 32.5 - 17.5 = 15

Grouped Data

Use cumulative frequencies to locate Q1 and Q3 classes, then apply interpolation formulas.

Outlier Detection Using IQR

IQR Rule:

Lower Boundary = Q1 - 1.5 × IQR
Upper Boundary = Q3 + 1.5 × IQR

Outliers = Values outside these boundaries

When to Use IQR

Best for:

  • Outlier detection
  • Robust dispersion measure
  • Skewed data
  • Box plot visualizations
  • Data with extreme values

Not best for:

  • Parametric statistical tests
  • Normal distribution assumption needed