Finding outliers

Outliers are values ​​that differ significantly from other members of a statistical set. By analyzing outliers we can try to establish why they occurred in order to take some preventive or corrective actions. Using the example of sales analysis in the first four months of a year, you will learn how to detect exceptions and how to display them on a line chart.

To find outliers we should, based on all sales values, calculate first and third quartile. The first quartile (Q1) is the mean value between the minimum and the median, and the third quartile (Q3) is the mean value between the median and the maximum. Respectively, it is necessary to add formulas:


We will calculate the gap between the quartiles (IQR) as the difference between Q3 and Q1:


We calculate the lower and upper limits using the formulas:


All sales values ​​below the lower limit or above the upper limit are exceptions. To determine whether an element of the set is an exception, we should write the formula:


If the sales value is an exception the formula returns TRUE, otherwise it returns FALSE.

To show the outliers on the chart we will add two columns: the lower (LL) and upper limit (UL). We will show them on a line chart alongside the sales values where it’s easy to identify the outliers.