Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 4.3 · SL and HL

Measures of centre and spread

If you could keep only two numbers about a data set, one for where it sits and one for how spread out it is, which should they be, and how do you find them?

What you will learn

  • Know how to find the mean, median and mode, including from frequency tables and grouped data
  • Understand what the range, IQR, standard deviation and variance measure and which pairs with which average
  • Know how adding a constant or multiplying by a constant changes each measure
  • Understand why quartiles found by hand and by technology can differ

You must be able to

  1. Calculate the mean from a frequency table, including finding an unknown frequency from a given mean
  2. Estimate the mean and standard deviation of grouped data using mid-interval values
  3. Find the new mean, standard deviation and variance after every value is changed by a constant
  4. Find the standard deviation and variance with a GDC, choosing σx not sx
  5. Find the quartiles and IQR of a data set and test for outliers
  6. Compare two data sets using a suitable average and spread, in context

In the exam. both papers, in nearly every statistics question. Paper 1 (no calculator): a mean, median or mode from a short list or a frequency table, an unknown value or frequency from a given mean, and the effect of adding to or multiplying every value (3 to 6 marks). Paper 2: mean and standard deviation from raw, frequency or grouped data on the GDC, variance, and comparisons (2 to 6 marks). The commonest command terms are find and write down, then state, estimate and calculate. Standard deviation returns in the normal distribution (4.9).

1Mean, median and mode of a list

Example: five test scores 4,7,8,9,124, 7, 8, 9, 12.

  • The mean is xˉ=4+7+8+9+125=405=\bar{x} = \tfrac{4 + 7 + 8 + 9 + 12}{5} = \tfrac{40}{5} = 88.
  • The median is the middle value once the data are in order: 88.
  • There is no mode, since no value repeats. A data set can have two or more modes: 2,2,5,7,72, 2, 5, 7, 7 has modes 22 and 77.
  • The mean is also the balance point. Put a weight at each value on a ruler, and the ruler balances on the mean.
  • The deviations from the mean, x−xˉx - \bar{x}, add up to zero. Values below pull left exactly as hard as values above pull right. Figure 1 shows it.
Figure 1 · The mean is the balance point 2 3 4 5 6 7 8 9 10 11 12 13 14 Value −4 −1 +1 +4 mean = 8 Deviations from the mean 8 are −4, −1, 0, +1, +4. They always add to zero.
Figure 1 · The mean is the balance point

For the median of nn ordered values, count to position n+12\tfrac{n+1}{2}.

  • With nn odd that is a single value.
  • With nn even it lands halfway between two values. The median is their mean.

Sort first.

Example (invented): a bakery sells these numbers of loaves over eight days: 34,41,38,41,45,36,41,3934, 41, 38, 41, 45, 36, 41, 39.

sorted: 34,36,38,39,41,41,41,45\text{sorted: } 34, 36, 38, 39, 41, 41, 41, 45mean=3158=39.4 (3 s.f.)\text{mean} = \frac{315}{8} = 39.4\ \text{(3 s.f.)}median: position 8+12=4.5, so 39+412=40\text{median: position } \frac{8+1}{2} = 4.5\text{, so } \frac{39 + 41}{2} = 40mode=41appears three times\text{mode} = 41 \qquad \textcolor{#838c91}{\text{appears three times}}

Two shortcuts earn their keep on Paper 1.

Mean times count gives the total

  • Totals can be added and subtracted where means cannot.
  • Example: 5 numbers have mean 9.29.2, so their total is 4646. Add a sixth number and the new mean is 1010. The new total is 6060, so the sixth number is 1414.
  • The mean of two groups of different sizes comes from their totals.
  • Example: 12 students with mean 5454 and 28 students with mean 7070 give 12×54+28×7040=260840=65.2\tfrac{12 \times 54 + 28 \times 70}{40} = \tfrac{2608}{40} = 65.2. It is not the halfway value 6262.

2Which average? Outliers and skew

The mean uses every value, for better and worse.

Example (invented): nine employees earn these monthly amounts in euros: 2100,2200,2300,2300,2400,2600,2800,3100,95002100, 2200, 2300, 2300, 2400, 2600, 2800, 3100, 9500. Figure 2 plots them.

Figure 2 · One large salary pulls the mean, not the median 2000 2200 2400 2600 2800 3000 3200 3400 Monthly pay (€) 9500 mode median mean Monthly pay at a small firm (€, invented); the axis is broken before 9500. Mode 2300, median 2400, mean about 3256.
Figure 2 · One large salary pulls the mean, not the median

The mean is 29 3009≈\tfrac{29\,300}{9} \approx €3256, higher than eight of the nine salaries. The median is €2400 and the mode €2300.

Remove the 95009500 and the mean drops to €2475. The median barely moves, to €2350. So:

AverageUse it whenWeakness
Meandata are roughly symmetric, no outliers; you want every value to countdragged by outliers and skew
Mediandata are skewed or have outliers; you want a typical valueignores how far the other values are
Modeyou want the most common value, or the data are categories or sizes (the shoe size a shop should stock)may not exist, may not be unique

In skewed data the mean is dragged towards the tail. Positive skew (a long tail to the right) puts the mean above the median.

A removed value can also be a recording error.

Example: 15 values have mean 2222. One of them, 4040, turns out to be an error. The other 14 have mean 15×22−4014=29014=20.7\tfrac{15 \times 22 - 40}{14} = \tfrac{290}{14} = 20.7 (3 s.f.).

3Frequency tables

When values repeat, a frequency table saves writing them out. Each value xx appears ff times, so it contributes f×xf \times x to the total.

xˉ=∑fxn\bar{x} = \dfrac{\sum fx}{n}, where n=∑fn = \sum f · from the formula booklet.

Example (invented): eggs found in 35 nests along a river bank.

xx (eggs)12345Total
ff49128235
fxfx418363210100
xˉ=∑fx∑f=10035=2.86 (3 s.f.)\bar{x} = \frac{\sum fx}{\sum f} = \frac{100}{35} = 2.86\ \text{(3 s.f.)}median: position 35+12=18; running totals 4,13,25\text{median: position } \frac{35+1}{2} = 18\text{; running totals } 4, 13, 25the 18th value falls in the group x=3, so median=3\text{the 18th value falls in the group } x = 3\text{, so median} = 3mode=3the value with the highest frequency, 12\text{mode} = 3 \qquad \textcolor{#838c91}{\text{the value with the highest frequency, }12}

The formula runs backwards too, a Paper 1 favourite.

Example (invented): missed appointments per day at a dental clinic. 0 on 7 days, 1 on kk days, 2 on 9, 3 on 5 and 4 on 2. The mean is 1.61.6. Find kk.

∑fx=0(7)+1(k)+2(9)+3(5)+4(2)=k+41\sum fx = 0(7) + 1(k) + 2(9) + 3(5) + 4(2) = k + 41∑f=7+k+9+5+2=k+23\sum f = 7 + k + 9 + 5 + 2 = k + 23k+41k+23=1.6\frac{k + 41}{k + 23} = 1.6k+41=1.6k+36.8k + 41 = 1.6k + 36.84.2=0.6k, so k=74.2 = 0.6k\text{, so } k = 7

A table can hide two unknown frequencies. You then need two equations: one from the total frequency, one from the mean.

Example: x=1,2,3,4,5x = 1, 2, 3, 4, 5 with frequencies 4,p,7,q,24, p, 7, q, 2, a total of 2020 and a mean of 2.852.85:

∑f=13+p+q=20, so p+q=7\sum f = 13 + p + q = 20\text{, so } p + q = 7∑fx=4+2p+21+4q+10=35+2p+4q\sum fx = 4 + 2p + 21 + 4q + 10 = 35 + 2p + 4q35+2p+4q20=2.85, so 2p+4q=22, that is p+2q=11\frac{35 + 2p + 4q}{20} = 2.85\text{, so } 2p + 4q = 22\text{, that is } p + 2q = 11q=4 and p=3subtract the first equation from the lastq = 4\text{ and } p = 3 \qquad \textcolor{#838c91}{\text{subtract the first equation from the last}}

4Grouped data: an estimate of the mean, and the modal class

Grouped data have lost the individual values, so the mean can only be estimated.

  • The guide's method: treat every value in a class as if it sat at the mid-interval value. That is the midpoint, lower boundary+upper boundary2\dfrac{\text{lower boundary} + \text{upper boundary}}{2}.
  • Then use ∑fxn\tfrac{\sum fx}{n} with those midpoints as xx.

Figure 3 shows the idea for the park-run times from 4.2.

Figure 3 · Grouped data: every value treated as the class midpoint 15 20 25 30 35 40 45 50 Time t (minutes) 0 4 8 12 16 20 24 Frequency 17.5 22.5 27.5 32.5 37.5 42.5 47.5 estimated mean ≈ 31.4 Estimated mean = Σfx ÷ n = 2515 ÷ 80 ≈ 31.4 minutes, using x = 17.5, 22.5, …, 47.5.
Figure 3 · Grouped data: every value treated as the class midpoint
Time tt (min)15≤t<2015 \le t < 2020≤t<2520 \le t < 2525≤t<3025 \le t < 3030≤t<3530 \le t < 3535≤t<4035 \le t < 4040≤t<4540 \le t < 4545≤t<5045 \le t < 50
Mid-interval xx17.522.527.532.537.542.547.5
ff41122191374
∑fx=4(17.5)+11(22.5)+22(27.5)+19(32.5)+13(37.5)+7(42.5)+4(47.5)=70+247.5+605+617.5+487.5+297.5+190=2515\begin{aligned}\sum fx &= 4(17.5) + 11(22.5) + 22(27.5) + 19(32.5) + 13(37.5) + 7(42.5) + 4(47.5) \\[6pt] &= 70 + 247.5 + 605 + 617.5 + 487.5 + 297.5 + 190 = 2515\end{aligned}estimated mean=251580=31.4 minutes (3 s.f.)\text{estimated mean} = \frac{2515}{80} = 31.4\ \text{minutes (3 s.f.)}
  • It is an estimate because runners in a class are not all at the midpoint. Those above and below roughly cancel.
  • On Paper 2 you enter the midpoints as one list and the frequencies as a second list. The GDC does the sum.

When classes are written as whole numbers, the midpoint still comes from the two ends written.

Example (invented): a typing test records words per minute for 60 people.

Speed (words per minute)30–3940–4950–5960–6970–79
Mid-interval xx34.544.554.564.574.5
ff61524105
∑fx=207+667.5+1308+645+372.5=3200\sum fx = 207 + 667.5 + 1308 + 645 + 372.5 = 3200estimated mean=320060=53.3 words per minute (3 s.f.)\text{estimated mean} = \frac{3200}{60} = 53.3\ \text{words per minute (3 s.f.)}

The midpoint is 30+392=34.5\tfrac{30+39}{2} = 34.5, the same as the midpoint of the true boundaries 29.529.5 and 39.539.5.

The modal class is the class with the highest frequency: 25≤t<3025 \le t < 30 for the park run, 5050–5959 for the typing test. It is a class, not a number. The guide uses it only for equal class intervals.

5Range, quartiles and the interquartile range

  • Two data sets can share a mean and look nothing alike, so a second number is needed. The simplest is the range, largest −- smallest. It depends on the two extremes only, so one outlier can double it.
  • The interquartile range, IQR=Q3−Q1\mathrm{IQR} = Q_{3} - Q_{1}, is the spread of the middle half. It ignores the extremes, so it pairs with the median.

For a short list, most GDCs find quartiles like this:

  • Put the data in order and find the median.
  • Split the data into a lower half and an upper half, leaving the median out when nn is odd.
  • Take the median of each half.

With nn even there is no middle value to leave out. The halves are the lower and upper n2\tfrac{n}{2} values.

Example (invented): twelve delivery times in minutes show the even case.

data: 15,18,19,22,24,24,27,31,33,36,40,58\text{data: } 15, 18, 19, 22, 24, 24, 27, 31, 33, 36, 40, 58lower half 15,…,24: Q1=19+222=20.5median of the lower six\text{lower half } 15, \dots, 24\text{: } Q_{1} = \frac{19+22}{2} = 20.5 \qquad \textcolor{#838c91}{\text{median of the lower six}}upper half 27,…,58: Q3=33+362=34.5\text{upper half } 27, \dots, 58\text{: } Q_{3} = \frac{33+36}{2} = 34.5IQR=34.5−20.5=14, range=58−15=43\mathrm{IQR} = 34.5 - 20.5 = 14\text{, range} = 58 - 15 = 43

By the outlier rule of 4.1, a value above Q3+1.5×IQR=55.5Q_{3} + 1.5 \times \mathrm{IQR} = 55.5 is an outlier. So 5858 is one.

The guide asks you to know that different methods exist.

  • Another common one keeps the median in both halves when nn is odd.
  • Spreadsheet functions use yet another rule, which interpolates between values.

Figure 4 applies the first two methods to nine values.

Figure 4 · Two methods, two sets of quartiles Median left out (most GDCs) 3 5 6 8 9 11 14 20 22 Q₁ = 5.5 Q₃ = 17 median 9 Median in both halves 3 5 6 8 9 11 14 20 22 Q₁ = 6 Q₃ = 14 median 9 Same nine values. Leaving the median out of the halves gives 5.5 and 17; putting it in gives 6 and 14.
Figure 4 · Two methods, two sets of quartiles
data: 3,5,6,8,9,11,14,20,22n=9, median =9\text{data: } 3, 5, 6, 8, 9, 11, 14, 20, 22 \qquad \textcolor{#838c91}{n = 9\text{, median }= 9}median left out: Q1=5+62=5.5,Q3=14+202=17,IQR=11.5\text{median left out: } Q_{1} = \frac{5+6}{2} = 5.5, \quad Q_{3} = \frac{14+20}{2} = 17, \quad \mathrm{IQR} = 11.5median included: Q1=6,Q3=14,IQR=8\text{median included: } Q_{1} = 6, \quad Q_{3} = 14, \quad \mathrm{IQR} = 8

Neither is wrong. They are conventions, and the difference shrinks as the data set grows. Use one method consistently within a question. The GDC's answer is accepted.

6Standard deviation and variance

  • The standard deviation, σ\sigma, measures the typical distance of the values from the mean. It uses every value, so it pairs with the mean.
  • The variance is its square, σ2\sigma^{2}. It is in squared units, so you interpret the standard deviation.

In Figure 5, sets A and B both have mean 88, but B's values are far more spread out.

Figure 5 · Same mean, different standard deviation 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Value A: σ ≈ 1.29 B: σ ≈ 3.96 mean 8 Both sets have mean 8. B's values sit further from 8 on average, so its σ is about three times A's.
Figure 5 · Same mean, different standard deviation

The guide says to find σ\sigma and σ2\sigma^{2} with technology. One hand calculation shows what the number is.

Example: the test scores 4,7,8,9,124, 7, 8, 9, 12 of section 1, with mean 88:

deviations x−μ: −4,−1,0,1,4they add to 0, so square them\text{deviations } x - \mu\text{: } -4, -1, 0, 1, 4 \qquad \textcolor{#838c91}{\text{they add to }0\text{, so square them}}squared: 16,1,0,1,16, total 34\text{squared: } 16, 1, 0, 1, 16\text{, total } 34variance σ2=345=6.8mean of the squared deviations\text{variance } \sigma^{2} = \frac{34}{5} = 6.8 \qquad \textcolor{#838c91}{\text{mean of the squared deviations}}standard deviation σ=6.8=2.61 (3 s.f.)\text{standard deviation } \sigma = \sqrt{6.8} = 2.61\ \text{(3 s.f.)}
  • So σ=∑(x−μ)2n\sigma = \sqrt{\dfrac{\sum (x-\mu)^{2}}{n}}. Square each distance from the mean, average the squares, then take the square root to get back to the original units.
  • Squaring makes far values count for more. For the sets in Figure 5, σ≈1.29\sigma \approx 1.29 for A and σ≈3.96\sigma \approx 3.96 for B.
  • σ\sigma is never negative. It is 00 only when every value is the same.
  • A shortcut uses the GDC's sums. The variance is the mean of the squares minus the square of the mean, σ2=∑x2n−xˉ2\sigma^{2} = \tfrac{\sum x^{2}}{n} - \bar{x}^{2}. For 4,7,8,9,124, 7, 8, 9, 12, ∑x2=354\sum x^{2} = 354, so σ2=3545−82=6.8\sigma^{2} = \tfrac{354}{5} - 8^{2} = 6.8, as before.
  • With a frequency table, each squared deviation is counted ff times: σ2=∑f(x−xˉ)2∑f\sigma^{2} = \tfrac{\sum f(x - \bar{x})^{2}}{\sum f}.

On the GDC, enter the values in a list, with frequencies in a second list. Then run one-variable statistics.

  • TI-84: STAT, CALC, 1-Var Stats with the list and any frequency list.
  • Casio: the Statistics menu, CALC, 1-VAR, after setting the lists in SET.

The screen gives xˉ\bar{x}, ∑x\sum x, nn, the quartiles and the median, and two standard deviations:

  • σx\sigma_{x} divides by nn. Use this one, because the guide treats the data set as the population unless told otherwise (4.1).
  • sxs_{x} divides by n−1n - 1. It is used when a sample estimates a larger population's spread.

The guide's notation matches. μ\mu, σ\sigma and σ2\sigma^{2} are the population mean, standard deviation and variance. xˉ\bar{x} is the mean of a set of observations.

  • For 4,7,8,9,124, 7, 8, 9, 12 the GDC shows σx=2.61\sigma_{x} = 2.61 and sx=2.92s_{x} = 2.92. Writing 2.922.92 is wrong.
  • For the eggs table of section 3, σx=1.07\sigma_{x} = 1.07.
  • For the grouped typing speeds, with midpoints and frequencies entered, σx≈10.7\sigma_{x} \approx 10.7 words per minute. It is an estimate for the same reason the mean was.

Interpret σ\sigma in context: "typing speeds are typically about 10.7 words per minute either side of the mean". A larger σ\sigma means less consistency.

7Constant changes to every value

If every value changes in the same way, do not recalculate. Think about the picture, as in Figure 6.

Figure 6 · Adding shifts the data; multiplying stretches it 0 2 4 6 8 10 12 14 16 18 20 22 24 26 Value x mean 8, σ ≈ 2.61 x + 3 mean 11, σ ≈ 2.61 2x mean 16, σ ≈ 5.22 Add 3: mean +3, σ unchanged. Double: mean × 2 and σ × 2, so the variance is × 4.
Figure 6 · Adding shifts the data; multiplying stretches it

Adding or subtracting a constant bb

  • Slides every value the same distance. Every measure of centre moves by bb.
  • The gaps do not change, so every measure of spread stays the same.

Multiplying by a constant aa (a>0a > 0)

  • Stretches the data away from zero. Every value, centre and gap is multiplied by aa, so the spread is too.
  • The variance, a squared quantity, is multiplied by a2a^{2}.
Every value xx becomesMean, median, mode, quartilesRange, IQR, standard deviationVariance
x+bx + badd bbunchangedunchanged
axaxmultiply by aamultiply by aamultiply by a2a^{2}
ax+bax + bmultiply by aa, then add bbmultiply by aamultiply by a2a^{2}

The guide's own two cases:

  • Subtract 3 from every value: the mean falls by 3, and the standard deviation is unchanged.
  • Double every value: the mean and the standard deviation both double.

Example: parcels at a depot have mean mass 3.23.2 kg and standard deviation 0.90.9 kg. Each is repacked in a box that adds 0.150.15 kg. The masses are then converted to pounds by multiplying by 2.22.2.

new mean=(3.2+0.15)×2.2=7.37 lb\text{new mean} = (3.2 + 0.15) \times 2.2 = 7.37\ \text{lb}new standard deviation=0.9×2.2=1.98 lbthe box adds nothing to the spread\text{new standard deviation} = 0.9 \times 2.2 = 1.98\ \text{lb} \qquad \textcolor{#838c91}{\text{the box adds nothing to the spread}}new variance=1.982=3.9204 lb2or 2.22×0.81\text{new variance} = 1.98^{2} = 3.9204\ \text{lb}^{2} \qquad \textcolor{#838c91}{\text{or }2.2^{2} \times 0.81}

The rules also run backwards.

Example: a transformed set y=3x−4y = 3x - 4 has mean 2020 and standard deviation 1212. Undo it. The original mean is 20+43=8\tfrac{20 + 4}{3} = 8. The original standard deviation is 123=4\tfrac{12}{3} = 4. The original variance is 1616, which is 144÷32144 \div 3^{2}.

A multiplier can be negative, for example if every value is subtracted from 100 (y=100−xy = 100 - x). The mean becomes 100−xˉ100 - \bar{x}. The standard deviation is multiplied by ∣−1∣=1\lvert -1\rvert = 1, because a spread cannot be negative.

8Comparing two data sets

Example (invented): two groups of seven apprentices are timed assembling the same part, in seconds. Group A has mean 57.657.6 and σ=3.33\sigma = 3.33. Group B has mean 58.658.6 and σ=11.5\sigma = 11.5. Both have median 5858.

A comparison needs a measure of centre, a measure of spread and a sentence in context.

Example: "The groups take about the same time (medians both 58 s). A is far more consistent: its standard deviation is about a third of B's."

  • Symmetric data: compare means for centre and standard deviations for spread.
  • Skewed data or outliers: compare medians and IQRs.

Practice questions

58 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.