Ravindra BagaleCourses & study guides मराठी Track your progress

5. Data Cleaning A–Z

5.15 Outliers

An outlier (बाकीपेक्षा खूप वेगळे, असामान्य मूल्य) is a value far away from the rest – a typo (₹12,990 instead of ₹129.90) or a genuine bulk order.

Before

Order ID Amount Flag
BLK-3401 120
BLK-3402 95
BLK-3403 140
BLK-3404 12,990
BLK-3405 110
BLK-3406 0

About this data: Teaching sample for a fictional shop “CityBasket Retail”. Figures and names (e.g. Aarti Kulkarni) are made up for this lesson on outliers.

After

Order ID Amount Flag
BLK-3401 120 OK
BLK-3402 95 OK
BLK-3403 140 OK
BLK-3404 12,990 Outlier – verify
BLK-3405 110 OK
BLK-3406 0 Outlier – verify

About this data: Demo table only — not real customer or company data. Built to practise outliers.

Steps in Excel – IQR (inter-quartile range) method

  1. Q1: =QUARTILE.INC($B$2:$B$7,1), Q3: =QUARTILE.INC($B$2:$B$7,3) (put in E1, E2).
  2. IQR: =E2-E1. Lower fence =E1-1.5*E3, upper fence =E2+1.5*E3.
  3. Flag: =IF(OR(B2<$E$4,B2>$E$5),"Outlier – verify","OK").
  4. Visual check: Insert › Charts › Insert Statistic Chart › Box and Whisker (Excel 2016+) shows outliers as dots.
  5. Alternative z-score: =STANDARDIZE(B2,AVERAGE($B$2:$B$7),STDEV.S($B$2:$B$7)); |z| > 3 is unusual (works best with many rows).

Ravindra Bagale's Tip

When they find an outlier, many students delete it straight away. Stop! An outlier means "check it", not "delete it". A big order during Diwali can be genuine. Verify with the source (the order system, the store manager), and write your decision (keep / correct / exclude) in a note column.

Practice task

For 30 order amounts calculate the IQR fences and flag outliers. Draw a box-and-whisker chart and compare the dots with your flags.

Loading practice tasks...

  1. Average (Easy): Find the average of C2:C11.
  2. Median (Easy): Find the median of C2:C11.
  3. Biggest value (Easy): Find the biggest value in C2:C11.
  4. Smallest value (Easy): Find the smallest value in C2:C11.
  5. First quartile (Q1) (Medium): Find Q1 of C2:C11.
  6. Third quartile (Q3) (Medium): Find Q3 of C2:C11.
  7. IQR (Medium): Find the IQR of C2:C11.
  8. Upper fence (Medium): Find the upper fence.
  9. Is ATM-07 an outlier? (Hard): Show "Outlier" if C8 is above the upper fence or below the lower fence, else "OK".
  10. Is ATM-02 an outlier? (Hard): Same test for C3.
  11. Z-score of ATM-09 (Hard): Find the z-score of C10.

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Outliers?
Card 1: What is Outliers? · Download PNG
Revision card 2: Tiny example — Outliers
Card 2: Tiny example — Outliers · Download PNG
Revision card 3: Checklist — Outliers
Card 3: Checklist — Outliers · Download PNG