How to Calculate the Interquartile Range

••• krisanapong detraphiphat/Moment/GettyImages

The interquartile range, often abbreviated as the IQR, represents the range from the 25th percentile to the 75th percentile, or the middle 50 percent, of any given data set. The interquartile range can be used to determine what the average range of performance on a test would be: you can use it to see where most people's scores on a certain test fall, or determine how much money the average employee at a company makes each month. The interquartile range can be a more effective tool of data analysis than the mean or median of a data set, because it allows you to identify the dispersion range rather than just a single number.

TL;DR (Too Long; Didn't Read)

The interquartile range (IQR), represents the middle 50 percent of a data set. To calculate it, first order your data points from least to greatest, then determine your first and third quartile positions by using the formulas (N+1)/4 and 3*(N+1)/4 respectively, where N is the number of points in the data set. Finally, subtract the first quartile from the third quartile to determine the interquartile range for the data set.

Order Data Points

Interquartile range calculation is a simple task, but before calculating you will need to arrange the various points of your data set. To do this, begin by ordering your data points from least to greatest. For example, if your data points were 10, 19, 8, 4, 9, 12, 15, 11 and 20, you would rearrange them like this: {4, 8, 9, 10, 11, 12, 15, 19, 20}. Once your data points have been ordered like this, you can move onto the next step.

Determine First Quartile Position

Next, determine the position of the the first quartile using the following formula: (N+1)/4, where N is the number of points in the data set. If the first quartile falls between two numbers, take the average of the two numbers as your first quartile score. In the above example, since there are nine data points, you would add 1 to 9 to get 10, and then divide by 4 to get 2.5. Since the first quartile falls between the second and third value, you would take the average of 8 and 9 to get a first quartile position of 8.5.

Determine Third Quartile Position

Once you've determined your first quartile, determine the position of the the third quartile using the following formula: 3*(N+1)/4 where N is again the number of points in the data set. Likewise, if the third quartile falls between two numbers, simply take the average as you would when calculating the first quartile score. In the above example, since there are nine data points, you would add 1 to 9 to get 10, multiply by 3 to get 30 and then divide by 4 to get 7.5. Since the first quartile falls between the seventh and eighth value, you would take the average of 15 and 19 to get a third quartile score of 17.

Calculate Interquartile Range

Once you've determined your first and third quartiles, calculate the interquartile range by subtracting the value of the first quartile from the value of the third quartile. To finishing the example used over the course of this article, you would subtract 8.5 from 17 to find that the interquartile range of the data set equals 8.5.

Advantages and Disadvantages of IQR

The interquartile range has an advantage of being able to identify and eliminate outliers on both ends of a data set. IQR also is a good measure of variation in cases of skewed data distribution, and this method of calculating IQR can work for grouped data sets, so long as you use a cumulative frequency distribution to organize your data points. The interquartile range formula for grouped data is the same as with non-grouped data, with IQR being equal to the value of the first quartile subtracted from the value of the third quartile. However, it has several disadvantages as compared to standard deviation: less sensitivity to a few extreme scores and a sampling stability that is not as strong as standard deviation.

References

About the Author

Mark Kennan is a writer based in the Kansas City area, specializing in personal finance and business topics. He has been writing since 2009 and has been published by "Quicken," "TurboTax," and "The Motley Fool."

Dont Go!

We Have More Great Sciencing Articles!