Outliers are values that are very different from the rest of the data.


🔴 Why Outliers Matter:

They can:

  • Skew averages
  • Break models
  • Mislead insights

🔍 Example:

Marks dataset:

  • 70, 75, 80, 85, 90
  • 500 (outlier)

Clearly unrealistic.


🔎 Methods to Detect Outliers:

1. Visual Methods

  • Box plots
  • Scatter plots
https://images.openai.com/static-rsc-4/TTmpRxZw1cIWgv5wErjjbNlIpMpWkZJS1ElFDfl8ZPySLZS9j0WpCm_GJcMPR89EB_U3tZTNekIi8XRQeOc15HFbfTZPSuBuCRc_kUdLawJUNv25Xz57MCdTXdDFVgdVsv6TpbHQmd6qy7hN5EOajL9MPXrD1jXOqpzyor3LUPCRVnIGQLl8CxeSVW5GSNwO?purpose=fullsize
https://images.openai.com/static-rsc-4/-pAM6NIv-1HyY-nBFoIERYJnxPKj_sBGeMbswOn0MVQ60EoYkztDJMVu2mfZbibpSA4bBMnIFx5-BONElNjvbZuxDEAsdvLEvb5AROGVbmWamb6NSceLPdN4W1IHZnefUFXS1Iqk70lHr8lugRI0xMhEIYgUivRMpUd72_qrKs5Fhuz7InVLsrGnDA9lqefR?purpose=fullsize
https://images.openai.com/static-rsc-4/HAN5NhVpm6VxJY_ZKwZbC2XmU8ofKBfbNSubuOJLy3HQtxdhYQ5awGdEq4ex0m6ssQ9JXjPOfwYncqtSKmsXUS--v-vynlILvCGiDFxevdw2XxjqrK39NSJhS5PKqqzPhSdsl0UFHTKAxJ4ecX_0HCjuZ-Sq04IE_mSs92wYGTsYelwIWGx06idSqgPcaRd1?purpose=fullsize
5

2. Statistical Methods

  • Z-score
  • IQR (Interquartile Range)

⚙️ What to Do with Outliers?

  • Remove them (if clearly wrong)
  • Cap them (limit extreme values)
  • Keep them (if they are meaningful, e.g., high-income individuals)

💡 Key Idea:

Not all outliers are bad—some are valuable insights.