# Interquartile Range (IQR)

Before studying interquartile range, we first should study quartiles for they act as a base for the interquartile range. Quartiles are those values which divide the series into \(4\) equal parts. Before calculating the quartiles, first we have to arrange all the individual observations in an ascending order. Let us study some components of quartiles.

**First quartile:**This is the first value that divides the series into \(4\) equal parts. It is also known as**lower quartile**. It divides the series in such a manner that one-fourth of the observations are below it and the remaining three quarters are above it. It is represented by the letter \(q_{1}.\)**Second quartile:**This is the second value that divides the series into \(4\) equal parts. It is also called**median**. It divides the series equally. Half of the observations are below it and the other half of the observations are above it. It is represented by the letter \(q_{2}\) or \(M\). For more information on median, see Median.**Third quartile:**This is the third value that divides the series into \(4\) equal parts. It is also called**upper quartile**. It divides the series in such a way that three-fourth of the observations are below it and the remaining one-fourth of the observations are above it. It is represented by the letter \(q_{3}\).

### How to calculate the quartiles?

The following are some formulas for calculating the quartiles:

**Individual Series:**For calculating \(q_{1}\), the formula is \(\left(\frac{(N+1)}{4}\right)^{\text{th}}\) observation, where \(N\) is the number of observations. For calculating \(q_{3}\), the formula is \(\left(3\times\frac{(N+1)}{4}\right)^{\text{th}}\) observation, where \(N\) is the number of observations.**Discrete Series:**For calculating the quartiles, first calculate the cumulative frequency \((cf)\). For calculating \(q_{1}\), the formula is \(\left(\frac{(N+1)}{4}\right)^{\text{th}}\) observation, where \(N\) is the number of observations. For calculating \(q_{3}\), the formula is \(\left(3\times\frac{(N+1)}{4}\right)^{\text{th}}\) observation, where \(N\) is the number of observations.**Continuous Series:**For calculating \(q_{1}\), the formula is \[l+\dfrac{\dfrac{N}{4}-cf}{f}\times h,\] and for calculating \(q_{3}\), the formula is \[l+\dfrac{\dfrac{3N}{4}-cf}{f}\times h,\] where- \(l\) is the lower limit of the quartile class interval
- \(N\) is the number of observations
- \(cf\) is the cumulative frequency of the class interval preceding the quartile class interval
- \(f\) is the frequency of the quartile class interval
- \(h\) is the width of the quartile class interval.

**NOTE:** The formulas for calculating \(q_{2}\) or the median have already been given in the wiki page of Median.

While calculating quartiles, if \(\frac{N+1}{4}\) comes in a decimal, then use this:

- Separate the integer and fractional parts.
Add the integer number observation and the positive difference of the integer observation and its next observation multiplied by the fractional value.

For example, if \(\frac{N+1}{4}=5.5\), then \[q_{1}=5^{\text{th}} \text{ observation } + 0.5\times \left(6^{\text{th}} \text{ observation -} 5^{\text{th}} \text{ observation}\right).\]

Now comes the turn of **interquartile range**. It is defined as the difference of the **upper quartile** and the **lower quartile**. Let's see some worked examples.

## Calculate \(q_{1},q_{3}\) and the interquartile range of the following distribution:

\[10,15,20,25,30,35,40,45,50,55,60.\]

The values are arranged in ascending order. So, we can calculate \(q_{1}\) using the formula. As there are \(11\) observations, we put \(11\) in the formula \(\left(\frac{(N+1)}{4}\right)^{\text{th}} \) observation and get \(q_{1}\) as the \(3^{\text{rd}}\) observation which is \(20\).

For \(q_{3}\), we get \(q_{3}\) as the \(9^{\text{th}} \) observation which is \(50\). So the interquartile range is equal to \(50-20=30\). \(_\square\)

## Calculate \(q_{1},q_{3}\) and the interquartile range of the following distribution:

\[28,18,20,24,30,15,47,27.\]

Arranging the values in ascending order, we get \(15,18,20,24,27,28,30,47\). Calculating \(q_{1}\), we get \(2.25^{\text{th}}\) observation as our \(q_{1}\). Now to calculate the \(2.25^{\text{th}}\) observation, we will use the technique given in the Note of this page and we will get \[2^{\text{nd}} \text{ observation } +0.25\times \left(3^{\text{rd}} \text{ observation }-2^{\text{nd}}\text{ observation }\right)=q_{1},\] from which we get our \(q_{1}\) as \(18.5\).

Similarly doing for \(q_{3}\), we get \(q_{3}\) as \(29.5\). Hence, the interquartile range will be \[29.5-18.5=11. \ _\square\]

**Cite as:**Interquartile Range (IQR).

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/data-interquartile-range/