Outlier Formula
The extreme values in the data are called outliers. Example: For a data set containing 2, 19, 25, 32, 36, 38, 31, 42, 57, 45, and 84. In the above number line, we can observe the numbers 2 and 84 are at the extremes and are thus the outliers.The outliers are a part of the group but are far away from the other members of the group. The problem with outliers: Outliers create an imbalance in the dataset and hence are generally removed from the data. Also, sometimes the outlier occurs in the dataset, due to an error.
What Is the Outlier Formula?
Before we learn about finding the outlier, let's know about the quartiles and interquartile range. First Quartile, Q_{1}: The midvalue of the first half of the data represents the first quartile. Second Quartile, Q_{2}: The midvalue or the median of the data represents the second quartile. Third Quartile, Q_{3}: The midvalue of the second half of the data represents the third quartile. Turkey method is a mathematical method to find outliers. As per the Turkey method, the outliers are the points lying beyond the upper boundary of \(\text{Q}_3 +1.5 \text{ IQR} \) and the lower boundary of \(\text{Q}_1  1.5 \text{ IQR}\). These boundaries are referred to as outlier fences.
Upper~Fence = Q_{3} +1.5 IQR
Lower~Fence = Q_{1}  1.5 IQR
The data points beyond the upper and the lower fence in this box plot are referred to as outliers.
Solved Examples Using Outlier Formula

Example 1: Sam has got a set of multiples of the numbers 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, and 52. Help Sam to find the first quartile and the third quartile of this data. Solve this by using the outlier formula.
Solution:
The given data is 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, and 52
Median = 28
The first half of the data is 4, 8, 12, 16, 20, 24, 28 and its midvalue is 16
Q_{1} = 16
The second half of the data is 28, 32, 36, 40, 44, 48, 52 and the midvalue is 40
Q_{3} = 40
Answer: The first quartile is 16 and the third quartile is 40.

Example 2: Dan has got the data of runs scored by a batsman as 21, 14, 26, 8, 12, 12, 14, 76, 28, 20, 32, and 38. Can you help Dan to find the outlier? Solve this by using the outlier formula.
Solution:
The given data is 21, 14, 26, 8, 12, 12, 14, 76, 28, 20, 32, and 38
Arranging this in ascending order, we have: 8, 12, 12, 14, 14, 20, 21, 26, 28, 32, 38, and 76
Clearly from observation, we can find that the outlier is the number 76
Further, let us apply the Turkey rule to find the outlier.
The first half of the data is 8, 12, 12, 14, 14, 20
Q_{1} = (12 + 14)/2 = 26/2 = 13
The second half of the data is 21, 26, 28, 32, 38, 76
Q_{3} = (28 + 32)/2 = 60/2 = 30
Interquartile range, IQR = Q_{3}  Q_{1} = 30  13 = 17
1.5 IQR = 1.5 × 17 = 25.5
Upper Boundary = Q_{3} + 1.5 × IQR = 30 + 25.5 = 55.5
Lower Boundary = Q_{1}  1.5 × IQR = 13  25.5 = 12.5
The outlier boundaries are 12.5 and 55.5, and the number 76 lies beyond this boundary.
Answer: 76 is the outlier.