5.1 - Mean and standard deviation

5.1 - Mean and standard deviation

Two datasets can have the same centre but very different spreads, and one unusual observation can change some summaries far more than others. In this part of 5.1, you will choose and calculate measures of location and spread, find means and standard deviations from frequencies, and work with coded or combined totals. You will also see exactly what is estimated when observations have been grouped into intervals.

Location and spread

Can changing just one of nine observations make the mean increase by 44, while the median stays fixed? Comparing two short lists will show both why that happens and why a single “average” can be misleading.

A measure of location describes the centre or a representative value. The mean uses every value, the median uses order, and the mode uses frequency.

Mean, median and mode

The mean is the total of the observations divided by their number. The median is the middle ordered observation, or the mean of the two middle observations for an even count. A mode is a most frequent value: a dataset can have more than one mode, or no single most frequent value.

Spread describes how far observations extend or vary. The range is maximum minus minimum. The interquartile range, or IQR, is upper quartile minus lower quartile and describes the middle half. Find the raw-data quartiles as the medians of the lower and upper halves, leaving out the overall median when the total count is odd. The standard deviation measures spread about the mean, using every observation; its calculation comes in the next part.

Worked example 1: a balanced dataset

Question. Find the mean, median, mode, range and interquartile range of

4, 5, 5, 6, 6, 6, 7, 7, 8.4,\ 5,\ 5,\ 6,\ 6,\ 6,\ 7,\ 7,\ 8.

Plan. Add for the mean, use the ordered middle for the median, count repeats for the mode, and subtract extremes or quartiles for spread.

The sum is 5454, so the mean is 54/9=654/9=6. The fifth observation is 66, giving the median. The mode is 66, occurring three times.

For quartiles, exclude the middle 66. The lower half 4,5,5,64,5,5,6 has median (5+5)/2=5(5+5)/2=5. The upper half 6,7,7,86,7,7,8 has median (7+7)/2=7(7+7)/2=7.

Answer. Mean 66, median 66, mode 66, range 8−4=48-4=4, IQR 7−5=27-5=2.

Check. Values balance around 66: the distances below it are 2,1,12,1,1, matching the distances above it 1,1,21,1,2. This agrees with mean 66.

Change only the final value from 88 to 4444. Its position in the order is unchanged, but its contribution to the total is much larger.

Worked example 2: one extreme observation

Question. Find the same five summaries for

4, 5, 5, 6, 6, 6, 7, 7, 44,4,\ 5,\ 5,\ 6,\ 6,\ 6,\ 7,\ 7,\ 44,

and explain which centre and spread best describe the main cluster.

Plan. Update the sum and maximum, then check whether the median, mode and quartile positions change.

The sum increases by 44−8=3644-8=36, giving 9090. Thus the mean is 90/9=1090/9=10. The fifth observation and most frequent value are still 66. The lower-half median is still 55, and the upper half 6,7,7,446,7,7,44 still has median 77.

Answer. Mean 1010, median 66, mode 66, range 44−4=4044-4=40, IQR 7−5=27-5=2. The median and IQR describe the central cluster more faithfully here: the isolated 4444 pulls up the mean and greatly increases the range.

Check. A total increase of 3636 over nine observations must increase the mean by 36/9=436/9=4, exactly the change from 66 to 1010. The unchanged middle positions confirm the median and quartiles.

An outlier is an observation unusually far from the main body of data; no numerical outlier rule is needed to see the isolated 4444 here. Mean and standard deviation use every value, so both respond to extreme observations. Median and IQR are less sensitive to extremes and often suit skewed data. For a roughly symmetric distribution without isolated extremes, mean and standard deviation are often useful summaries. A long upper tail often pulls the mean above the median, but the ordering of two summaries alone does not prove a particular shape.

A mode is useful for the most common category or value, but it may conceal much of a numerical distribution. Whichever summaries you choose, compare location and spread separately and interpret them in context. For example, a smaller SD of journey times means less variation, not necessarily shorter journeys.

Watch out

Equal means do not imply equal spreads. The datasets 4,6,84,6,8 and 0,6,120,6,12 both have mean 66, but the second is more spread out. A statement about consistency needs a spread measure.

Choose summaries that resist an isolated extreme observation.

Raw and grouped data

The deviations from a mean add to zero, so simply averaging signed deviations cannot measure spread. Square them first, average the squares, then take a square root to return to the original units.

Variance and standard deviation of a dataset

For n>0n>0 observations with mean xˉ\bar x, the variance is the mean squared deviation ∑(x−xˉ)2/n\sum(x-\bar x)^2/n. The standard deviation is its non-negative square root. Variance has squared units; standard deviation has the same units as the data. The standard deviation is zero exactly when all observations are equal.

Here you are describing the given set of data, so the divisor is nn. On a calculator, choose the descriptive or population SD result, often labelled σx\sigma_x, rather than the sample-estimate result often labelled sxs_x. The n−1n-1 divisor used for an unbiased estimate of a wider population variance is a different task, studied later.

Mean and descriptive standard deviation

For raw data,

xˉ=∑xn,SD=∑(x−xˉ)2n=∑x2n−xˉ2.\bar x=\frac{\sum x}{n}, \qquad \mathrm{SD}=\sqrt{\frac{\sum(x-\bar x)^2}{n}} =\sqrt{\frac{\sum x^2}{n}-\bar x^2}.

If value xx occurs with frequency ff, put n=∑fn=\sum f:

xˉ=∑fx∑f,SD=∑fx2∑f−xˉ2.\bar x=\frac{\sum fx}{\sum f}, \qquad \mathrm{SD}=\sqrt{\frac{\sum fx^2}{\sum f}-\bar x^2}.

In the formula booklet, including the equivalent squared-deviation form for frequency data.

The shortcut follows by expanding the squares:

∑(x−xˉ)2=∑x2−2xˉ∑x+nxˉ2=∑x2−nxˉ2,\sum(x-\bar x)^2 =\sum x^2-2\bar x\sum x+n\bar x^2 =\sum x^2-n\bar x^2,

because ∑x=nxˉ\sum x=n\bar x. Divide by nn and take the square root. Notice that ∑x2\sum x^2 means “square each value, then add”; it does not mean (∑x)2(\sum x)^2.

Worked example 3: an exact frequency table

Question. A discrete variable has the following frequencies. Find its mean and standard deviation.

xxfffxfxfx2fx^2
2233661212
444416166464
66331818108108
Total10104040184184

Plan. Calculate the weighted totals, then use mean of squares minus square of mean.

xˉ=4010=4variance=18410−42=2.4SD=2.4=1.55to 3 significant figures\begin{aligned} \bar x&=\frac{40}{10}=4\\ \mathrm{variance}&=\frac{184}{10}-4^2=2.4\\ \mathrm{SD}&=\sqrt{2.4}=1.55\quad\text{to 3 significant figures} \end{aligned}

Answer. Mean 44; standard deviation 1.551.55.

Check. Direct squared deviations give [3(2−4)2+4(4−4)2+3(6−4)2]/10=24/10=2.4[3(2-4)^2+4(4-4)^2+3(6-4)^2]/10=24/10=2.4. The independent definition agrees with the shortcut.

Now change only the information about xx: instead of exact values 2,4,62,4,6, suppose the table gives intervals centred at those values. The calculations look identical, but their status changes from exact to estimated.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account