SlideShare a Scribd company logo
1 of 6
Download to read offline
1
Sachin Pathania
OUTLIER DETECTION AND TREATMENT
Introduction to Outlier Treatment
Outlier Treatment is one of the important part of data pre-processing is the
handling outlier. If the data contains outliers that can affect our result which
will depend on the data. So to remove these outliers from data Outlier
Treatment is used. At first, need to understand what outliers is.
What is Outliers?
An outlier is a value that behaves differently than other observations or we can
say
“A value that lies outside the data”
2
Example: A new coach has been working with the Long Jump team this month,
and the athletes' performance has changed.
 Augustus: +0.15m
 Tom: +0.11m
 June: +0.06m
 Carol: +0.06m
 Bob: + 0.12m
 Sam: -0.56m
So here, Sam is an outlier
Here are the results on the number line:
Following are two process to remove their outliers:-
 Interquartile Range ( IQR )
 Z-Score
But here I’m only using IQR.
Interquartile Range (IQR)
Interquartile Range (IQR) equally divides the distribution into four equal parts
called quartiles. It takes data into account the most of the value lies in that
region, it used a box plot to detect the outliers in data.
3
The following parameter is used to identify the IQR range:
 1st quartile (Q1) is 25%
 3rd quartile (Q3) is 75%
 2nd quartile (Q2) divides the distribution into two equal parts of 50%.
So, basically it is the same as Median.
The interquartile range is defined as the difference between the third and the
first quartile in other words, IQR equals Q3 minus Q1
Formula: - IQR = Q3 - Q1
4
Identify the Outliers Using IQR Method
As per a rule of thumb, observations can be qualified as outliers when they lie
more than 1.5 IQR below the first quartile or 1.5 IQR above the third quartile.
Outliers are values that “lie outside” the other values.
LB = Q1 – 1.5 * IQR
UB = Q3 + 1.5 * IQR
Outlier Treatment using IQR in Python:
5
Using IQR:
6
Calculate Lower Bound and Upper Bond values to remove outliers:
Removing Outliers:

More Related Content

What's hot

Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values Salford Systems
 
Basics mathematical modeling
Basics mathematical modelingBasics mathematical modeling
Basics mathematical modelingcyndy
 
Biostatistics Workshop: Missing Data
Biostatistics Workshop: Missing DataBiostatistics Workshop: Missing Data
Biostatistics Workshop: Missing DataHopkinsCFAR
 
Wisconsin hospital - Healthcare Cost Prediction
Wisconsin hospital - Healthcare Cost PredictionWisconsin hospital - Healthcare Cost Prediction
Wisconsin hospital - Healthcare Cost PredictionPrasann Prem
 
Machine learning session5(logistic regression)
Machine learning   session5(logistic regression)Machine learning   session5(logistic regression)
Machine learning session5(logistic regression)Abhimanyu Dwivedi
 
Assumptions of Linear Regression - Machine Learning
Assumptions of Linear Regression - Machine LearningAssumptions of Linear Regression - Machine Learning
Assumptions of Linear Regression - Machine LearningKush Kulshrestha
 
2.2 measurements, estimations and errors(part 2)
2.2   measurements, estimations and errors(part 2)2.2   measurements, estimations and errors(part 2)
2.2 measurements, estimations and errors(part 2)Raechel Lim
 
Data Preparation with the help of Analytics Methodology
Data Preparation with the help of Analytics MethodologyData Preparation with the help of Analytics Methodology
Data Preparation with the help of Analytics MethodologyRupak Roy
 
Machine Learning Algorithm - Linear Regression
Machine Learning Algorithm - Linear RegressionMachine Learning Algorithm - Linear Regression
Machine Learning Algorithm - Linear RegressionKush Kulshrestha
 
Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...
Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...
Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...Stats Statswork
 
Multivariate adaptive regression splines
Multivariate adaptive regression splinesMultivariate adaptive regression splines
Multivariate adaptive regression splinesEklavya Gupta
 
Computer Applications in Business
Computer Applications in Business Computer Applications in Business
Computer Applications in Business FATIMA
 

What's hot (18)

Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values Imputation Techniques For Market Research Datasets With Missing Values
Imputation Techniques For Market Research Datasets With Missing Values
 
Missing Data and Causes
Missing Data and CausesMissing Data and Causes
Missing Data and Causes
 
Machine learning session1
Machine learning   session1Machine learning   session1
Machine learning session1
 
Graphing Notes
Graphing NotesGraphing Notes
Graphing Notes
 
Basics mathematical modeling
Basics mathematical modelingBasics mathematical modeling
Basics mathematical modeling
 
Biostatistics Workshop: Missing Data
Biostatistics Workshop: Missing DataBiostatistics Workshop: Missing Data
Biostatistics Workshop: Missing Data
 
Wisconsin hospital - Healthcare Cost Prediction
Wisconsin hospital - Healthcare Cost PredictionWisconsin hospital - Healthcare Cost Prediction
Wisconsin hospital - Healthcare Cost Prediction
 
Machine learning session5(logistic regression)
Machine learning   session5(logistic regression)Machine learning   session5(logistic regression)
Machine learning session5(logistic regression)
 
Assumptions of Linear Regression - Machine Learning
Assumptions of Linear Regression - Machine LearningAssumptions of Linear Regression - Machine Learning
Assumptions of Linear Regression - Machine Learning
 
2.2 measurements, estimations and errors(part 2)
2.2   measurements, estimations and errors(part 2)2.2   measurements, estimations and errors(part 2)
2.2 measurements, estimations and errors(part 2)
 
Data Preparation with the help of Analytics Methodology
Data Preparation with the help of Analytics MethodologyData Preparation with the help of Analytics Methodology
Data Preparation with the help of Analytics Methodology
 
Correlation analysis
Correlation analysis Correlation analysis
Correlation analysis
 
Machine Learning Algorithm - Linear Regression
Machine Learning Algorithm - Linear RegressionMachine Learning Algorithm - Linear Regression
Machine Learning Algorithm - Linear Regression
 
Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...
Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...
Statswork- Lecture:1: Structural Equation Modeling (SEM) using AMOS (www.stat...
 
Multivariate adaptive regression splines
Multivariate adaptive regression splinesMultivariate adaptive regression splines
Multivariate adaptive regression splines
 
Regression
RegressionRegression
Regression
 
Computer Applications in Business
Computer Applications in Business Computer Applications in Business
Computer Applications in Business
 

Similar to DATA SCIENCE - Outlier detection and treatment_ sachin pathania

Most prominent methods of how to find outliers in statistics
Most prominent methods of how to find outliers in statisticsMost prominent methods of how to find outliers in statistics
Most prominent methods of how to find outliers in statisticsStat Analytica
 
What is Outlier Analysis and How Can It Improve Analysis?
What is Outlier Analysis and How Can It Improve Analysis?What is Outlier Analysis and How Can It Improve Analysis?
What is Outlier Analysis and How Can It Improve Analysis?Smarten Augmented Analytics
 
Box and-whisker-plots
Box and-whisker-plotsBox and-whisker-plots
Box and-whisker-plotsAjay Gupta
 
EDA and Preprocessing in Tabular and Text data .pptx
EDA and Preprocessing in Tabular and Text data .pptxEDA and Preprocessing in Tabular and Text data .pptx
EDA and Preprocessing in Tabular and Text data .pptxBrajkishore23
 
Data Science Interview Questions | Data Science Interview Questions And Answe...
Data Science Interview Questions | Data Science Interview Questions And Answe...Data Science Interview Questions | Data Science Interview Questions And Answe...
Data Science Interview Questions | Data Science Interview Questions And Answe...Simplilearn
 
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...aurkoiitk
 
Machine Learning Clustering
Machine Learning ClusteringMachine Learning Clustering
Machine Learning ClusteringRupak Roy
 
Outlier detection by Ueda's method
Outlier detection by Ueda's methodOutlier detection by Ueda's method
Outlier detection by Ueda's methodPOOJA PATIL
 
Chapter 02 describing distributions with numbers part II
Chapter 02 describing distributions with numbers part IIChapter 02 describing distributions with numbers part II
Chapter 02 describing distributions with numbers part IIHamdy F. F. Mahmoud
 
Application of Machine Learning in Agriculture
Application of Machine  Learning in AgricultureApplication of Machine  Learning in Agriculture
Application of Machine Learning in AgricultureAman Vasisht
 
ap_stat_1.3.ppt
ap_stat_1.3.pptap_stat_1.3.ppt
ap_stat_1.3.pptfghgjd
 
Risk management
Risk managementRisk management
Risk managementSunam Pal
 
Chapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptxChapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptxFarah Amir
 
Physics 1.2b Errors and Uncertainties
Physics 1.2b Errors and UncertaintiesPhysics 1.2b Errors and Uncertainties
Physics 1.2b Errors and UncertaintiesJohnPaul Kennedy
 
Detecting Assignable Signals via Decomposition of MEWMA Statistic
Detecting Assignable Signals via Decomposition of MEWMA StatisticDetecting Assignable Signals via Decomposition of MEWMA Statistic
Detecting Assignable Signals via Decomposition of MEWMA Statisticinventionjournals
 

Similar to DATA SCIENCE - Outlier detection and treatment_ sachin pathania (20)

Most prominent methods of how to find outliers in statistics
Most prominent methods of how to find outliers in statisticsMost prominent methods of how to find outliers in statistics
Most prominent methods of how to find outliers in statistics
 
What is Outlier Analysis and How Can It Improve Analysis?
What is Outlier Analysis and How Can It Improve Analysis?What is Outlier Analysis and How Can It Improve Analysis?
What is Outlier Analysis and How Can It Improve Analysis?
 
Outliers introductory stat
Outliers introductory statOutliers introductory stat
Outliers introductory stat
 
Outlier
OutlierOutlier
Outlier
 
outliers
outliersoutliers
outliers
 
Box and-whisker-plots
Box and-whisker-plotsBox and-whisker-plots
Box and-whisker-plots
 
EDA and Preprocessing in Tabular and Text data .pptx
EDA and Preprocessing in Tabular and Text data .pptxEDA and Preprocessing in Tabular and Text data .pptx
EDA and Preprocessing in Tabular and Text data .pptx
 
Data Science Interview Questions | Data Science Interview Questions And Answe...
Data Science Interview Questions | Data Science Interview Questions And Answe...Data Science Interview Questions | Data Science Interview Questions And Answe...
Data Science Interview Questions | Data Science Interview Questions And Answe...
 
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
A Study on the Short Run Relationship b/w Major Economic Indicators of US Eco...
 
Machine Learning Clustering
Machine Learning ClusteringMachine Learning Clustering
Machine Learning Clustering
 
Outlier detection by Ueda's method
Outlier detection by Ueda's methodOutlier detection by Ueda's method
Outlier detection by Ueda's method
 
Chapter 02 describing distributions with numbers part II
Chapter 02 describing distributions with numbers part IIChapter 02 describing distributions with numbers part II
Chapter 02 describing distributions with numbers part II
 
Dealing with Outliers
Dealing with OutliersDealing with Outliers
Dealing with Outliers
 
Application of Machine Learning in Agriculture
Application of Machine  Learning in AgricultureApplication of Machine  Learning in Agriculture
Application of Machine Learning in Agriculture
 
ap_stat_1.3.ppt
ap_stat_1.3.pptap_stat_1.3.ppt
ap_stat_1.3.ppt
 
Risk management
Risk managementRisk management
Risk management
 
Errors in measurement
Errors in measurementErrors in measurement
Errors in measurement
 
Chapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptxChapter 07 - Autocorrelation.pptx
Chapter 07 - Autocorrelation.pptx
 
Physics 1.2b Errors and Uncertainties
Physics 1.2b Errors and UncertaintiesPhysics 1.2b Errors and Uncertainties
Physics 1.2b Errors and Uncertainties
 
Detecting Assignable Signals via Decomposition of MEWMA Statistic
Detecting Assignable Signals via Decomposition of MEWMA StatisticDetecting Assignable Signals via Decomposition of MEWMA Statistic
Detecting Assignable Signals via Decomposition of MEWMA Statistic
 

Recently uploaded

BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 

Recently uploaded (20)

BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 

DATA SCIENCE - Outlier detection and treatment_ sachin pathania

  • 1. 1 Sachin Pathania OUTLIER DETECTION AND TREATMENT Introduction to Outlier Treatment Outlier Treatment is one of the important part of data pre-processing is the handling outlier. If the data contains outliers that can affect our result which will depend on the data. So to remove these outliers from data Outlier Treatment is used. At first, need to understand what outliers is. What is Outliers? An outlier is a value that behaves differently than other observations or we can say “A value that lies outside the data”
  • 2. 2 Example: A new coach has been working with the Long Jump team this month, and the athletes' performance has changed.  Augustus: +0.15m  Tom: +0.11m  June: +0.06m  Carol: +0.06m  Bob: + 0.12m  Sam: -0.56m So here, Sam is an outlier Here are the results on the number line: Following are two process to remove their outliers:-  Interquartile Range ( IQR )  Z-Score But here I’m only using IQR. Interquartile Range (IQR) Interquartile Range (IQR) equally divides the distribution into four equal parts called quartiles. It takes data into account the most of the value lies in that region, it used a box plot to detect the outliers in data.
  • 3. 3 The following parameter is used to identify the IQR range:  1st quartile (Q1) is 25%  3rd quartile (Q3) is 75%  2nd quartile (Q2) divides the distribution into two equal parts of 50%. So, basically it is the same as Median. The interquartile range is defined as the difference between the third and the first quartile in other words, IQR equals Q3 minus Q1 Formula: - IQR = Q3 - Q1
  • 4. 4 Identify the Outliers Using IQR Method As per a rule of thumb, observations can be qualified as outliers when they lie more than 1.5 IQR below the first quartile or 1.5 IQR above the third quartile. Outliers are values that “lie outside” the other values. LB = Q1 – 1.5 * IQR UB = Q3 + 1.5 * IQR Outlier Treatment using IQR in Python:
  • 6. 6 Calculate Lower Bound and Upper Bond values to remove outliers: Removing Outliers: