Outlier Detection Using the IQR Method
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 or above .
Step-by-step: {3, 5, 7, 8, 9, 10, 45}
Step 1 — Sort: Already sorted. .
Step 2 — Quartiles: Q1 = 5, Median = 8, Q3 = 10.
Step 3 — IQR: .
Step 4 — Fences:
- Lower:
- Upper:
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
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.