Interquartile Range


In statistics, the interquartile range (IQR) is a measure of statistical dispersion that quantifies the spread of the middle 50% of a dataset. It is particularly useful when dealing with skewed or non-normal distributions.

The IQR is calculated by subtracting the first quartile (Q1) from the third quartile (Q3). Quartiles divide a dataset into four equal parts, where Q1 represents the 25th percentile and Q3 represents the 75th percentile.

To calculate the interquartile range, follow these steps

Arrange the dataset in ascending order. Determine the position of Q1 and Q3 using the formulas: Q1 = (n + 1) / 4 Q3 = 3 * (n + 1) / 4 (Note: "n" represents the total number of values in the dataset.) If the positions obtained in step 2 are not whole numbers, round them up to the nearest whole number to find the corresponding values in the dataset. Calculate the interquartile range by subtracting Q1 from Q3.

Here's an example to illustrate the calculation of the interquartile range

Consider the following dataset of exam scores:

65, 72, 75, 78, 80, 82, 85, 88, 90, 92.

Arrange the dataset in ascending order:

65, 72, 75, 78, 80, 82, 85, 88, 90, 92.

Determine the positions of Q1 and Q3:

Q1 = (10 + 1) / 4 = 2.75 (rounded up to 3) Q3 = 3 * (10 + 1) / 4 = 8.25 (rounded up to 9)

Find the corresponding values in the dataset:

Q1: The third value in the dataset is 75.

Q3: The ninth value in the dataset is 88.

Calculate the interquartile range:

IQR = Q3 - Q1 = 88 - 75 = 13

So, in this example, the interquartile range of the dataset is 13. This means that the middle 50% of the scores fall within a range of 13 units. The IQR provides a measure of variability that is less sensitive to extreme values or outliers compared to the range or standard deviation.

Interquartile Range


Enroll Now

  • Python Programming
  • Machine Learning