2.6 - Measures of dispersion

Measures of Dispersion

Dispersion refers to how varied data are in a data set or how spread out the distribution of the data is
There are many ways to measure 'dispersion'

Range

Most straighforward measure to calculate

range=maximum  minimum

Because we are subtracting values, the data must be quantitive (interval or ratio)

Interquartile Range (IQR)

IQR is the range of the middle 50% of the values in a distribution.
equal to the length of the box in the box plot

IQR=75th25th=Q3Q1

Deviation

Previous measures took only some of the values into the account (min and max for range, Q1 and Q3 for IQR).
Other way to include all data is to compare how far away each piece of data x is from some specific value v
The most logical and common value of v is the mean
After calculating all of the deviations, we usually take the average

(xix¯)n
Mean Absolute Deviation (MAD)

After understanding the Example, we conclude that the average deviation from the mean will always be zero. But the set doesn't have zero spread, does it?
To fix that, we usually use mean absolute deviation (MAD). It calculated the deviation based on the average distance of values from the central value.

MAD=1n|xiv|
Minimization of MAD

The MAD is minimized, if we take the median for value v

Difference between deviation and absolute deviation is the difference between displacement and distance

Example

Data set {2,3,4,9,17}
mean - 7
deviations:
27=5
37=4
47=3
97=2
177=10
average deviation = 5+(4)+(3)+2+105=05=0
absolute deviation = 5+4+3+2+105=245=4.8
We can also calculate deviation from the median
median - 4
deviations:
24=2
34=1
44=0
94=5
174=13
average deviation = 2+(1)+0+5+135=155=3
average deviation = 2+1+0+5+135=215=4.2

Variance

Distance between to points on a plane is equal to

d=(x1x2)2+(y1y2)2

And the distance between central value v and the data set

d=(x1v)2+(x2v)2++(xnv)2

It is a sum of deviations from v squared - squared deviation from v

When considering MAD, the median minimized the sum of the absolute deviations. This is not the case for squared deviations, where the mean gives the smallest value
For this reason, we define variance of a population as the average of squared deviations from the mean

σ2=(xμ)2N

σ2 is the population variance

Variance in large population

In large populations, we use sample statistics.
When calculating the average of squared deviations from the mean using sample data, the computation tends to underestimate the variance of the larger population significantly
Because of this, the sample variance formula is adjusted slightly to account for that difference

s2=(xx¯)2n1

Standard deviation

The variance is a powerful measure, but it's hard to comprehend because of the squared units. Because of that, we introduce standard deviation which is a square root of the variance.
σ for population, s for sample

End remark

Fact worth to note - all of the measures discussed (Range, IQR, MAD, Variance, Standard Deviation) are always non-negative.
Additionally, they will be equal to 0 for constant data sets {1,1,1,1}

Visualization of mean and standard deviation

For data set

{4,7,13,21,28,33,42,61}

μ=26.125, and σ=17.93
What should we do to the set, if we want to keep the mean constant, but decrease the standard deviation?
We move the values from both sides of the mean by the same amount closer to the mean

{4+3,7+5,13,21,28,33,425,613}

μ=26.125, and σ=15.6 so the goal was met