What is the Interquartile Range?

Shown in a box plot, the interquartile range is the difference between the lower and upper quartile, and is a measure of the dispersion of data. If you’re interviewing for a data analyst job, it’s important to be prepared with a similar answer and to answer confidently.

The interquartile range (IQR) is a measure of statistical dispersion, which describes the range of the middle 50% of a dataset. It is calculated as the difference between the upper quartile (Q3) and the lower quartile (Q1) of the dataset. In other words, it represents the spread of the middle 50% of the data points.

To calculate the interquartile range:

  1. Arrange the dataset in ascending order.
  2. Find the median, which separates the data into two halves: the lower half (Q1) and the upper half (Q3).
  3. Calculate Q1, which is the median of the lower half of the dataset.
  4. Calculate Q3, which is the median of the upper half of the dataset.
  5. Subtract Q1 from Q3 to find the interquartile range.

In summary, the interquartile range gives insight into the spread of the central portion of the data, making it particularly useful for identifying the variability within a dataset while being less affected by extreme values or outliers compared to measures like the range.