# What Are Inner and Outer Fences?

## Find Outliers Using the Interquartile Range of a Dataset

One feature of a data set that is important to determine is if it contains any outliers. Outliers are intuitively thought of as values in our set of data that differ greatly from a majority of the rest of the data. Of course, this understanding of outliers is ambiguous. To be considered as an outlier, how much should the value deviate from the rest of the data? Is what one researcher calls an outlier going to match with another’s? In order to provide some consistency and a quantitative measure for the determination of outliers, we use inner and outer fences.

To find the inner and outer fences of a set of data, we first need a few other descriptive statistics. We will begin by calculating quartiles. This will lead to the interquartile range. Finally, with these calculations behind us, we will be able to determine the inner and outer fences.

## Quartiles

The first and third quartiles are part of the five number summary of any set of quantitative data. We begin by finding the median or the midway point of the data after all of the values are listed in ascending order. The values less than the median corresponding to roughly half of the data. We find the median of this half of the data set, and this is the first quartile.

In a similar way, we now consider the upper half of the data set. If we find the median for this half of the data, then we have the third quartiles. These quartiles get their name from the fact that they split the data set into four equal sized portions, or quarters. So in other words, roughly 25% of all of the data values are less than the first quartile. In a similar way, approximately 75% of the data values are less than the third quartile.

## Interquartile Range

We next need to find the interquartile range (IQR). This is easier to calculate than the first quartile q1 and the third quartile q3. All that we need to do is to take the difference of these two quartiles. This gives us the formula:

IQR = Q3 - Q1

The IQR tells us how spread out the middle half of our data set is.

## Find the Inner Fences

We can now find the inner fences. We start with the IQR and multiply this number by 1.5. We then subtract this number from the first quartile. We also add this number to the third quartile. These two numbers form our inner fence.

## Find the Outer Fences

For the outer fences, we start with the IQR and multiply this number by 3. We then subtract this number from the first quartile and add it to the third quartile. These two numbers are our outer fences.

## Detecting Outliers

The detection of outliers now becomes as easy as determining where the data values lie in reference to our inner and outer fences. If a single data value is more extreme than either of our outer fences, then this is an outlier and is sometimes referred to as a strong outlier. If our data value is between a corresponding inner and outer fence, then this value is a suspected outlier or a mild outlier. We will see how this works with the example below.

## Example

Suppose that we have calculated the first and third quartile of our data, and have found these values to the 50 and 60, respectively. The interquartile range IQR = 60 – 50 = 10. Next, we see that 1.5 x IQR = 15. This means that the inner fences are at 50 – 15 = 35 and 60 + 15 = 75. This is 1.5 x IQR less than the first quartile, and more than the third quartile.

We now calculate 3 x IQR and see that this is 3 x 10 = 30. The outer fences are 3 x IQR more extreme that the first and third quartiles. This means that the outer fences are 50 - 30 = 20 and 60 + 30 = 90.

Any data values that are less than 20 or greater than 90, are considered outliers. Any data values that are between 29 and 35 or between 75 and 90 are suspected outliers.