Outlier Detection Using the IQR Method

April 12, 2026

Problem

Dataset: {3, 5, 7, 8, 9, 10, 45}. Determine if 45 is an outlier using the 1.5×IQR rule.

Explanation

The 1.5 × IQR rule

An observation is an outlier if it falls below Q11.5×IQRQ1 - 1.5 \times IQR or above Q3+1.5×IQRQ3 + 1.5 \times IQR.

Step-by-step: {3, 5, 7, 8, 9, 10, 45}

Step 1 — Sort: Already sorted. n=7n = 7.

Step 2 — Quartiles: Q1 = 5, Median = 8, Q3 = 10.

Step 3 — IQR: Q3Q1=105=5Q3 - Q1 = 10 - 5 = 5.

Step 4 — Fences:

  • Lower: Q11.5(5)=57.5=2.5Q1 - 1.5(5) = 5 - 7.5 = -2.5
  • Upper: Q3+1.5(5)=10+7.5=17.5Q3 + 1.5(5) = 10 + 7.5 = 17.5

Step 5 — Check: Is 45 > 17.5? Yes! 45 is an outlier. All other values are between -2.5 and 17.5.

Why detect outliers?

Outliers can be: data entry errors, measurement errors, or genuine extreme values. They can distort the mean and standard deviation. Always investigate before removing.

Try it in the visualization

The box plot shows the IQR and fences. Values beyond the fences are flagged as outliers (red dots). Drag the outlier value to see the fences adjust.

Interactive Visualization

Parameters

45.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Outlier Detection Using the IQR Method | MathSpin