Scatter Plots and Correlation
Do students who study longer get higher marks? Do taller people have longer arms? Questions like these are about how two attributes of the same person or thing are related. A scatter plot lets you see the relationship, and the correlation coefficient puts a number on how strong it is.
Key ideas
Section titled “Key ideas”Two-variable data
Section titled “Two-variable data”In two-variable (bivariate) data, you measure two attributes for each individual, like hours studied and test mark for each student. The goal is to study the relationship between the two.
- The independent variable () is the one you think might explain or influence the other. It goes on the horizontal axis.
- The dependent variable () is the one that might respond. It goes on the vertical axis.
For hours studied and test mark, hours studied is independent and test mark is dependent.
Scatter plots
Section titled “Scatter plots”A scatter plot shows each individual as one point . Don’t join the dots: each point is a separate individual.
Describing a scatter plot
Section titled “Describing a scatter plot”Describe four things:
| Feature | What to look for |
|---|---|
| Direction | Positive ( tends to rise as rises) or negative ( tends to fall) |
| Form | Linear (points follow a line) or non-linear (a curve) |
| Strength | Strong (points close to a line or curve), moderate, or weak (widely scattered) |
| Outliers | Points that sit far away from the overall pattern |
The correlation coefficient
Section titled “The correlation coefficient”The correlation coefficient measures how closely the points fit a straight line:
- : all points lie exactly on a rising line. : exactly on a falling line.
- near : no linear relationship.
- The sign gives the direction; the size gives the strength.
Many Ontario textbooks use these cut-offs (others draw the lines a little differently):
| Value of r | Description |
|---|---|
| strong positive | |
| moderate positive | |
| weak positive | |
| no linear correlation | |
| weak negative | |
| moderate negative | |
| strong negative |
Finding r with technology
Section titled “Finding r with technology”You’ll almost always find with technology:
- Spreadsheet:
=CORREL(A2:A11, B2:B11), with the -values in column A and the -values in column B. - Graphing calculator (TI-83/84): enter the data in lists L1 and L2, turn on DiagnosticOn, then choose STAT, CALC, LinReg(ax+b).
- Desmos: enter a table, then type
y1 ~ m x1 + b. Desmos shows .
For the curious, the formula is:
You aren’t expected to use it by hand for real data sets. Answers on this page are rounded to three decimals; your technology may differ in the last digit if you round along the way.
Comparing groups with side-by-side boxplots
Section titled “Comparing groups with side-by-side boxplots”When one variable is categorical (like grade) and the other is numerical (like hours of sleep), a scatter plot doesn’t work. Instead, draw a boxplot for each category on the same scale and compare their medians, spreads (IQR and range), and outliers. You met boxplots in quartiles and percentiles.
Worked examples
Section titled “Worked examples”Example 1: Which variable is which?
Section titled “Example 1: Which variable is which?”For each pair, identify the independent and dependent variables.
- (a) The outdoor temperature and the number of hot chocolates a café sells.
- (b) A car’s age and its resale value.
Solution.
(a) Temperature might affect sales, not the other way around. Independent: temperature. Dependent: hot chocolates sold.
(b) The age of the car influences its value. Independent: age. Dependent: resale value.
Example 2: Describing a scatter plot
Section titled “Example 2: Describing a scatter plot”Ten students recorded how long they studied for a test and their mark.
| Hours studied | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Mark (%) |
Draw a scatter plot, describe it, and find .
Solution.
- Direction: positive; students who studied longer tended to score higher.
- Form: roughly linear.
- Strength: fairly strong; the points stay close to a line, with some scatter.
- Outliers: none.
With =CORREL or a calculator:
That’s a strong positive linear correlation, which matches the picture.
Example 3: Reading values of r
Section titled “Example 3: Reading values of r”Describe each correlation using the table above: (a) (b) (c) .
Solution.
(a) and is negative: strong negative.
(b) : moderate positive.
(c) and is negative: weak negative.
Example 4: Side-by-side boxplots
Section titled “Example 4: Side-by-side boxplots”A survey asked Grade 9 and Grade 12 students how many hours they sleep on a school night. Compare the groups.
Solution.
- Centre: the Grade 9 median is hours; the Grade 12 median is hours. Grade 9 students typically sleep about an hour more.
- Spread: Grade 9 IQR hour; Grade 12 IQR hours. Ranges are and hours. Grade 12 sleep times are more spread out.
- Overall: in fact, of Grade 12 students sleep hours or less, while of Grade 9 students sleep hours or more.
So there does seem to be a relationship between grade and sleep in this survey.
Common mistakes
Section titled “Common mistakes”Swapping the axes. The independent variable goes on the -axis. Ask: “Which one might influence the other?”
Thinking a negative r means a weak relationship. The sign is only the direction. is just as strong as .
Using r for a curved pattern. measures linear fit only. Points that follow a clear curve can have near (see Practice Question 9). Always look at the scatter plot first.
Ignoring outliers. A single outlier can change a lot (see Practice Question 6). Check whether it’s a data-entry error or a genuinely unusual individual before deciding what to do.
Reading r as a percentage. does not mean “50% related”. It’s just a number on the scale from to .
Concluding that x causes y. A strong correlation alone doesn’t prove cause and effect. See correlation and causation.
Practice
Section titled “Practice”1. (Warm-up) Identify the independent and dependent variables.
- (a) The number of hours a phone is used and its remaining battery percentage.
- (b) A person’s height and their shoe size.
Solution
(a) Independent: hours of use. Dependent: battery percentage.
(b) Height is usually treated as independent and shoe size as dependent, since shoe size is thought of as following from overall body size. (Either choice can be defended here, as long as you explain it.)
2. (Warm-up) Describe each correlation: (a) (b) (c) (d)
Solution
(a) Strong positive. (b) Moderate negative. (c) Weak positive. (d) Strong negative.
3. (Warm-up) Which shows a stronger linear relationship, or ? Explain.
Solution
, because is larger than . The sign only tells you the direction.
4. (Core) Eight people measured their arm span and height in centimetres.
| Arm span (cm) | ||||||||
|---|---|---|---|---|---|---|---|---|
| Height (cm) |
Use technology to find , and describe the correlation.
Solution
. This is a strong positive linear correlation: people with longer arm spans tend to be taller, and the points lie very close to a line.
5. (Core) A used-car website lists the asking prices of eight cars of the same model.
| Age (years) | ||||||||
|---|---|---|---|---|---|---|---|---|
| Price (thousands of $) |
Find and describe the scatter plot (direction, form, strength, outliers).
Solution
. The scatter plot shows a strong, negative, linear relationship with no outliers: older cars have lower prices, and the price falls steadily with age.
6. (Core) An eleventh student is added to the data in Example 2: they studied hours but scored . Find the new value of . What does this show?
Solution
With the extra point, (down from ). One outlier changed a strong correlation into a moderate one. Outliers can have a big effect on , especially in small data sets.
7. (Core) A class recorded their travel times to school. Five-number summaries, in minutes:
| Min | Q1 | Median | Q3 | Max | |
|---|---|---|---|---|---|
| Bus | |||||
| Walk |
Describe how side-by-side boxplots of these would compare the two groups.
Solution
The bus box would sit well to the right of the walking box. The median bus trip ( min) is more than twice the median walk ( min). Bus times are also more spread out: IQR min versus min, and range min versus min. Even the slowest walker ( min) is faster than the median bus rider, so method of travel and travel time seem to be related.
8. (Challenge) Use the formula to calculate by hand for the points , , , , . Check with technology.
Solution
, , , , , .
Technology gives the same value: a strong positive correlation.
9. (Challenge) Find for the points , , , , . Does this mean and are unrelated?
Solution
. In the formula, and , so the numerator is .
But and are perfectly related: every point is on . The relationship is just not linear, so can’t detect it. This is why you should always look at the scatter plot, not just .