Lessons and exercises follow the school system and stay in its language.Les leçons et les exercices suivent le système scolaire et restent dans sa langue.Lektionen und Übungen folgen dem Schulsystem und bleiben in seiner Sprache.

Data sets and distributions

Print the chapter

Every lesson of the chapter, ready for paper. Exercise sets are lettered A, B, C… and answered at the end.

To save a PDF, choose “Save as PDF” in the print dialog.

1. Cases and variables: categorical and quantitative

Discover

A spreadsheet has one row per student and columns for age, favorite color and number of pets. Which column holds categorical data?

  1. Favorite color
  2. Number of pets

Key idea

Data are values of variables recorded on cases.

Cases (individuals) are what the data describe; variables are what is recorded. A categorical variable places cases in groups; a quantitative variable takes numerical values for which arithmetic makes sense (discrete counts or continuous measurements).

Worked example

A café records each order: drink size (S, M, L), price in dollars, and table number.

Cases: the orders
Each row is an order.
Price: quantitative
Price: averaging makes sense.
Size and table number: categorical
Table numbers are labels; size is a category.

Your turn, guided

Your turn: how many quantitative variables among height, jersey number, goals scored?

22
Height and goals; jersey numbers are labels.

Practice ★

  1. A survey of 23 students records the following. Tick all the categorical variables.
    1. Eye color
    2. ZIP code
    3. Takes the bus to school (yes/no)
    4. Height in cm
    5. Number of siblings
  2. A survey of 80 students records the following. Tick all the categorical variables.
    1. Eye color
    2. ZIP code
    3. Takes the bus to school (yes/no)
    4. Height in cm
    5. Number of siblings

Watch out!

Practice ★★

  1. Area codes such as 770 are numbers. Is the area code of a phone number a quantitative variable?
    1. No: it is categorical, a label that only looks like a number
    2. Yes: its values are numbers
    3. Yes, a discrete quantitative variable
  1. A study measures the resting heart rate of 29 runners. What are the cases (observational units)?
    1. The 29 runners
    2. The heart rates
    3. The number 29

Exit ticket

Three questions to check you have got it.

  1. A survey of 23 students records the following. Tick all the categorical variables.
    1. Eye color
    2. ZIP code
    3. Takes the bus to school (yes/no)
    4. Height in cm
    5. Number of siblings
  2. A survey of 80 students records the following. Tick all the categorical variables.
    1. Eye color
    2. ZIP code
    3. Takes the bus to school (yes/no)
    4. Height in cm
    5. Number of siblings
  3. A survey of 54 students records the following. Tick all the categorical variables.
    1. Eye color
    2. ZIP code
    3. Takes the bus to school (yes/no)
    4. Height in cm
    5. Number of siblings

Summary card

Variables

  • Cases: who or what. Variables: what is recorded.
  • Categorical: groups. Quantitative: meaningful numbers.

Watch out: numeric codes (ZIP, ID) are categorical.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. A data table has one row for each of 27 students (the cases) and one column for each of 3 variables. How many data values does it hold?

2. Displaying and describing distributions

Warm-up

Three quick questions from earlier lessons.

  1. A survey of 23 students records the following. Tick all the categorical variables.
    1. Eye color
    2. ZIP code
    3. Takes the bus to school (yes/no)
    4. Height in cm
    5. Number of siblings
  2. Area codes such as 770 are numbers. Is the area code of a phone number a quantitative variable?
    1. No: it is categorical, a label that only looks like a number
    2. Yes: its values are numbers
    3. Yes, a discrete quantitative variable
  3. A study measures the resting heart rate of 29 runners. What are the cases (observational units)?
    1. The 29 runners
    2. The heart rates
    3. The number 29

Discover

House prices in a town: most around 300 thousand dollars, a few mansions above 2 million dollars. Which is pulled up by the mansions?

  1. The mean
  2. The median

Key idea

Describe a distribution by its shape, center, spread and unusual values.

Shape: symmetric, skewed right (long tail of high values) or skewed left; number of peaks. Center: mean or median. Spread: SD, IQR or range. Outliers: values far from the rest. In a right-skewed distribution the mean is usually above the median.

Worked example

Commute times: median 22 min, mean 29 min, a few 90-min commutes.

Mean > median
The mean is pulled towards the long tail.
Skewed right
The tail is on the high side.
The median describes a typical commute better
Resistant to the tail.

Your turn, guided

Your turn: test scores have mean 61 and median 70. How far below the median is the mean?

99 points: skewed left
70 − 61: the mean is pulled down by a tail of low scores, so the distribution is skewed left.

Practice ★

  1. A distribution of incomes has mean 54 thousand dollars and median 43 thousand dollars. What is its most likely shape?
    1. Skewed right: a long tail of high values pulls the mean up
    2. Skewed left
    3. Symmetric
  2. A distribution of incomes has mean 59 thousand dollars and median 54 thousand dollars. What is its most likely shape?
    1. Skewed right: a long tail of high values pulls the mean up
    2. Skewed left
    3. Symmetric
  1. 43 students name their favorite sport. Which display suits these data?
    1. A bar chart
    2. A histogram
    3. A boxplot

Watch out!

Practice ★★

  1. Which four features should you describe for the distribution of a quantitative variable (here, 42 test scores)?
    1. Shape, center, spread and unusual values (outliers)
    2. The mean, the median, the mode and the sample size
    3. The type of graph, the title, the axes and the colors

Exit ticket

Three questions to check you have got it.

  1. A distribution of incomes has mean 54 thousand dollars and median 43 thousand dollars. What is its most likely shape?
    1. Skewed right: a long tail of high values pulls the mean up
    2. Skewed left
    3. Symmetric
  2. A distribution of incomes has mean 59 thousand dollars and median 54 thousand dollars. What is its most likely shape?
    1. Skewed right: a long tail of high values pulls the mean up
    2. Skewed left
    3. Symmetric
  3. A distribution of incomes has mean 58 thousand dollars and median 46 thousand dollars. What is its most likely shape?
    1. Skewed right: a long tail of high values pulls the mean up
    2. Skewed left
    3. Symmetric

Summary card

Describing a distribution

Shape, center, spread, outliers, in context.

Watch out: skewed right means mean > median (usually).

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. Find the mode of the data 2, 2, 3, 9, 9, 9, 10.

3. Reading and interpreting circle graphs

Warm-up

Three quick questions from earlier lessons.

  1. A hose fills a tank at a constant rate: 30 liters in 3 minutes. Let yy be the liters after xx minutes.
    1. Liters per minute:   ?\;?
    2. An equation: y=  ?y = \;?
    3. How many minutes to collect 160 liters?   ?\;?
    4. The tank holds 800 liters. What percent is full after 16 minutes?
  2. What is 25% of 40?
  3. What percent of 40 is 10?

Discover

In a circle graph, a sector takes up half of the circle. What percent of the data is it?

  1. 50%
  2. 180%

Key idea

A circle graph shows parts of one whole.

Each sector is a percent of the whole, and the whole circle is 100% (or 360°). To find a count, take that percent of the total. To find a sector's angle, take that percent of 360°.

Worked example

40 students; the music sector is 25%.

25% of 40 = 10 students
Count.
25% of 360° = 90°
Angle.

Your turn, guided

Your turn: 60 people, a sector of 10%. How many people?

66
10% of 60.

Practice ★

  1. A circle graph shows the favorite sports of 80 students. The soccer sector is labeled 20%. How many students chose soccer?
  2. A circle graph shows the favorite sports of 620 students. The soccer sector is labeled 80%. How many students chose soccer?
  1. A circle graph shows how 160 students get to school: bus 50%, walk 25%, car 25%. Which statement is true?
    1. Twice as many students take the bus as walk
    2. 50 students take the bus
    3. The sectors add up to 360 students

Watch out!

Practice ★★

  1. A category is 50% of a circle graph. What is the angle of its sector, in degrees?
  2. A category is 15% of a circle graph. What is the angle of its sector, in degrees?
  1. A circle graph shows the favorite sports of 80 students. The soccer sector is labeled 20%. How many students chose soccer?

Exit ticket

Three questions to check you have got it.

  1. A circle graph shows the favorite sports of 80 students. The soccer sector is labeled 20%. How many students chose soccer?
  2. A circle graph shows the favorite sports of 620 students. The soccer sector is labeled 80%. How many students chose soccer?
  3. A circle graph shows the favorite sports of 40 students. The soccer sector is labeled 10%. How many students chose soccer?

Summary card

Circle graphs

Count = percent × total; angle = percent × 360°.

Watch out: a percent is not a count.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. A circle graph has three sectors. Two of them have angles of 108° and 72°. What percent does the third sector show?

4. Measures of center: mean and median

Warm-up

Three quick questions from earlier lessons.

  1. A distribution of incomes has mean 54 thousand dollars and median 43 thousand dollars. What is its most likely shape?
    1. Skewed right: a long tail of high values pulls the mean up
    2. Skewed left
    3. Symmetric
  2. 43 students name their favorite sport. Which display suits these data?
    1. A bar chart
    2. A histogram
    3. A boxplot
  3. Which four features should you describe for the distribution of a quantitative variable (here, 42 test scores)?
    1. Shape, center, spread and unusual values (outliers)
    2. The mean, the median, the mode and the sample size
    3. The type of graph, the title, the axes and the colors

Discover

Five friends earn 10, 12, 13, 15 and 150 dollars an hour. Which number describes a typical friend better?

  1. The median, 13 dollars
  2. The mean, 40 dollars

Key idea

Two ways to measure the center.

Mean xˉ=∑xin\bar{x} = \dfrac{\sum x_i}{n}: the balance point; sensitive to extremes. Median: the middle value of the ordered data (with an even count, the average of the two middle values); resistant to extremes.

Worked example

Data: 4, 7, 7, 9, 13, 20.

Mean =10= 10
Sum 60, six values.
Median =8= 8
Middle values 7 and 9.
Mean > median: slight right skew
The 20 pulls the mean up.

Your turn, guided

Your turn: the median of 3, 8, 10, 15.

99
(8 + 10)/2.

Practice ★

  1. Find the mean of the data 5, 11, 24, 33, 41.
  2. Find the mean of the data 3, 11, 20, 38, 65.
  3. Find the mean of the data 9, 19, 24, 39, 68.

Watch out!

Practice ★★

  1. Find the median of the data 9, 14, 24, 37, 44, 79.
  2. Find the median of the data 2, 10, 28, 36, 43, 64.
  1. One value in a data set is changed from 20 to 712. What happens to the mean and the median?
    1. The mean increases; the median stays about the same
    2. Both increase by the same amount
    3. The median increases; the mean stays the same

Exit ticket

Three questions to check you have got it.

  1. Find the median of the data 9, 14, 24, 37, 44, 79.
  2. Find the median of the data 2, 10, 28, 36, 43, 64.
  3. Find the median of the data 8, 18, 26, 32, 43, 97.

Summary card

Center

  • Mean: sum ÷ n; pulled by extremes.
  • Median: middle value; resistant.

Watch out: even count: average the two middle values.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. The mean of 4 numbers is 12. When a fifth number is added, the mean becomes 13. What is the fifth number?

5. Mean and mean absolute deviation (MAD)

Warm-up

Three quick questions from earlier lessons.

  1. Find the mean of the data 5, 11, 24, 33, 41.
  2. Find the median of the data 9, 14, 24, 37, 44, 79.
  3. One value in a data set is changed from 20 to 712. What happens to the mean and the median?
    1. The mean increases; the median stays about the same
    2. Both increase by the same amount
    3. The median increases; the mean stays the same

Discover

Two players both average 10 points a game. One scores 9, 10, 11; the other 0, 10, 20. Who is more consistent?

  1. The first player
  2. Both: the means are equal

Key idea

The MAD measures spread around the mean.

The mean is the sum ÷ the count (the balance point). The mean absolute deviation (MAD) is the average distance of the values from the mean: find each distance (always positive), then average them. A larger MAD means more variability.

Worked example

Data 2, 4, 6, 8.

Mean 5
Sum 20 ÷ 4.
3, 1, 1, 3
Distances.
MAD = 2
Average.

Your turn, guided

Your turn: the mean of 3, 7, 8.

66
18 ÷ 3.

Practice ★

  1. The mean of 4 numbers is 5. What is their sum?
  2. The mean of 19 numbers is 51. What is their sum?
  1. Two classes both have a mean test score of 61. Class A has a MAD of 3 points and class B a MAD of 7 points. Which statement is true?
    1. Class B's scores are more spread out
    2. Class A's scores are more spread out
    3. The scores are equally spread, because the means are equal

Watch out!

Practice ★★

  1. Find the mean absolute deviation (MAD) of the data 8, 13, 15, 20.
  2. Find the mean absolute deviation (MAD) of the data 10, 13, 15, 18.

Exit ticket

Three questions to check you have got it.

  1. Find the mean absolute deviation (MAD) of the data 8, 13, 15, 20.
  2. Find the mean absolute deviation (MAD) of the data 10, 13, 15, 18.
  3. Find the mean absolute deviation (MAD) of the data 1, 8, 12, 19.

Summary card

Mean absolute deviation

Average distance from the mean.

Watch out: distances, not signed differences.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. Find the mean absolute deviation of the data 25, 27, 29.

6. Outliers and boxplots

Warm-up

Three quick questions from earlier lessons.

  1. Find the interquartile range (IQR) of the 8 values 3, 9, 14, 17, 24, 27, 33, 46.
  2. Find the (sample) standard deviation of 29, 31, 33.
  3. Two classes both have mean score 78. In class A the scores range from 76 to 80; in class B from 63 to 93. Which has the larger standard deviation?
    1. Class B: its scores are more spread out
    2. Class A
    3. The same, because the means are equal

Discover

Q1=20Q_1 = 20, Q3=30Q_3 = 30, so IQR =10= 10. Is a value of 48 unusually large?

  1. Yes, it is above 30+1.5×10=4530 + 1.5 \times 10 = 45
  2. No: only values above twice Q3Q_3, 60, are outliers

Key idea

A rule of thumb for outliers, and a picture of the five-number summary.

1.5 × IQR rule: a value is an outlier if it is below Q1−1.5 IQRQ_1 - 1.5\,\text{IQR} or above Q3+1.5 IQRQ_3 + 1.5\,\text{IQR}. A boxplot draws the box from Q1Q_1 to Q3Q_3, a line at the median, whiskers to the most extreme non-outliers, and outliers as separate points.

Worked example

Q1=14Q_1 = 14, Q3=26Q_3 = 26. The fences.

IQR =12= 12
26 − 14.
Fences 14−18=−414 - 18 = -4 and 26+18=4426 + 18 = 44
1.5 × 12 = 18.
Outliers: below −4-4 or above 4444
Any value beyond them.

Your turn, guided

Your turn: Q1=40Q_1 = 40, Q3=50Q_3 = 50. The lower fence.

2525
40 − 15.

Practice ★

  1. A data set has Q1=22Q_1 = 22 and Q3=28Q_3 = 28. Above which value is a data point an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?
  2. A data set has Q1=315Q_1 = 315 and Q3=513Q_3 = 513. Above which value is a data point an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?
  3. A data set has Q1=36Q_1 = 36 and Q3=40Q_3 = 40. Above which value is a data point an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?

Watch out!

Practice ★★

  1. Q1=58Q_1 = 58 and Q3=62Q_3 = 62. Below which value is a data point an outlier?
  2. Q1=194Q_1 = 194 and Q3=228Q_3 = 228. Below which value is a data point an outlier?
  1. A boxplot of 81 values shows which summary?
    1. The five-number summary (min, Q1, median, Q3, max), with outliers plotted separately
    2. The mean and the standard deviation
    3. How many values fall in each interval

Exit ticket

Three questions to check you have got it.

  1. A data set has Q1=22Q_1 = 22 and Q3=28Q_3 = 28. Above which value is a data point an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?
  2. A data set has Q1=315Q_1 = 315 and Q3=513Q_3 = 513. Above which value is a data point an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?
  3. A data set has Q1=36Q_1 = 36 and Q3=40Q_3 = 40. Above which value is a data point an outlier by the 1.5×IQR1.5 \times \text{IQR} rule?

Summary card

Outliers and boxplots

  • Fences: Q1−1.5 IQRQ_1 - 1.5\,\text{IQR} and Q3+1.5 IQRQ_3 + 1.5\,\text{IQR}.
  • Boxplot: five-number summary plus outliers.

Watch out: 1.5 × IQR, not 1 × IQR.

One more step is optional: a challenge. Try it, or finish the lesson now.

Challenge ★★★

  1. A data set has Q1=17Q_1 = 17, Q3=33Q_3 = 33 and maximum 65. By how much does the maximum exceed the upper outlier fence?

7. The weighted mean

Discover

Class A (20 students) has a mean of 12 on a test, class B (10 students) a mean of 18. Is the mean of all 30 students 15?

  1. No: class A counts twice as much
  2. Yes: (12+18)÷2=15(12 + 18) \div 2 = 15

Key idea

The weighted mean.

With values x1,x2,…x_1, x_2, \dots and weights (counts) w1,w2,…w_1, w_2, \dots:

xˉ=w1x1+w2x2+…w1+w2+…\bar{x} = \dfrac{w_1x_1 + w_2x_2 + \dots}{w_1 + w_2 + \dots}.

Worked example

The two classes together:

20×12+10×18=42020 \times 12 + 10 \times 18 = 420
Total of all scores.
xˉ=420÷30=14\bar{x} = 420 \div 30 = 14
Divide by all 30 students.

Your turn, guided

Your turn: a test counts 3 times, homework once. Test 10, homework 18. Weighted mean?

1212
(3×10+1×18)÷4(3 \times 10 + 1 \times 18) \div 4.

Practice ★

  1. Group 1 has 23 people with mean 9; group 2 has 10 people with mean 11. Find the mean of all 33 people.
  2. Group 1 has 10 people with mean 8; group 2 has 15 people with mean 14. Find the mean of all 25 people.
  3. Group 1 has 22 people with mean 9; group 2 has 17 people with mean 11. Find the mean of all 39 people.

Practice ★★

  1. A test counts 2 times and homework counts once. The test score is 14 and the homework score is 16. Find the weighted mean.
  2. A test counts 4 times and homework counts once. The test score is 13 and the homework score is 14. Find the weighted mean.

Exit ticket

Two questions to check.

  1. Group 1 has 23 people with mean 9; group 2 has 10 people with mean 11. Find the mean of all 33 people.
  2. Group 1 has 10 people with mean 8; group 2 has 15 people with mean 14. Find the mean of all 25 people.

Summary card

Weighted mean

  • Multiply each value by its weight, add, divide by the total weight.
  • Combining groups: weight each mean by the group size.

Grade averages, price indexes and GPS position fixes all use weighted means.

8. History of statistics: Quetelet and Nightingale

Discover

In January 1855, in the British army's field hospitals of the Crimean War, 2,761 soldiers died of contagious diseases, 83 of wounds and 324 of other causes. Florence Nightingale turned such numbers into pictures. What did they show?

  1. Most soldiers died of diseases that could be prevented
  2. Most soldiers died of their wounds

Key idea

Statistics to understand people.

18301840185018601835Quetelet1835Quetelet
  1. Step 118301840185018601835Quetelet1835QueteletAdolphe Quetelet 1796–1874Joseph-Arnold Demannez. Public domain1835: Quetelet's book describes the 'average man': a new era in statistics begins.
  2. Step 218301840185018601835Quetelet1854Nightingale1835Quetelet1854NightingaleFlorence Nightingale 1820–1910Henry Hering (1814-1893), about 1860. Public domainCrimean War, 1854–56: Nightingale's diagrams show that disease, not wounds, kills most soldiers.
  3. Step 318301840185018601835Quetelet1854Nightingale1858Nightingale, Royal Statistical Society1835Quetelet1854Nightingale1858Nightingale, Royal StatisticalSocietyFlorence Nightingale 1820–1910Henry Hering (1814-1893), about 1860. Public domain1858: Nightingale becomes the first woman elected a Fellow of the Royal Statistical Society.

In 1835 Adolphe Quetelet described the average man, the central value around which measurements of people are spread. Florence Nightingale drew her polar area diagrams (1854–56). In 1858 she became the first woman elected a Fellow of the Royal Statistical Society.

Worked example

What share of the deaths in January 1855 came from contagious diseases?

2761+83+324=31682761 + 83 + 324 = 3168
Total deaths.
27613168≈87 %\dfrac{2761}{3168} \approx 87\,\%
Share from disease.

Practice ★

  1. What did Florence Nightingale become in 1858, for her work on army and hospital statistics?
    1. The first woman elected a Fellow of the Royal Statistical Society
    2. The inventor of the bar chart
    3. A professor of mathematics
  1. January 1855: 2,761 deaths from contagious diseases, 83 from wounds and 324 from other causes. How many deaths were there in all?
  1. Thanks to clean water and better care, the death rate in the hospital fell from 60 % to 2.2 % by the spring of 1855. By how many percentage points did it fall?

Summary card

Statistics today

  • Hospitals track infection rates to keep patients safe, as Nightingale did.
  • Governments plan schools and transport from census data.
  • Sports teams and apps summarise data with means, medians and charts.

Sources: MacTutor biographies of Adolphe Quetelet and Florence Nightingale (see "Sources and credits").