Skip to content

Averages and measures of spread

A data set needs more than one number to describe it. A measure of location says where the data are centred. A measure of spread says how variable they are.

Two classes can have the same mean mark but very different consistency. For example,

4,5,5,5,6and1,2,5,8,94,5,5,5,6 \qquad\text{and}\qquad 1,2,5,8,9

both have mean 55, but the second set is much more spread out. A useful comparison therefore pairs a measure of location with a measure of spread.

You should be able to:

  • order numerical data and use sigma notation \sum;
  • calculate with squares and square roots;
  • interpret frequency tables and class intervals;
  • use the statistics functions on your calculator.

Review presenting and interpreting data if frequency tables or grouped data are unfamiliar.

For nn observations x1,x2,,xnx_1,x_2,\ldots,x_n:

MeasureDefinitionParticularly useful when
Meanxˉ=xn\displaystyle \bar{x}=\frac{\sum x}{n}all values should influence the centre
Medianmiddle value after orderingthe distribution is skewed or contains extremes
Modemost frequent valuethe most common outcome matters

The mean uses every value, so it is sensitive to extreme observations. The median depends on position, not distance, so it is resistant to extremes. There can be no mode, one mode, or several modes.

The journey times, in minutes, for seven journeys are

18, 21, 19, 20, 22, 19, 35.18,\ 21,\ 19,\ 20,\ 22,\ 19,\ 35.

First order the data:

18, 19, 19, 20, 21, 22, 35.18,\ 19,\ 19,\ 20,\ 21,\ 22,\ 35.

The fourth value is the median, so

median=20.\operatorname{median}=20.

The value 1919 occurs most often, so the mode is 1919. The mean is

xˉ=18+21+19+20+22+19+357=1547=22.\bar{x}=\frac{18+21+19+20+22+19+35}{7} =\frac{154}{7}=22.

The unusually long journey raises the mean above the median. For a typical journey time, the median is more representative here.

For nn ordered observations, the median is at position

n+12.\frac{n+1}{2}.

If this position is an integer, use that observation. If it is halfway between two integers, average the two corresponding observations. For n=8n=8, for example, the median is halfway between the fourth and fifth values.

Common measures of spread are:

range=maximumminimum,interquartile range=Q3Q1,variance=(xxˉ)2n,standard deviation=(xxˉ)2n.\begin{aligned} \text{range}&=\text{maximum}-\text{minimum},\\ \text{interquartile range}&=Q_3-Q_1,\\ \text{variance}&=\frac{\sum (x-\bar{x})^2}{n},\\ \text{standard deviation}&=\sqrt{\frac{\sum (x-\bar{x})^2}{n}}. \end{aligned}

The range uses only the two extreme values. The interquartile range, or IQR, measures the spread of the middle 50%50\% of the ordered data. Both variance and standard deviation use every observation.

Variance has squared units. If xx is measured in centimetres, the variance is in cm2\text{cm}^2. Standard deviation has the same units as the data, so it is usually easier to interpret in context.

The deviations from the mean always sum to zero:

(xxˉ)=xnxˉ=xn(xn)=0.\sum(x-\bar{x})=\sum x-n\bar{x}=\sum x-n\left(\frac{\sum x}{n}\right)=0.

Simply averaging signed deviations would therefore give zero for every data set. Squaring makes all contributions non-negative and gives greater weight to observations far from the mean.

Expanding (xxˉ)2\sum(x-\bar{x})^2 gives

Var(x)=x2nxˉ,2.\boxed{\operatorname{Var}(x)=\frac{\sum x^2}{n}-\bar{x}^{,2}}.

Hence

σx=x2nxˉ,2.\boxed{\sigma_x=\sqrt{\frac{\sum x^2}{n}-\bar{x}^{,2}}}.

This is sometimes called the population standard deviation formula. In A level data questions, use division by nn unless the question or calculator convention specifies otherwise.

Worked example 2: variance and standard deviation

Section titled “Worked example 2: variance and standard deviation”

For the data 2,4,4,5,102,4,4,5,10,

n=5,x=25,x2=4+16+16+25+100=161.n=5,\qquad \sum x=25,\qquad \sum x^2=4+16+16+25+100=161.

Therefore

xˉ=255=5\bar{x}=\frac{25}{5}=5

and

Var(x)=161552=7.2.\begin{aligned} \operatorname{Var}(x) &=\frac{161}{5}-5^2\\ &=7.2. \end{aligned}

The standard deviation is

σx=7.2=2.6832.68.\sigma_x=\sqrt{7.2}=2.683\ldots\approx2.68.

Do not round the variance before taking its square root. Retaining full calculator accuracy prevents avoidable error.

Find the mean, variance and standard deviation of 3,3,7,73,3,7,7.

Answer

Here n=4n=4, x=20\sum x=20 and x2=116\sum x^2=116. Thus

xˉ=5,\bar{x}=5, Var(x)=116452=4,\operatorname{Var}(x)=\frac{116}{4}-5^2=4,

and σx=4=2\sigma_x=\sqrt4=2.

If value xx occurs with frequency ff, there are

n=fn=\sum f

observations. Repeated values can be handled without writing them all out:

xˉ=fxf,\bar{x}=\frac{\sum fx}{\sum f}, Var(x)=fx2fxˉ,2.\operatorname{Var}(x)=\frac{\sum fx^2}{\sum f}-\bar{x}^{,2}.

The number of goals scored by a team in 1212 matches is summarised below.

Goals, xx0011223344
Frequency, ff2244332211

Create the required totals:

xxfffxfxfx2fx^2
00220000
11444444
2233661212
3322661818
4411441616
Total121220205050

Then

xˉ=2012=53=1.666\bar{x}=\frac{20}{12}=\frac53=1.666\ldots

and

Var(x)=5012(53)2=2518.\begin{aligned} \operatorname{Var}(x) &=\frac{50}{12}-\left(\frac53\right)^2\\ &=\frac{25}{18}. \end{aligned}

Therefore

σx=2518=1.1781.18 goals.\sigma_x=\sqrt{\frac{25}{18}}=1.178\ldots\approx1.18\text{ goals}.

For the median, use cumulative frequency. The sixth observation is 11 and the seventh is 22, so

median=1+22=1.5.\operatorname{median}=\frac{1+2}{2}=1.5.

The median need not itself be an observed value.

When only class intervals and frequencies are known, the original values have been lost. Use each class midpoint mm as a representative value:

xˉfmf,\bar{x}\approx\frac{\sum fm}{\sum f}, Var(x)fm2fxˉ,2.\operatorname{Var}(x)\approx\frac{\sum fm^2}{\sum f}-\bar{x}^{,2}.

These answers are estimates, because the observations are unlikely all to equal their class midpoints.

Worked example 4: estimating from grouped data

Section titled “Worked example 4: estimating from grouped data”

The masses of 2020 parcels are grouped as follows.

Mass xx in kgFrequency ffMidpoint mmfmfmfm2fm^2
0x<20\leq x<233113333
2x<42\leq x<4883324247272
4x<64\leq x<666553030150150
6x<106\leq x<1033882424192192
Total20208181417417

Notice that the last midpoint is 88, not 77: the interval has width 44.

The estimated mean is

xˉ8120=4.05 kg.\bar{x}\approx\frac{81}{20}=4.05\text{ kg}.

The estimated variance is

Var(x)417204.052=4.4475,\operatorname{Var}(x)\approx\frac{417}{20}-4.05^2=4.4475,

so the estimated standard deviation is

σx4.4475=2.1082.11 kg.\sigma_x\approx\sqrt{4.4475}=2.108\ldots\approx2.11\text{ kg}.

Ten values lie in the classes below.

Class0x<100\leq x<1010x<2010\leq x<2020x<4020\leq x<40
Frequency225533

Estimate the mean.

Answer

The midpoints are 55, 1515 and 3030. Therefore

xˉ2(5)+5(15)+3(30)10=17510=17.5.\bar{x}\approx\frac{2(5)+5(15)+3(30)}{10} =\frac{175}{10}=17.5.

It is an estimate because the exact values within each class are unknown.

After ordering the data, Q1Q_1 marks approximately the 25%25\% position, the median Q2Q_2 marks the 50%50\% position, and Q3Q_3 marks the 75%75\% position. Then

IQR=Q3Q1.\operatorname{IQR}=Q_3-Q_1.

Different accepted conventions can give slightly different quartiles for a small raw data set. In exam questions, follow the convention indicated by the data presentation or calculator guidance. For cumulative frequency data, quartiles are read at cumulative frequencies n/4n/4, n/2n/2 and 3n/43n/4, usually by interpolation from a graph.

Two machines fill packets. Their masses, in grams, have these summaries.

MedianIQRMeanStandard deviation
Machine A501501885035037.17.1
Machine B497497151549849812.412.4

Machine A has the larger typical packet mass because both its median and mean are larger. It is also more consistent because both its IQR and standard deviation are smaller.

A complete contextual comparison names the statistic, gives the direction, and interprets it:

Machine A has the smaller standard deviation, 7.1<12.47.1<12.4, so its packet masses are less variable.

Do not say that Machine A is “better” without defining what better means. A larger centre could represent better performance in a test, but worse waiting times in a hospital.

Pair measures that respond similarly to extremes:

Shape or issueSuitable pairReason
roughly symmetric data without extremesmean and standard deviationboth use every observation
skewed data or possible outliersmedian and IQRboth resist extreme observations
categorical or most common outcomemodemean and median may be meaningless

For the ordered salaries

22, 24, 25, 27, 29, 31, 18022,\ 24,\ 25,\ 27,\ 29,\ 31,\ 180

in thousands of pounds, the mean is approximately 48.348.3, which is not representative of most employees. The median is 2727. The large salary is genuine data, but it makes the median and IQR more informative summaries of a typical salary and its spread.

Read outliers and cleaning data before deciding that an unusual observation should be removed.

Suppose every observation is transformed by

y=a+bx.y=a+bx.

Then

yˉ=a+bxˉ,\bar{y}=a+b\bar{x}, Var(y)=b2Var(x),\operatorname{Var}(y)=b^2\operatorname{Var}(x),

and

σy=bσx.\sigma_y=|b|\sigma_x.

Adding aa shifts every value equally, so it changes location but not spread. Multiplying by bb scales all distances by b|b|.

Temperatures xx measured in degrees Celsius have mean 1818 and standard deviation 44. Fahrenheit temperature is

F=32+95x.F=32+\frac95x.

Therefore

Fˉ=32+95(18)=64.4\bar{F}=32+\frac95(18)=64.4

and

σF=95(4)=7.2.\sigma_F=\frac95(4)=7.2.

The 3232 changes the mean but has no effect on the standard deviation.

Large values are coded using

y=x1005.y=\frac{x-100}{5}.

The coded data have mean yˉ=3.2\bar y=3.2 and standard deviation σy=1.7\sigma_y=1.7. Since x=100+5yx=100+5y,

xˉ=100+5(3.2)=116\bar x=100+5(3.2)=116

and

σx=5(1.7)=8.5.\sigma_x=5(1.7)=8.5.

The data xx have mean 1212 and variance 99. Let z=202xz=20-2x. Find the mean, variance and standard deviation of zz.

Answer zˉ=202(12)=4.\bar z=20-2(12)=-4.

The multiplier is 2-2, so

Var(z)=(2)2(9)=36\operatorname{Var}(z)=(-2)^2(9)=36

and

σz=29=6.\sigma_z=|-2|\sqrt9=6.

A standard deviation cannot be negative.

Summary statistics can be reversed to recover totals:

x=nxˉ\sum x=n\bar{x}

and

x2=n(Var(x)+xˉ,2).\sum x^2=n\left(\operatorname{Var}(x)+\bar{x}^{,2}\right).

Group A contains 1212 observations with mean 7.57.5. Group B contains 88 observations with mean 1111. The combined mean is not the simple average of 7.57.5 and 1111, because the groups have different sizes.

The group totals are

xA=12(7.5)=90,xB=8(11)=88.\sum x_A=12(7.5)=90, \qquad \sum x_B=8(11)=88.

Hence

\bar{x}_{\text{combined}}= rac{90+88}{12+8}=8.9.

This is a weighted mean: the larger group contributes more.

The mean of 2020 recorded values was calculated as 14.614.6. One value had been entered as 4242 instead of 2424.

The recorded total was

20(14.6)=292.20(14.6)=292.

Correcting the error gives

xcorrect=29242+24=274.\sum x_{\text{correct}}=292-42+24=274.

Therefore the corrected mean is

27420=13.7.\frac{274}{20}=13.7.

For a corrected variance, both x\sum x and x2\sum x^2 must be corrected. Replacing 4242 by 2424 changes the square total by 422+242-42^2+24^2.

  • A larger mean does not imply a larger spread.
  • Standard deviation is not the average value. It measures typical distance from the mean.
  • Var(x)\sqrt{\operatorname{Var}(x)} is the standard deviation. Do not forget the square root.
  • Adding a constant does not change standard deviation or IQR.
  • Grouped-data calculations are estimates and should be described as such.
  • A summary statistic should be interpreted in context, with units where appropriate.
  • An outlier is not automatically an error and should not automatically be deleted.

A data set has n=10n=10, x=80\sum x=80 and x2=730\sum x^2=730.

  1. Find the mean and standard deviation.
  2. One further value, 2020, is added. Find the new mean.
  3. Predict, without calculating the new standard deviation, whether the spread is likely to increase or decrease. Explain.
Answers
  1. The mean is

    xˉ=8010=8.\bar{x}=\frac{80}{10}=8.

    The variance is

    7301082=9,\frac{730}{10}-8^2=9,

    so the standard deviation is 33.

  2. The new total is 80+20=10080+20=100 and the new number of observations is 1111. Thus

    xˉnew=10011=9.09\bar{x}_{\text{new}}=\frac{100}{11}=9.09\ldots
  3. The spread is likely to increase. The added value 2020 lies far above both the old mean 88 and the new mean 100/11100/11, so it contributes a large squared deviation. A full calculation confirms the increase.

Use these summaries alongside presenting and interpreting data, then study histograms and outliers and cleaning data. Mean and standard deviation later become parameters of the normal distribution.