A footprint and a question
Police find a clear footprint in soft mud. It is 25.8 cm long. They want to know roughly how tall the person was. Assume, for this lecture, that the footprint is the same length as the foot.
There is no formula that turns a foot length into a height. People with the same foot length are not all the same height. But taller people do tend to have longer feet. So the best tool is data: measure many people, and look for a pattern.
A class of 12 students measured their foot length and their height. The data are invented for this lecture.
| Student | Foot length (cm) | Height (cm) |
|---|---|---|
| Ama | 21.0 | 154 |
| Bao | 21.5 | 147 |
| Chloe | 22.0 | 150 |
| Dev | 22.5 | 157 |
| Ewa | 23.0 | 153 |
| Elif | 23.5 | 161 |
| Femi | 24.5 | 161 |
| Grace | 25.0 | 162 |
| Hiro | 25.5 | 165 |
| Isla | 26.0 | 171 |
| Jamal | 26.5 | 173 |
| Kofi | 27.0 | 166 |
The footprint is 25.8 cm long. The two students with the nearest foot lengths are Hiro (25.5 cm) and Isla (26.0 cm). Which height should the police use?
Show the answer
Neither one is safe. Hiro is 165 cm and Isla is 171 cm, so the two nearest students differ by 6 cm. Kofi has the longest foot of all, but he is shorter than both Isla and Jamal. One student is one person, with their own body. A good estimate must use the pattern of all 12 students, not the nearest one.
Here is the difficulty. The pattern is in the table, but your eye cannot see it in two columns of numbers. You need a picture that shows each student's two measurements together. That picture is a scatter graph.
One student, one point
A scatter graph shows two measurements for each person or object. You may also hear it called a scatter diagram or a scatter plot. Each student becomes one point. The foot length gives the point's position across, and the height gives its position up. So Elif, with foot length 23.5 cm and height 161 cm, becomes the point (23.5, 161).
The pair of numbers is the important thing. If you sorted the foot lengths into order and then sorted the heights separately, you would lose which height belongs to which foot. Each point keeps one student's two numbers together.
Four choices go into plotting a scatter graph well.
- Which measurement goes across. Put the measurement you know, or want to predict from, on the horizontal axis. The police know the foot length and want the height, so foot length goes across and height goes up.
- The scales. Look at the smallest and largest value of each measurement. The foot lengths run from 21.0 to 27.0, so a scale from 20 to 28 fits. The heights run from 147 to 173, so a scale from 145 to 175 fits. Use equal steps on each axis.
- Where the scale starts. The height scale does not need to start at 0. In a bar chart, the length of each bar carries the information, so its scale must start at 0. In a scatter graph, only the position of each point matters. Starting at 0 would squash all 12 points into a thin strip at the top. Mark the break in the axis with a zigzag, so nobody misreads it.
- The mark. Use a small, neat cross for each point, with its centre exactly at the position. Never join the crosses. They are separate people, and there is nothing between them.
Now look at the whole picture. The crosses go up from bottom left to top right. Students with longer feet tend to be taller. The table hid this. The graph shows it in one glance.
Describing the pattern: direction and strength
When two measurements tend to change together, we say they are correlated. A correlation has a direction and a strength.
The direction says which way the points lean.
- Positive correlation: as one measurement increases, the other tends to increase. The points go up from left to right.
- Negative correlation: as one measurement increases, the other tends to decrease. The points go down from left to right.
- No correlation: there is no upward or downward trend. Knowing one measurement does not help you guess the other.
The strength says how closely the points lie to a straight line. In a strong correlation the points form a narrow band, close to a line. In a weak correlation the trend is there, but the points are widely scattered about it. In between, the word "moderate" is also used.
The foot lengths and heights show a fairly strong positive correlation. The crosses rise, and most of them lie in a band about 10 cm wide. A full description has three parts: the direction, the strength, and one sentence in context. For the students: "There is a strong positive correlation. Students with longer feet tend to be taller."
Notice the words "tend to". Kofi has the longest foot, but he is not the tallest. A correlation describes the general trend, not every single person.
Two scatter graphs show positive correlation. In graph A the points form a steep, narrow band. In graph B the points form a gentle, narrow band. Which correlation is stronger?
Show the answer
Neither. Both bands are narrow, so both correlations are strong. Steepness tells you how fast one measurement changes with the other, and it depends on the scales you choose. Draw graph B with its vertical scale stretched and it looks steep too. Strength is only about how closely the points follow a line.
Practise reading the direction from everyday situations. For each card, ask: as the first measurement goes up, what tends to happen to the second?
Put each pair of measurements in the box you expect its scatter graph to show. Each card explains its answer when you place it.
Eight pairs of measurements, with the correlation you would expect to see.
- The age of a tree and the width of its trunk: positive. Trees keep growing wider as they get older.
- The outside temperature in winter and a home's heating bill: negative. Colder days need more heating.
- A student's house number and their test score: no correlation. The number is chosen by the street, not by the student.
- The distance of a taxi journey and the fare: positive. The fare is worked out from the distance, so the correlation is strong.
- The height of a place on a mountain and its air temperature: negative. Air tends to be colder higher up.
- A person's shoe size and the month they were born in: no correlation. Birth month has no link to foot size.
- The speed of a bus on a fixed route and the time the journey takes: negative. A faster bus takes less time.
- The number of pages in a book and its price: positive. Longer books tend to cost more. Other things matter too, so the correlation is weak.
Direction and strength are separate questions. The taxi fares would give a strong correlation, and the book prices a weak one.
A line of best fit
Now return to the footprint. To make a prediction, you need a way to read the pattern at 25.8 cm. The tool is a line of best fit: one straight line drawn through the middle of the points, to show their trend.
A line of best fit is drawn only when the points show a correlation along a straight line. If there is no correlation, no line can show a trend that is not there. Two simple ideas tell you where the line should go.
Idea 1: the line passes through the mean point. The mean point is (mean foot length, mean height). The 12 foot lengths add up to 288, so their mean is cm. The 12 heights add up to 1920, so their mean is cm. The mean point is (24, 160). It is the centre of the data, so a line that shows the middle of the data should pass through it.
Idea 2: the points are mixed above and below the line, all along it. It is not enough for half the points to be above the line and half below. If all the points above are at one end and all the points below are at the other end, the line is tilted wrongly. Look at the left part of the line and the right part separately. Each part should have points on both sides.
Try it yourself with the 12 students below.
Move the two ends of the line. The first slider sets the height of the line at 21 cm, the second at 27 cm. Try to make the line pass through the mean point (the black dot), with points above and below it in both halves of the graph. Short upright lines show each point's gap from the line: teal for points above it, grey for points below. Then read the prediction for the 25.8 cm footprint.
The graph shows two lines through the 12 students' points.
| Line | Left half: above, below | Right half: above, below | Height at 25.8 cm |
|---|---|---|---|
| Flat, at 160 cm | 1, 5 | 6, 0 | 160 |
| First point to last point | 1, 3 | 3, 0 | 163.6 |
| Very steep, 144 to 176 | 5, 1 | 1, 5 | 169.6 |
| Line of best fit, 149 to 171 | 3, 3 | 2, 4 | 166.6 |
The left half is the six students with feet from 21.0 to 23.5 cm, and the right half is the six from 24.5 to 27.0 cm. Points exactly on a line are not counted.
The flat line went through the mean point, but every point on the right was above it. The line from the first point to the last was also tilted too little. Its prediction, about 164 cm, depends on just two students: Ama, who is tall for her foot length, and Kofi, who is short for his. A good line passes through (24, 160) and rises about 22 cm across the graph, from about 149 cm at 21 cm to about 171 cm at 27 cm. It predicts about 167 cm for the footprint.
That is it. That is the whole idea. One person can mislead you, but the line uses all 12 students at once. Kofi pulls it down a little, and Jamal pulls it up a little, and their effects balance.
You may have found several "good" lines. Lines a little steeper or a little less steep also pass both tests, and they predict between about 165 and 169 cm. A line drawn by eye is a careful judgement, not an exact answer. So the police should say "about 167 cm, give or take a few centimetres", never "exactly 166.6 cm".
1. Check that the points show a correlation along a straight line.
2. Calculate the mean point (mean of the first measurement, mean of the second), and mark it.
3. Place a ruler on the mean point. Turn it until the points are mixed above and below the line along its whole length.
4. Draw one straight line across the range of the data. Never join the points.
Using the line, and where it stops working
To predict, go up from the value you know to the line, then across to the other axis. The footprint gives 25.8 cm across, and the line gives about 167 cm up. You can also read the line the other way. A student who is 158 cm tall would, from the line, have a foot about 23.5 cm long.
A prediction inside the range of the data, like 25.8 cm, is called interpolation. It is fairly reliable when the correlation is strong, because there are real students on both sides of it. A prediction outside the range of the data is called extrapolation, and it is risky. The data say nothing about people whose feet are much shorter or much longer than these students' feet. The pattern may change there.
The line can also tempt you into a second mistake. Does a long foot make you tall? No. A foot does not push the body upwards. Both foot length and height grow together as a body grows. A correlation shows that two measurements tend to move together. It does not show that one causes the other.
Worked examples
Seven students recorded the hours they studied for a test and their score out of 100. The data are invented: (1, 40), (2, 52), (3, 55), (4, 63), (5, 71), (6, 75), (7, 82). Plot a scatter graph and describe the correlation.
The hours are what we might predict from, so hours go across. They run from 1 to 7, so a scale from 0 to 8 in steps of 1 fits. The scores run from 40 to 82, so a scale from 30 to 90 in steps of 10 fits, with a zigzag to show it does not start at 0.
Plot each pair as a cross. For (3, 55), go across to 3, then up to halfway between 50 and 60.
The crosses rise from left to right, and they lie very close to a straight line. So there is a strong positive correlation: students who studied for longer tended to score higher.
Check: no cross is far from the others, so there is no outlier to think about. ✓
For the same seven students, draw a line of best fit. Estimate the score of a student who studied for 5.5 hours. Then estimate how long a student who scored 60 studied. Finally, should you use the line for 12 hours of study?
The mean number of hours is . The mean score is . So the mean point is (4, 62.6).
Place the ruler on (4, 62.6) and turn it until the crosses are mixed above and below. The line passes close to (1, 42) and (7, 83).
Go up from 5.5 to the line, then across. The line gives about 73 marks. Check this against the data: the students who studied 5 and 6 hours scored 71 and 75, and 73 lies between them. ✓
For a score of 60, go across from 60 to the line, then down. The line gives about 3.6 hours. Check: the students with 3 and 4 hours scored 55 and 63, so 3.6 hours is sensible. ✓
For 12 hours, the line would give about 116 marks. That is impossible, because the test is out of 100. Twelve hours is far outside the data, which stop at 7 hours. This is extrapolation, and here it fails completely. Scores cannot keep rising forever: they must stop at 100.
A bicycle shop recorded the age and the selling price of eight used bicycles of one model. The data are invented. Ages in years: 1, 2, 2, 3, 4, 5, 6, 7. Prices in dollars: 310, 270, 255, 230, 190, 160, 120, 95. Describe the correlation without drawing a full graph.
Direction: whenever the age goes up, the price goes down. So the correlation is negative.
Strength: the price falls by a similar amount each year, about 25 to 40 dollars. Steady steps mean the points lie close to a straight line. So the correlation is strong.
Context: "There is a strong negative correlation. Older bicycles tend to sell for less."
Check by sketching: the crosses would fall from top left to bottom right in a narrow band. ✓
A description such as "the points slope downward" gives only the direction. To choose a strength word, you must see how closely the points follow a line.
Three traps
A scatter graph is not a line graph. Joining the crosses in order makes a zigzag that shows nothing. Joining only the first and last points lets two people decide the whole line. In the footprint data, that line is tilted too little and predicts about 164 cm instead of about 167 cm. Use the mean point and the mixing test instead.
A steep band of points is not a stronger correlation than a gentle one. Change the scale on the vertical axis and any line becomes steeper or gentler. Strength is only about how tightly the points follow a line.
A classic example: at the seaside, months with more ice cream sales also tend to have more drownings. Ice cream does not cause drowning. Hot weather brings more people to the beach, more people into the water, and more people buying ice cream. A third thing, the weather, drives both. So write "tends to" in a conclusion, never "causes".
Work each one on paper first. Open a hint only when you are stuck.
-
For each pair, say whether you would expect positive, negative or no correlation, and give a reason. (a) The number of hours a candle has burned, and its height. (b) A person's height, and the last digit of their phone number. (c) The number of workers building a wall of fixed size, and the number of days it takes.
Hint 1
For each one, imagine the first measurement going up. What tends to happen to the second?
Hint 2
A candle gets shorter as it burns. A phone number is given out by a company. More workers share the same job.
Full answer
(a) Negative. The longer the candle burns, the shorter it becomes.
(b) No correlation. The digit has nothing to do with the person's body, so knowing one tells you nothing about the other.
(c) Negative. With more workers, the same wall tends to take fewer days.
-
An outdoor pool recorded the midday temperature and the number of visitors on eight days. The data are invented. Temperature (°C): 18, 20, 22, 24, 26, 28, 30, 32. Visitors: 40, 55, 61, 80, 88, 102, 115, 118. Find the mean point. A student draws her line of best fit through (18, 42) and (32, 121). Does it pass close to the mean point? Use her line to estimate the visitors on a 27 °C day.
Hint 1
Add the eight temperatures and divide by 8. Do the same for the visitors.
Hint 2
Her line rises visitors over degrees. Work out how far it rises from 18 °C to 25 °C, and from 18 °C to 27 °C.
Full answer
Mean temperature °C. Mean visitors . The mean point is (25, 82.4).
From 18 °C to 25 °C is 7 degrees, half of 14. So her line rises and gives at 25 °C. That is within 1 visitor of 82.4, so the line passes close to the mean point.
From 18 °C to 27 °C is 9 degrees, so the line rises . It gives about visitors.
Check: the days at 26 °C and 28 °C had 88 and 102 visitors, and 93 lies between them. ✓
-
Use the same line to "predict" the visitors on a 5 °C day and on a 45 °C day. Explain why neither prediction should be trusted.
Hint 1
The line rises , about 5.6 visitors for every degree. Go backwards from 18 °C for the cold day, and forwards from 32 °C for the hot day.
Hint 2
The data only cover 18 °C to 32 °C. What might be different about a pool on a very cold day or a dangerously hot day?
Full answer
At 5 °C: 13 degrees below 18, so the line gives about visitors. A negative number of visitors is impossible.
At 45 °C: 13 degrees above 32, so the line gives about visitors. But on a dangerously hot day people may stay indoors, or the pool may already be full.
Both are extrapolations, far outside 18 °C to 32 °C. The data say nothing about those temperatures, and the straight-line pattern does not continue there. The first prediction is impossible, and the second is a guess with no evidence behind it.
-
Use the footprint line, which passes through (21, 149) and (27, 171). (a) Arun is 158 cm tall. Estimate his foot length. (b) A six-year-old's foot is 17 cm long. What height does the line give, and why should you not trust it? (c) A student says, "This proves that growing long feet makes you taller." What would you tell her?
Hint 1
The line rises 22 cm in height over 6 cm of foot length, which is cm of height for each centimetre of foot.
Hint 2
For (a), 158 is 9 cm above 149, so divide 9 by 3.67 and add the result to 21. For (b), 17 cm is 4 cm below 21 cm.
Full answer
(a) , so the foot length is about cm. Check: Elif has a 23.5 cm foot and is 161 cm, and Ewa has a 23.0 cm foot and is 153 cm. 158 cm fits between them. ✓
(b) The line gives cm. But every student in the data was in the same year group, with feet from 21 to 27 cm. A six-year-old is far outside that range, and young children's bodies have different proportions. So this is extrapolation, and the answer should not be trusted.
(c) The graph shows only that the two measurements tend to go together. A foot does not push a body upwards. Both grow as a body grows, so the growth of the whole body is behind both. A scatter graph alone can never prove that one thing causes another.
Forensic scientists really do estimate height from feet and footprints. In one study in Bangladesh, researchers measured the footprints and heights of 248 adults. The correlation was positive, but the points were widely spread. So such estimates can narrow down a search, but they never identify one person.
Scatter graphs have also changed whole sciences. In 1911 the Danish astronomer Ejnar Hertzsprung, and in 1913 the American Henry Norris Russell, plotted stars on a graph of brightness against colour, a sign of temperature. The stars did not scatter at random. Most fell along one band, and a few lay in a separate group of very bright stars. Today this graph is called the Hertzsprung–Russell diagram, and it is still how astronomers sort stars into families.
In 1958 the economist Bill Phillips plotted almost a century of British data: unemployment in each year against how fast wages rose. The points fell from left to right along a curve: when unemployment was low, wages tended to rise faster. Economists then hoped the pattern was a fixed law. In the 1970s many countries had high unemployment and fast-rising prices at the same time, and the old pattern broke. A scatter graph shows what happened in the data. It does not promise what will happen next.
- A scatter graph shows two measurements for each person or object as one point, so that the pairs stay together.
- Correlation is described by its direction (positive, negative or none) and its strength (how closely the points lie to a straight line), followed by a sentence in context that uses "tends to".
- Steepness is not strength, because changing the scale changes the steepness but not how closely the points follow a line.
- A line of best fit passes through the mean point and has points mixed above and below it along its whole length.
- Predictions inside the range of the data are fairly reliable when the correlation is strong, but predictions outside it are risky.
- A correlation shows that two measurements tend to move together, not that one causes the other.