Menu
Sign up Sign in

AI HL · 13.3

Statistics

13.3.2

Spread and standard deviation

13.3.2

Spread and standard deviation

Target: I can compare the spread of two data sets with the same mean, and say why the mean absolute deviation (MAD) is not enough. (+5 more)

By the end of this section

Key points

Measuring spread

  • Two data sets can have the same mean and look very different. The mean says where the centre is. It does not say how spread out the data is.
  • Mean absolute deviation: \(\text{MAD}=\frac{\sum|x-\bar{x}|}{n}\). It is the average distance of the values from the mean.
  • MAD can give the same value for two very different data sets. Two classes can both have MAD 3.6 when one has all its marks close to the mean and the other has two marks far from it.

Variance and standard deviation

  • Variance: \(\sigma^2=\frac{\sum(x-\bar{x})^2}{n}\). It is the mean of the squared distances from the mean.
  • Standard deviation: \(\sigma=\sqrt{\text{variance}}\). It has the same units as the data.
  • Squaring makes a large distance count for much more than a small one. That is why σ shows the difference that MAD missed.
  • The deviations \(x-\bar{x}\) add up to 0. If they do not, your mean is wrong.
  • IB uses the population standard deviation σ, which divides by n. On the calculator, use σx, not sx.

Using σ

  • To say how far a value is from the mean in standard deviations, divide the distance by σ.
  • For roughly bell-shaped data, about 68% of the values lie within 1 standard deviation of the mean, about 95% within 2 and about 99.7% within 3.
  • Adding a number to every value moves the mean by that number and leaves σ unchanged. Multiplying every value by k multiplies both the mean and σ by k.

Outliers

  • One extreme value can change the mean and σ a lot. The median and the IQR hardly move.
  • Use the mean and σ when the data is clean and roughly bell-shaped. Use the median and IQR when there are outliers or the data is skewed.

On the calculator

Mean and standard deviation from a list

  • Enter the data in a list in a spreadsheet.
  • Open one-variable statistics and choose that list.
  • Read x̄ for the mean and σx for the standard deviation.
  • Use σx, not sx: IB uses the population standard deviation.

Screenshot and video to come

Population or sample standard deviation

  • The calculator shows two standard deviations: σx (divides by n) and sx (divides by n − 1).
  • Use σx in this course. If your hand working gives a slightly different value, check which one you copied.

Screenshot and video to come

Median and IQR from the same screen

  • One-variable statistics also lists Q1, the median and Q3.
  • Work out the IQR as Q3 − Q1.
  • Compare these with the mean and σx when you look for the effect of an outlier.

Screenshot and video to come

Explore: spread and outliers

Drag a dot along the number line, or select it and use the arrow keys. Watch the box plot, the mean and the standard deviation. Drag one value far out.

Number of values, n
Mean
Median
Lower quartile, Q₁
Upper quartile, Q₃
IQR
Standard deviation, σ

Drag a dot.

  1. Drag the largest value far to the right. Which read-outs change a lot? Which hardly change? Why?
  2. When does the box plot show a cross? Check with the fences: what must a value be to count as an outlier?
  3. Drag a value from one side of the median to the other. What happens to the median? What happens to the quartiles?
  4. Which two measures would you quote for data with an outlier? Which two for clean, bell-shaped data?

Worked examples

Problems like the ones in class. Pick one, try it, then open the working.
Two classes, same mean

Two classes sat the same test, marked out of 100. Both classes have mean 60. Class P: 53, 55, 57, 58, 59, 61, 62, 63, 65, 67 Class Q: 42, 60, 60, 60, 60, 60, 60, 60, 60, 78 Find the mean absolute deviation (MAD) of Class P. Then say whether MAD can tell the classes apart.

404550556065707580Class QClass P
Working
  1. Look first

    Both means are 60. Class P is spread along the scale. Class Q has eight marks on 60 and two far away.

    The means match, so look at how far the marks sit from 60.

  2. Distances, Class P

    \(|x-60|\): 7, 5, 3, 2, 1, 1, 2, 3, 5, 7. Sum = 36

    A distance is never negative, so the bars matter.

  3. MAD, Class P

    \(\text{MAD}=\frac{36}{10}=3.6\)

    Divide by the number of values.

  4. Class Q

    Distances: 18, 0, 0, 0, 0, 0, 0, 0, 0, 18. Sum = 36. \(\text{MAD}=3.6\)

    The same MAD as Class P. MAD cannot tell these classes apart, yet Class Q has two marks very far from the mean.

Video walkthrough coming
Square the distances

Use the marks from the last example (mean 60). Class P: 53, 55, 57, 58, 59, 61, 62, 63, 65, 67 Class Q: 42, 60, 60, 60, 60, 60, 60, 60, 60, 78 Find the variance and the standard deviation of each class. Which class is more spread out?

Working
  1. Squared distances, Class P

    \((x-60)^2\): 49, 25, 9, 4, 1, 1, 4, 9, 25, 49. Sum = 176

    Squaring makes a large distance count for much more.

  2. Variance and SD, Class P

    \(\sigma^2=\frac{176}{10}=17.6,\quad \sigma=\sqrt{17.6}=4.20\)

    The variance is the mean of the squared distances. The standard deviation is its square root.

  3. Class Q

    Squared distances: 324, 0, 0, 0, 0, 0, 0, 0, 0, 324. Sum = 648. \(\sigma^2=64.8,\ \sigma=8.05\)

    Check from the calculator: σx = 8.05.

  4. Compare

    Class P: σ = 4.20. Class Q: σ = 8.05.

    Class Q's standard deviation is about twice Class P's. SD sees what MAD missed: Class Q is more spread out.

Video walkthrough coming
A deviations table

Five students timed how long they took to solve a puzzle, in minutes: 8, 12, 5, 15, 10. Find the standard deviation by hand.

Working
  1. Mean

    \(\bar{x}=\frac{50}{5}=10\)

    Find the mean first.

  2. xx − mean(x − mean)²8−2412245−525155251000Total058
    The table

    Deviations x − mean add up to 0. Squares add up to 58.

    If the deviations do not add up to 0, check the mean.

  3. Variance

    \(\sigma^2=\frac{58}{5}=11.6\)

    Divide by n.

  4. Standard deviation

    \(\sigma=\sqrt{11.6}=3.41\) minutes

    The standard deviation has the same units as the data. Check from the calculator: σx = 3.41.

Video walkthrough coming
How far from the mean?

Five swimmers' times in a 50 m race, in seconds: 30, 34, 32, 35, 34. The club record is 28 s. How many standard deviations below the mean of the five times is the record?

Working
  1. Mean

    \(\bar{x}=\frac{165}{5}=33\)

    The mean of the five times.

  2. Standard deviation

    Deviations: −3, 1, −1, 2, 1. Squares add to 16. \(\sigma^2=3.2,\ \sigma=1.789\)

    Square, add, divide by 5, take the root.

  3. Distance in SDs

    \(\frac{33-28}{1.789}=2.80\)

    The record is 5 s from the mean. Dividing by σ counts how many standard deviations that is.

  4. State

    The record is about 2.80 standard deviations below the mean.

    Far more than 2 standard deviations from the mean: a very unusual time.

Video walkthrough coming
One extreme value

Eight delivery times, in minutes: 12, 13, 14, 15, 16, 17, 18, 19. A typing error changes the last one from 19 to 190. Find the standard deviation, the median and the interquartile range (IQR) before and after the error.

Working
  1. Before

    From the calculator: x̄ = 15.5, σx = 2.29, median = 15.5, Q1 = 13.5, Q3 = 17.5

    IQR = Q3 − Q1 = 4.

  2. After

    From the calculator: x̄ = 36.9, σx = 57.9, median = 15.5, Q1 = 13.5, Q3 = 17.5

    IQR = Q3 − Q1 = 4.

  3. Compare

    Mean 15.5 → 36.9. SD 2.29 → 57.9. Median 15.5 → 15.5. IQR 4 → 4.

    One extreme value drags the mean and SD up a long way. The median and IQR do not move.

  4. Which to use

    Use median and IQR when the data has outliers or is skewed.

    Use mean and standard deviation when the data is clean and roughly bell-shaped.

Video walkthrough coming
The 68-95-99.7 rule

The mass of a bag of rice is roughly bell-shaped with mean 250 g and standard deviation 4 g. A machine packs thousands of bags. (a) What percentage of bags have mass between 242 g and 258 g? (b) What percentage of bags have mass above 258 g?

236240244248252256260264Mass (g)
Working
  1. Write in SDs

    242 = 250 − 2 × 4 and 258 = 250 + 2 × 4

    Both limits are 2 standard deviations from the mean.

  2. Part (a)

    About 95% of the values lie within 2 SDs of the mean: 95%

    For bell-shaped data: about 68% within 1 SD, 95% within 2 SDs, 99.7% within 3 SDs.

  3. Both tails

    100% − 95% = 5% outside

    The curve is symmetrical, so the two tails are equal.

  4. Part (b)

    5% ÷ 2 = 2.5%

    About 2.5% of bags are heavier than 258 g.

Video walkthrough coming