MathemagiciansLibraryExplorationsDeep Dives
← Mathematics · Upper Secondary
MathematicsUpper Secondary

Scatter graphs — spotting correlation

U4 — Statistics Advancing › U4.3 — Correlation and RegressionLecture 1 of 4~2850 words

More televisions, longer lives?

In 1994, the statistics teacher Allan Rossman published a set of data for his students. It covered the 40 countries that had the largest populations in 1990. For each country, it gave two numbers from an almanac printed in 1993: the life expectancy, and the number of people for each television set.

The pattern was clear. Countries with fewer people per television set tended to have longer life expectancies. In other words, where there were more televisions, people tended to live longer.

So here is a question. Should a government that wants its people to live longer give every family a television?

No. A television does not keep anyone alive. But the pattern in the data is real. So two things are true at once: the numbers move together, and one does not cause the other.

This lecture first teaches you to see a pattern between two quantities and to describe it exactly. Then it teaches the harder skill: asking what a pattern does and does not mean.

Two measurements for every person

So far, your statistics has measured one thing at a time. Now each person, or each country, gives you two measurements. Data like this is called bivariate data: "bi" means two, and each measurement is a "variable".

Here is an example, with invented data. Twelve students recorded how many hours they revised for a test, and the score they got.

Hours of revision2345678910121416
Score (%)384541525550626068717884

The two numbers in each column belong together. They describe one student. This is the most important fact about bivariate data, so look at why. Suppose you wrote the hours in one list and the scores in another list, and sorted each list separately. Each list would still be correct. But you could no longer say which score went with which hours. The question "do students who revise more score more?" would have no answer. The information lives in the pairs.

A scatter graph keeps the pairs together. Each pair becomes one point, with the first number across and the second number up. Some books call it a scatter diagram or a scatter plot.

0 4 8 12 16 20 0 20 40 60 80 100 Hours of revision Exam score (%)
Each cross is one student. The student at (8, 62) revised for 8 hours and scored 62%.

Which variable goes across? Put the one that you think may explain or predict the other on the horizontal axis. Here, hours of revision might help explain a score, so hours go across and scores go up. When neither variable explains the other, either choice is fine.

Direction: which way the points lean

Look at the revision graph as a whole, not point by point. As you move to the right, the crosses tend to rise. Students who revised more tended to score more. A pattern like this between two variables is called a correlation. There are three basic cases.

Positive correlation y Negative correlation y No correlation y
Positive correlation: the points rise from left to right. Negative correlation: they fall. No correlation: there is no rising or falling pattern.

With positive correlation, as one variable increases, the other tends to increase: height and arm span, or revision and scores. With negative correlation, as one increases, the other tends to decrease: the temperature outside and the layers of clothing people wear. With no correlation, knowing one value tells you nothing about the other: a person's height and the last digit of their phone number.

Notice the word "tends". It carries real meaning.

Stop and think

In the revision data, the student who revised for 7 hours scored 50%. The student who revised for 6 hours scored 55%. Does this break the positive correlation?

Show the answer

No. Correlation describes the overall pattern of all the points, not every pair of neighbours. Real data always has some up-and-down. The trend across all twelve students still rises clearly. This is why we say "tends to increase", never "always increases".

Strength: how close to a line

Two graphs can both show positive correlation and still look very different. In one, the points sit almost on a straight line. In another, they rise only as a loose cloud.

Strong positive correlation y Weak positive correlation y
Both graphs show positive correlation. In the first, the points lie close to a straight line: strong correlation. In the second, they are widely spread around the rising trend: weak correlation.

The strength of a correlation describes how closely the points lie to a straight line. Strong means the points cluster tightly, so one value predicts the other well. Weak means the pattern is noisy, so a prediction would be rough. Between them, we say moderate.

Here is where many students go wrong. Look at the two graphs below. They use the same scales.

0 4 8 12 0 5 10 15 20 25 Graph A y 0 4 8 12 0 5 10 15 20 25 Graph B y
Two sets of invented data drawn on the same scales.
Predict, then reveal — which correlation is stronger?

Look at Graph A and Graph B above. Choose your answer before you read on.

The question compares Graph A (steep, loosely scattered) with Graph B (shallow, tightly clustered).

Graph B shows the stronger correlation. Its points lie almost exactly on a straight line. Graph A climbs more steeply, but its points zigzag far above and below the trend. Steepness is not strength.

Graph B is stronger, although Graph A looks more dramatic. Here is the reason steepness cannot be strength. Suppose Graph B measured its vertical variable in millimetres instead of centimetres. Every y-value would be ten times bigger, and the points would climb ten times as steeply. But they would still lie exactly as close to their line. Nothing about the relationship has changed, only the units. So steepness depends on the units you choose, and strength does not.

Steepness is still useful. It is the gradient of the trend, and the next lecture puts a line through the points to measure it. For now, keep the two questions apart: which way, and how tightly.

Describing a correlation

Direction: positive, negative or none.

Strength: strong, moderate or weak, judged by how closely the points lie to a straight line, never by how steep they are.

Context: one sentence in the words of the problem, using "tends to".

A strong pattern with no correlation

A theatre tried nine different ticket prices for the same show (invented data). At a low price, many people came but each paid little. At a high price, each paid a lot, but few came. Here is the income at each price.

0 4 8 12 16 20 0 1000 2000 3000 4000 5000 6000 Ticket price ($) Income from tickets ($)
Income rises with price up to $10, then falls. The points lie exactly on a smooth arch.

Is there a positive correlation, or a negative one? Neither. On the left the points rise, and on the right they fall by the same amounts. Taken together, they do not lean either way. So there is no correlation.

But there is clearly a relationship, and a very strong one. Every point sits exactly on the arch. This means that "no correlation" has a narrow meaning. In this course, correlation is about a straight-line pattern. A relationship can be perfect and still show no correlation, if its shape is curved. So always look at the graph before you describe it, and say so when you see a curve.

Outliers: the point that does not fit

Return to the revision data. Suppose a thirteenth student revised for 20 hours and scored only 30%.

0 4 8 12 16 20 0 20 40 60 80 100 Hours of revision Exam score (%) outlier
The point (20, 30) lies far from the pattern of the other twelve students.

A point that lies far away from the general pattern is called an outlier. There are two possible stories behind it. It could be a real, unusual case: this student may have been ill on the day of the test. Or it could be a mistake: perhaps the score was 80% and was copied down wrongly.

The two stories lead to different actions. A mistake should be corrected, if the true value can be found. A real but unusual case belongs in the data. You may leave it out of one particular question, but only if you say that you did and why. Never remove a point just because it spoils the pattern.

Outliers matter because one point can change the picture: with this one included, the correlation looks far weaker than the other twelve students show. So describe the main pattern first, then name the outlier separately.

Correlation is not causation

Now the harder skill. This is the part of the lecture to spend time on. A correlation tells you that two variables move together. It does not tell you why. When two variables X and Y are correlated, there are four possible explanations.

A correlation with no direct cause between the two variables, as in cases 3 and 4, is often called a spurious correlation. The pattern is real. The obvious story about it is false.

Sort the correlations below. For each one, decide which explanation is most likely.

Sort — why do these move together?

Choose a box for each card. Read the reason that appears, whether your choice is right or not.

Nine correlations, each with its most likely explanation.

CorrelationMost likely explanation
In a trial, tomato plants were given different amounts of fertiliser at random. Plants with more fertiliser produced more fruit.One causes the other: the plants were assigned at random, so fertiliser was the only planned difference.
Over a summer, the hotter the day, the more electricity a city used.One causes the other: heat makes people switch on cooling. A city's electricity use does not decide its weather.
People who use a walking stick tend to walk more slowly.The cause runs the other way: difficulty walking leads people to use a stick.
Towns with more police officers per 1000 people tend to have more crimes per 1000 people.The cause runs the other way: towns with more crime hire more officers.
The more fire engines sent to a fire, the more damage the fire tends to cause.A third variable: the size of the fire decides both.
Children aged 5 to 11 with larger feet tend to read better.A third variable: older children have larger feet and have had more years of reading.
Month by month, ice cream sales and sunburn cases rise and fall together.A third variable: hot, sunny weather drives both.
Cage films per year and US pool drownings, 1999 to 2009.Coincidence: no mechanism links them.
For ten days, a student's dice total each morning rose and fell with the rainfall in a distant city.Coincidence: dice cannot know about rain.

Look at the tomato card. It is different from all the rest. Someone did not just watch. They chose the amount of fertiliser for each plant at random. Random choice spreads every other difference (soil, sunlight, seed quality) evenly across the groups. So if the plants with more fertiliser grow more fruit, fertiliser is the only reasonable explanation left. This is called an experiment. An experiment can show a cause. A scatter graph of things you only observed cannot, on its own.

That is it. That is the whole idea. A correlation is a question, not an answer. The right response to a correlation is curiosity: why might these two move together? The wrong response is "therefore one causes the other".

Worked examples

Worked Example 1 — Describing a scatter graph

A café recorded the midday temperature and the number of hot drinks it sold on 10 days (invented data).

Temperature (°C)8111315171922242730
Hot drinks sold1181129598848066625041
0 5 10 15 20 25 30 35 0 20 40 60 80 100 120 140 Temperature (°C) Hot drinks sold
The café's 10 days. Each cross is one day.

Describe the correlation.

Use the three parts. Direction: as you move right, the points fall, so the correlation is negative. Strength: the points lie close to a straight line, with only small zigzags (13 °C and 15 °C), so it is strong. Context: on warmer days, the café tends to sell fewer hot drinks.

Answer: strong negative correlation. As the temperature increases, the number of hot drinks sold tends to decrease.

Check: the coldest day sold the most (118) and the hottest day sold the fewest (41), which fits a negative correlation.

Worked Example 2 — An outlier

An eleventh day is added: 29 °C, with 120 hot drinks sold.

0 5 10 15 20 25 30 35 0 20 40 60 80 100 120 140 Temperature (°C) Hot drinks sold outlier
The eleventh day, (29, 120), lies far above the falling pattern.

(a) Identify the outlier and explain why it is one. (b) Suggest two possible reasons for it. (c) Should it be used when describing how temperature affects sales?

(a) The point (29, 120). On the other hot days, from 27 °C to 30 °C, the café sold 41 to 50 drinks. This day sold more than the coldest day did.

(b) It could be real: perhaps a large event, such as a sports match, brought many extra customers that day. Or it could be a recording mistake: perhaps 20 or 12 was written as 120.

(c) First check the records. If it is a mistake and the true value is found, correct it. If it is a real event, it says nothing about the weather, so it is reasonable to leave it out of this question. Say clearly that you left it out, and why.

Worked Example 3 — Plotting from a table

A dealer recorded the age of 10 cars of the same model and their value, as a percentage of the price when new (invented data). Plot a scatter graph and describe the correlation.

Age (years)12345678910
Value (%)85746660524741373330

Age may explain value, so age goes across. The ages run from 1 to 10, so an axis from 0 to 11 in steps of 2 fits. The values run from 30 to 85, so a vertical axis from 0 to 100 in steps of 20 fits. Plot each pair as a cross.

0 2 4 6 8 10 0 20 40 60 80 100 Age of car (years) Value (% of price when new)
The 10 cars. The points fall steeply at first and then more gently.

Answer: strong negative correlation. Older cars of this model tend to be worth a smaller percentage of their price when new.

Notice also that the fall is not quite straight. In the first year the value drops 85 − 74 = 11 points, and from year 9 to year 10 only 33 − 30 = 3 points. So the points bend gently. The correlation is still strong, but a good description notices the bend.

Worked Example 4 — Judging a claim

A survey of 500 students found a positive correlation between eating breakfast on more days of the week and exam scores. A headline says: "Eating breakfast raises your marks." Is the headline justified?

The correlation tells you that students who eat breakfast more often tend to score more. The headline claims more: that breakfast causes the higher scores. Check the other explanations.

A third variable is very possible. Students with a regular morning routine may also sleep more, and may have more help at home. Those things could raise both breakfast-eating and scores. Reverse cause is less likely, but students who feel ready for school may take time for breakfast.

So the headline is not justified by this survey alone. A fair statement is: "Students who eat breakfast more often tend to score higher." To test for a cause, a researcher could run an experiment: give breakfast to a randomly chosen half of a group of students, and compare the two halves.

Trap 1 — Reading steepness as strength

A steep cloud of points is not a strong correlation unless the points are close to a line. Change the units and the steepness changes. The strength does not. Judge strength only by how tightly the points cluster.

Trap 2 — "No correlation" means "no relationship"

Points on an arch or a U-shape can show no correlation and still follow a perfect pattern. Correlation looks only for a straight-line trend. Describe the shape you see.

Trap 3 — Writing "causes" in a conclusion

From a scatter graph alone, write "tends to increase" or "is associated with", never "causes" or "makes". If a question asks for a reason, give a possible explanation and say that it is possible, not proven.

Try it yourself

Work each one on paper first. Open a hint only when you are stuck.

  1. For each pair of variables, say whether you would expect positive, negative or no correlation, and give a reason. (a) The age of a young tree and its height. (b) The height above sea level of a town and its average temperature. (c) A person's house number and their height. (d) The number of people sharing a pizza and the number of slices each person gets.

    Hint 1

    For each one, imagine the first variable getting bigger. What tends to happen to the second?

    Hint 2

    For (d), a pizza has a fixed number of slices. Try 2 people, then 4 people.

    Full answer

    (a) Positive: as a young tree gets older, it tends to grow taller. (b) Negative: higher towns tend to be colder. (c) No correlation: a house number tells you nothing about a person's height. (d) Negative: with 8 slices, 2 people get 4 each, but 4 people get 2 each. More people, fewer slices each. The points would lie on a curve, so describe it as a negative correlation that bends. Check: in each case, the reason is a mechanism you can explain, not just a guess.

  2. Eight students measured their height and their arm span, in cm.

    Height150155158162165168170174
    Arm span148156157160167166117175

    (a) Plot a scatter graph. (b) Identify the outlier and suggest a likely reason for it. (c) Describe the correlation shown by the other seven students.

    Hint 1

    For each student, compare the two numbers. In most rows, how far apart are they?

    Hint 2

    Look closely at the digits of the odd value. Could they have been written in the wrong order?

    Full answer

    (a) Height across (from 145 to 180 cm), arm span up (from 110 to 180 cm), with 8 crosses. (b) The outlier is (170, 117). For every other student, arm span is within 3 cm of height. An arm span of 117 cm for a person 170 cm tall is very unlikely. The digits 1, 1, 7 reversed give 171, which fits the pattern perfectly. So it is probably a recording mistake: check with the student and correct it. (c) The other seven show a strong positive correlation: taller students tend to have longer arm spans. Check: the arm spans of the seven rise from 148 to 175 as the heights rise from 150 to 174, with only one small step down (167 to 166).

  3. A report says: "In a study of cities, those with more hospitals had more deaths each year. Hospitals are dangerous." Give two reasons why the conclusion does not follow, and suggest a fairer comparison.

    Hint 1

    Which of the four explanations could fit? Think about what makes a city have many hospitals.

    Hint 2

    A city of 5 million people needs more hospitals than a city of 50 000. It also has more deaths.

    Full answer

    First, a third variable: population. Bigger cities have more hospitals and more deaths, simply because more people live there. Second, the cause may run the other way: where many people are seriously ill, more hospitals are built, and very ill people travel to cities with hospitals. A fairer comparison uses deaths per 1000 people, and compares patients with the same illness. Check: neither reason needs hospitals to be dangerous, so the correlation alone cannot show that they are.

  4. A researcher tested the reading of 12 children: four aged 7, four aged 9 and four aged 11 (invented data).

    AgeShoe sizeReading score
    730, 31, 32, 3341, 38, 43, 40
    934, 35, 36, 3755, 58, 53, 56
    1138, 39, 40, 4170, 67, 72, 68

    The shoe sizes and scores are listed in the same order, so the first child aged 7 has shoe size 30 and score 41. (a) Plot shoe size against reading score for all 12 children and describe the correlation. (b) Now look only at the four children aged 9. Describe the correlation for them. (c) Explain what is going on. (d) Could the researcher run an experiment to test whether bigger feet help reading? What could they do instead?

    Hint 1

    In (a), the 12 points form three small groups. Where are the groups?

    Hint 2

    In (b), as shoe size goes 34, 35, 36, 37, the scores go 55, 58, 53, 56. Is there a rise?

    Full answer

    (a) The points form three groups, low-left, middle and high-right. Overall there is a strong positive correlation: children with bigger feet tend to read better. (b) For the 9-year-olds, the scores go 55, 58, 53, 56 as the shoe sizes rise. They go up, down and up again with no trend. There is no correlation. The 7-year-olds (41, 38, 43, 40) and 11-year-olds (70, 67, 72, 68) show the same. (c) Age is a third variable. Older children have bigger feet, and older children have had more years of reading. Once you compare children of the same age, the link between feet and reading disappears. (d) No: you cannot give a child bigger feet at random. Instead, compare children of the same age, exactly as in (b). This holds the third variable fixed. Check: in every age group, the child with the biggest feet does not have the highest score (33 → 40, 37 → 56, 41 → 68).

The bigger idea

Francis Galton described "co-relations" in a paper to the Royal Society in 1888. The idea became one of the most used in science, and one of the most misused.

How does science find a cause when it cannot run an experiment on people? The story of smoking shows how. In 1950, Richard Doll and Austin Bradford Hill compared lung cancer patients in British hospitals with patients who did not have lung cancer. Smokers were far more common among the cancer patients. That was a correlation, and many experts doubted it meant a cause. So in 1951 the two began following tens of thousands of British doctors for years. Heavier smokers developed lung cancer more often than lighter smokers. Doctors who stopped smoking lowered their risk. No third variable could easily explain all of this together. The evidence for a cause grew from many patterns that fitted one mechanism.

This is the honest path from a pattern to a cause. Begin with a scatter graph. Ask the four questions. Then look for evidence that only one explanation can survive.

Key concepts in this lesson