A measure of dispersion is a statistic of a data set that describes the variability or spread of that data set. Two wellknown examples are the standard deviation and the interquartile range. Maple 17 introduces a new measure of dispersion called , originally proposed by Rousseeuw and Croux [1].
Let us investigate how measures of dispersion behave when noise is added to a data set. Specifically, we will have an original data set of, say, data points, and a perturbed data set where a certain fraction of the data points are changed dramatically. We investigate at what value of the values become meaningless.
>


 (6) 
>


 (7) 
>


 (8) 
>


 (9) 
>


 (10) 
For the standard deviation, we see that changing only one data point can massively change the standard deviation. In other words, there is no positive fraction of the data points that we can change while keeping the standard deviation bounded. We say that the breakdown point of the standard deviation is 0.
For the interquartile range, the process is different. Changing a single data point doesn't make the interquartile range of change very much; in fact, we can change up to a quarter of the data points while staying within an order of magnitude from the interquartile range of . As soon as we have changed 250 out of the 1000 data points, though, the interquartile range also goes through the roof.
>


 (11) 
>


 (12) 
>


>


 (13) 
>

Y

>


 (14) 
This suggests that the breakdown point of the interquartile range is : changing strictly fewer than of the points cannot make the interquartile range unbounded. This is indeed correct. We say that the interquartile range is more robust than the standard deviation.
The breakdown point for any statistic can never be more than : if we change over half of the data points in the set, then there's no way to decide what the "correct" data is, and what the "changed" data is. So are there dispersion statistics that reach this maximal breakdown point?
Yes, there are. A relatively wellknown one is the median absolute deviation from the median, available in Maple as MedianDeviation. As the name says, it is obtained by computing the absolute difference between every data point and the median of the data set, and taking the median of these values.
>


 (15) 
>


>


>


 (16) 
>


The median absolute deviation from the median is a very useful robust estimator, but it also has some disadvantages, explained in the paper [1] by Rousseeuw and Croux. One of their objections is that it doesn't deal with asymmetric distributions very well, and another is that, while it is very robust against extreme changes in some points, it needs relatively many data points to "converge" to the proper value for a distribution in the absence of disturbance. In the statistics literature, this is phrased as saying that the median absolute deviation from the median is not very efficient. These authors propose two alternative statistics that also have a breakdown point of but higher efficiency, called and . Maple 17 has an implementation of , which is called RousseeuwCrouxSn. This is a new command for Maple 17.
>


 (17) 
>


>


>


 (18) 
>


>


 (19) 
We will show how all of these statistics deviate from their true value for betadistributed data samples at sample sizes from 10 to 10000 and with fractions between and of the data replaced by the value . In particular, given the sample size and the fraction , we replace the highest percent of the data by , then divide value obtained for the changed sample by the true value for the distribution, thus obtaining a number that should be for an ideal statistic. We then repeat this times, and take the average squared difference from . This is the number shown in the plot below for each of the four measures of dispersion discussed above.
>


>


>


 (20) 
>


>


>


 (21) 
>


>


>


>


The colors are red for the standard deviation, green for the interquartile range, blue for the median absolute deviation from the median, and yellow for Rousseeuw and Croux' . Lower numbers are shown higher in the graph, and are better. We see that in the case where there is no distortion (), the standard deviation has the lowest distortion. However, as soon as there is any distortion, it is immediately too inaccurate to be useful for any purpose. For , the interquartile range (green) does reasonably well, but greater values of make it, too, unusable. The median absolute deviation from the median (in blue) and (yellow) are pretty close in most cases, with yellow coming out on top slightly more often than blue. We see that is a good choice for a robust statistic of dispersion.