# Measures of Variation

In addition to measures of central tendency that indicate the central value of a dataset, there are also measures of variation that indicate how spread out a dataset is. Measures of variation are also called measures of spread or dispersion for this reason. Standard deviation and variance are measures of spread that pair naturally with the mean. Range, interquartile and percentile ranges, on the other hand, go with the median. There is no measure of spread that naturally pairs with the mode.

## Variance and Standard Deviation

Variance and standard deviation (which is the square root of variance) make use of how far each data point is away from the mean.

### Ungrouped Data

Essentially, the variance is the average of the differences squared (squared so that positive numbers are added together) and is given by:

The second formula can be thought of as ‘the mean of the datapoints squared subtract the square of the datapoints’ mean‘. The variance is often written in terms of a summary statistic  where the summary statistic is given by

This summary statistic is given in the formula booklet for the Edexcel A-Level Maths syllabus.

The standard deviation is hence given by

When calculating variance, the differences are squared (so that positive numbers are added together) and so may suggest an unnatural measure of spread. Since standard deviation is the square root of variance, it gives a natural measure of spread and also has the same units as the original datapoints.

### Grouped Data

Estimates for the variance and standard deviation can be obtained using midpoints when grouped data is given. This is very much like when estimating the mean for grouped data. The formulae change slightly to include the frequencies (f) and the x are now the midpoints of the intervals:

These formulae also apply to ungrouped data that is given in frequency tables.

## Ranges

### Range

It is likely that you have heard of the range before, it is simply given as follows:

Evidently, the range is affected by extreme values.

### Quartiles and Percentiles

Similarly to the median, also known as Quartile 2 , Quartile 1  and Quartile 3  indicate where the first 25% and 75% of the data values lie respectively. All three quartiles can be seen on a box plot. See below for how to find quartiles. Similarly, percentiles indicate where any percentage of the data points lie. For example, , represents the value that 10% of the data points are less than. Percentiles can be identified on cumulative frequency diagrams (see the exam-style example here) or by using interpolation.

Finding the quartiles for discrete data: In some examples, such as Example 1 on the box plots page, it is easy to locate the quartiles after listing the data in order. Otherwise, in general, Q1 can be found by dividing the number of data points n by 4. If this is a whole number, then Q1 is halfway between this data point and the one above. If n/4 is not a whole number, round up to the next whole number and take this datapoint as Q1. For Q3, do the same thing but for 3n/4.

Finding the quartiles for grouped continuous data: similarly to finding a mean for grouped data, the quartiles for grouped data will be estimates. Q1, Q2 and Q3 can be found by estimating the (n/4)th, (n/2)th and (3n/4)th values respectively. This can be done using interpolation. Note that there are different conventions for finding quartiles and so answers within a certain interval are usually accepted.

### Interquartile and Interpercentile Ranges

As well as the range which is calculated by subtracting the smallest from the largest data value, there are the interquartile and interpercentile ranges. The interquartile range (IQR) is given by

The IQR is not affected by extreme values but it does only take into account the spread of the middle 50% of data.

There are multiple interpercentile ranges, for example, , shows the spread of the middle 80% of data. Since this considers more data than the IQR and still isn’t affected by extreme values, it is often favoured over the IQR.

## Examples

Find the variance and standard deviation for each of the following:

1. The scores obtained in an exam sat by 7 students: 76, 84, 52, 62, 81, 55, 63.
2. The set of 11 datapoints whose summary statistic is given by

Solution

1. The mean of the scores is 67.571. The sum of the squares is 32935 which divided by 7 is 4705. Subtracting the mean squared from this gives the variance as (maintaining accuracy) and it follows that the standard deviation is given by to 3 decimal places. Be sure to maintain accuracy throughout your calculations.
2. The variance is given by to 2 decimal places. Hence, the standard deviation is to 2 decimal places.
3. The mean is given by 2.6. Using the first frequency formula where and gives and to 3 decimal places.

The following table shows the times 100 people waited in a queue for KFC at a specific store in the first hour of reopening during the CoronaVirus lockdown in 2020.

Find the variance and standard deviation for this grouped data.

Solution

Mid-point , mid-point squared , mid-point times frequency and mid-point squared times frequency columns can be added to the table:

Using the second formula for the variance of grouped data we have: and to 2 decimal places.

This dataset shows the ages of 15 female gorillas kept at a conservation park in the Congo:

8, 30, 5, 14, 61, 15, 52, 25, 22, 32, 43, 7, 41, 18, 55

1. Find the median and the interquartile range for this dataset.

2. The 10th to 90th interpercentile range for the male gorillas at the same park is 37. Without finding it, do you think that the 10th to 90th interpercentile range would be higher or lower than this for the female gorillas? Justify your answer.

Solution

1. First of all, write the ages of the female gorillas in ascending order:

5, 7, 8, 14, 15, 18, 22, 25, 30, 32, 41, 43, 52, 55, 61

The median can now be identified (in blue) as 25 as well as Q1 and Q3 (in red) as 14 and 43. Hence, the interquartile range is 43-14=29.

2. Consider the data value that is below Q1, i.e. 8 and the data value that is one above Q3, i.e. 52. Whatever interpercentile range is given by these two data points, i.e. 52-8=46, it is already bigger than 37. For this reason, the 10th to 90th interpercentile range for the females will be greater than that of the males.

See more statistical analysis for this example (Box Plots â€“ Example 1)

The following table shows the prices in millions of pounds of some houses in a given postcode:

1. Using interpolation, find an estimate for the median and the interquartile range.
2. Also using interpolation, find the 5th to 95th interpercentile range. Estimate how many houses fall within this range.

Solution

1. and â€“ see interpolation for details. Hence, the median is Â£375,700 and the interquartile range is Â£466,700-Â£308,100=Â£158,600.
2. and â€“ see interpolation for details. Hence,  the 5th to 95th interpercentile range is Â£641,300-Â£219,000=Â£422,300.