**Measures of dispersion** measure how spread out a data set is. For example, those are standard deviation, variance and coefficient of variation. In this lesson we will define some other measures of dispersion: range, interquartile range and coefficient of quartile deviation.

## Range

The **range** $R_{X}$ of numeric variable $X$ is the difference between the maximum and minimum value of $X$ (if they exist):

**$$R_{X} = X_{max} – X_{min}.$$**

Furthermore, range also makes sense for ordinal variable.

* Example 1: *The scores of ten pupils in an exam are: $16, 24, 28, 35, 48, 59, 60, 63, 75$.

**Solution:**

The highest score is $75$ and the lowest score is $16$. Therefore, the range is the difference between these two scores:

$$R_{X} = 75 – 16 = 59.$$

As we can see, range is calculated very easily. But, it is not based on all the observations. Since the range of a data set only depends on two values (minimum and maximum values), it is relatively poor summary of spread. Much better summary of the spread is the **interquartile range**.

## Interquartile range

The **interquartile range** $I_{Q}$ of numeric or ordinal variable is the difference between the upper quartile and lower quartile:

**$$I_{Q} = Q_{3} – Q_{1}.$$ **

We can say that the interquartile range is the range of the central $50 \%$ elements of an ordered sequence.

Similarly, the **interdecile range** $I_{D}$ is the difference between the ninth decile and first decile:

**$$I_{D}= D_{9} – D_{1}.$$**

The interdecile range is the range of the central $80 \%$ elements of an ordered sequence.

Furthermore, the** interpercentile range** **$I_{P} = P_{99} – P_{1}$ **is the range of the central $98 \%$ elements of an ordered sequence.

* Example 2: *Calculate the interquartile range for the following numbers: $1, 3, 4, 5, 5, 6, 7, 11$.

**Solution:**

$$N = 8, n = 4$$

$$\frac{N}{4} = \frac{8}{4} = 2 \rightarrow Q_{1} = \frac{y_{2} + y_{3}}{2} = \frac{7}{2} = 3.5$$

$$3\frac{N}{4} = 3 \frac{8}{4} = 6 \rightarrow Q_{3} = \frac{y_{6} + y_{7}}{2} = \frac{13}{2} = 6.5$$

The interquartile range is

$$I_{Q} = 6.5 – 3.5 = 3.$$

## Coefficient of quartile deviation

The **coefficient of quartile deviation** (or the **quartile coefficient of dispersion**) is used for comparing dispersion for two or more sets of data. It is calculated by the following formula:

**$$V_{Q} = \frac{Q_{3} – Q_{1}}{Q_{1} + Q_{3}}.$$**

Furthermore, $V_{Q}$ makes sense only if variables have **positive values**. Also, **$0 \leq V_{Q} < 1$**.

If one data set has a larger coefficient of quartile deviation than another data set, then that data set’s interquartile dispersion is greater.

## More examples

* Example 3: *Calculate the range and coefficient of quartile deviation for the following sequence: $1, 2, 4, 4, 6, 9, 9, 9, 10, 100$.

**Solution:**

The range is:

$$R = 100 – 1 = 99.$$

Furthermore, since $N = 10, n = 4$, we have

$$ \frac{N}{4} = \frac{10}{4} = 2.5 \notin \mathbf{N} \rightarrow r = 3$$

$$2 \frac{N}{4} = 2 \frac{10}{4} = 5 \rightarrow r = 6$$

$$3 \frac{N}{4} = 3 \frac{10}{4} = 7.5 \notin \mathbf{N} \rightarrow r = 8$$

Therefore, $Q_{1} = y_{3} = 4, Q_{3} = y_{8} = 9$ and

$$V_{Q} = \frac{9 – 4}{4 + 9} = \frac{5}{13} = 0.38.$$

** Example 4: **In the following table the number of cars sold by some company was recorded for ten days. Calculate the interquartile range.

*Solution:*

First, we need to sort the frequency data: $6, 11, 16, 18, 19, 20, 21, 22, 26, 29$.

$$n = 4, N = 10$$

$$\frac{N}{4} = \frac{10}{4} = 2.5 \notin \mathbf{N} \rightarrow Q_{1} = y_{3} = 16$$

$$3\frac{N}{4} = 3 \frac{10}{4} = 7.5 \notin \mathbf{N} \rightarrow Q_{3} = y_{8} = 22$$

Therefore, $I_{Q} = 22 – 16 = 6$.