Dispersion

Dispersion indicators aim to express the amount of variation in a data. It could also be thought as how tightly or loosely the values are distributed in distribution.
Categorical variables
Dispersion indicators are not usually used with categorical variables.
Numerical variables
[br][color=#0000ff]Range[/color] is the difference between the maximum and the minimum values. It cannot decrease, if observations are added to the data. Extreme values affect a lot to range.  The range in Data 1 is 172cm - 138 cm = 34cm. [br][br][br][color=#0000ff]Interquartile range (IQR, q[sub]r[/sub][/color][color=#0000ff])[/color] is the difference of the upper and the lower quartile. At least 50 % of the values are at this interval. It is not as sensible for extreme values as range. [color=#0000ff]Quartile deviation [/color] is [math] \textcolor{blue}{q=\frac{q_r}{2}}.[/math] Both of them can change in both directions, if observations are added to the data. In Data 1, interquartile range is [math]q_r = 157 cm - 146 cm = 11cm [/math] and quartile deviation is [math]q=\frac{11cm}{2}=5.5 cm.[/math][br][br][color=#0000ff]Deviation[/color] of an observation [i]i  [/i]is the difference of the value and the mean:  [math] x_i -\overline x.[/math] When adding up deviations, positive and negative values cancel out each other meaning, that dispersion would be underestimated. For that reason, absolute values of deviations should be used (notation [math]\Sigma[/math] refers for adding):  [br][br]   [math]\large \sum_{i=1}^n\mid x_i - \overline x\mid .[/math][br][br]When adding up  the deviations, the number of observations is significant. Although the deviations would be about the same magnitude, the sum would be much more  for 1000 observations as for 50 observations. In order to be comparable, the sums should be divided with the number of observations to get [color=#0000ff]mean deviation[/color]:  [br][br][br]   [math]\large \sum_{i=1}^n\frac{\mid x_i - \overline x\mid}{n}.[/math][br] [br][br]When squared differences are used instead of absolute values, it is called as  [color=#0000ff]variance[/color]. Variance do not depend on location. [color=#0000ff]Variance for the whole population or a large sample[/color] is marked with [math] \sigma^2[/math]: [br][br]  [math]\large \sigma^2= \frac{1}{n}\sum_{i=1}^n(x_i - \overline x)^2,[/math][br][br]where the number of observation is [color=#0000ff][i]n[/i][/color]. [br][br]If the sample is small (less than 30), then a divisor is [color=#0000ff] [i]n [/i]- 1[/color] and variance is marked with [color=#0000ff][math] s^2[/math][/color]: [br][br]  [math]\large s^2= \frac{1}{n-1}\sum_{i=1}^n(x_i - \overline x)^2.[/math][br][br][br]In variance, the squared values are used for deviation. It means that unit of the result is also squared. The result is much easier to understand, if the square root is taken. In that case, it is called as a [color=#0000ff]standard deviation[/color]. [br][br]For Data 1, variance is[br][br][math] s^2=\frac{(138-151.96)^2+(141-151.96)^2 + (142-151.96)^2+\cdots + (167-151.96)^2+(172-151.96)^2}{25-1}=\frac{1840.96}{24}=76.707\;\; (cm^2).[/math][br][br]Thus, the standard deviation is [math]s=\sqrt{76.707}\approx 8.758 cm.[/math] Because data is small (less than 30), the latter formula is used. [color=#0000ff]Try this one with spreadsheet computation![/color][br][br]If deviations of the same property in different units is compared, then [color=#0000ff]coefficent of variation[/color] can be used:[br][br]   [math]\large v=\frac{s}{\overline x}.[/math][br][br]It can be solved, if the variables are at least in ratio scale.  [br][br][color=#0000ff]Example[/color]: One year, the mean annual income in USA was $20000 and standard deviation $10000. At the same year, the mean annual income in Great Britain was  £6000 and standard deviation £4000. Comparing just standard deviations, the deviation in USA seem to be larger. The coefficient of variation for incomes in USA is [br][br][math]v_\text{USA}=\frac{10000}{20000}=0.5 [/math][br][br]and in the Great Britain is 0.67. Deviation is larger in the Great Britain. [br][br]Comparisons may also be made in the same way for variables in the same unit if there is a large variation in their magnitude. For example, comparing the standard deviation of weight of mice with the standard deviation of the weight of elephants does not make sense without a coefficient of variation.[br][br][br]
Larry Gonick & Woollcott Smith: The Cartoon Guide to Statistics

Information: Dispersion