Measures of Variability — Range, Variance, Std. Deviation, Coefficient of Variation
By: Jayesh Rao
Tags: Statistics, R Programming, Analytics, Stats, Analysis

Variability gives you the idea about how the data is distributed around the mean value in a data set. It gives you an idea how far the data is distributed. Variation exists in our daily lives, for example, the time we wake up every day varies over a range. Too much variability affects other events during the day and the outcome might not be favorable. Similarly if your favorite dish in a restaurant varies a lot you would not like that. This variation can be measured. Following is an example

Like the 3 measures of central tendency we have many measures of variability namely

Range Variance Standard Deviation Coefficient of variation/ Relative Standard Deviation

We will calculate of the above for our height distribution.

Range: Range is the most simple parameter of distribution, it tells us between what range the data point lie, that is the min and the max value. The range for above distribution is (62.0, 78.5). Variance: Variance denotes the dispersion of data points around the mean. The mean for the above distribution is 69.09888. The above graph is the visualization of the below data set

78.5 75.5 75.0 75.0 75.0 74.0 74.0 73.0 73.0 73.0 73.0 73.0 72.7 72.0 72.0 72.0 72.0 72.0 72.0

72.5 72.0 72.0 71.0 71.0 71.0 71.0 71.0 71.0 71.7 71.0 71.5 71.5 71.0 71.7 71.0 71.5 71.0 71.0

71.0 71.0 71.0 71.0 71.0 71.0 71.0 70.0 70.0 70.0 70.0 70.0 70.5 70.0 70.0 70.0 70.0 70.0 70.0

70.0 70.0 70.0 70.0 70.5 70.0 70.0 70.0 70.5 70.5 70.0 70.0 70.0 70.5 70.3 70.5 70.0 70.0 70.0

70.0 69.0 69.0 69.0 69.0 69.0 69.0 69.5 69.0 69.5 69.0 69.0 69.5 69.2 69.0 69.0 69.0 69.0 69.0

69.5 69.0 69.5 69.0 69.0 69.5 69.0 69.0 69.0 69.0 68.7 68.5 68.5 68.0 68.0 68.0 68.0 68.5 68.0

68.5 68.0 68.0 68.0 68.0 68.5 68.0 68.0 68.0 68.0 68.5 68.0 68.2 68.0 68.7 68.0 68.0 68.0 68.0

68.0 68.5 68.0 67.0 67.0 67.0 67.0 67.0 67.0 67.0 67.5 67.0 67.0 67.0 67.5 67.0 66.0 66.0 66.0

66.0 66.5 66.0 66.0 66.5 66.5 66.0 66.0 66.0 66.0 65.0 65.0 65.0 65.0 65.0 65.0 65.0 65.0 65.0

65.5 65.5 64.0 64.0 64.0 64.0 62.0 62.5

The formula for variance for a sample is (We won’t be using the population formula)

We get s2 = 6.484943 inch2 for the above data set. As you can see the variance is the squared difference between each data point X1 X2 X3 … Xn and M divided by the degrees of freedom ie. N-1.

Note: Variance gives the value in squared unit, inch2 which doesn’t make much sense.

3. Standard Deviation: Most of the times in very large datasets, the value of variance is too large and is difficult to calculate. Therefore we take the square root of variance. This is called the Standard Deviation. The formula to calculate the Standard Deviation is nothing but squared root of variance. Therefore

s = 2.546555 for the above data set.

4. Relative Standard Deviation/ Coefficient of Variation: It is the standard deviation relative to the mean of the data set. An even better unit less measure of dispersion is the coefficient of variance. Coefficient of variation is obtained by dividing the standard deviation by the mean of the sample. The Relative Standard Deviation for our data set is 0.03675069

Note : Both Variance and Standard Deviation have units, inch in our case. Imagine a scenario where you need to compare the dispersion of two data sets of different units. Therefore coefficient of variance is preferred in such a situation.