Quartile coefficient of dispersion

In statistics, the quartile coefficient of dispersion is a descriptive statistic which measures dispersion and is used to make comparisons within and between data sets. Since it is based on quantile information, it is less sensitive to outliers than measures such as the coefficient of variation. As such, it is one of several robust measures of scale.

The statistic is easily computed using the first (Q1) and third (Q3) quartiles for each data set. The quartile coefficient of dispersion is:


 * $${Q_3 - Q_1 \over Q_3 + Q_1}.$$

Example
Consider the following two data sets:


 * A = {2, 4, 6, 8, 10, 12, 14}


 * n = 7, range = 12, mean = 8, median = 8, Q1 = 4, Q3 = 12, quartile coefficient of dispersion = 0.5


 * B = {1.8, 2, 2.1, 2.4, 2.6, 2.9, 3}


 * n = 7, range = 1.2, mean = 2.4, median = 2.4, Q1 = 2, Q3 = 2.9, quartile coefficient of dispersion = 0.18

The quartile coefficient of dispersion of data set A is 2.7 times as great (0.5 / 0.18) as that of data set B.