Vertex Learn

Evaluating a relationship

What this lesson covers

  • r² gives the share of variation the line explains.
  • A curved residual pattern means a line does not fit.
  • Look for other variables.
Worked example

Strength for the study data

  • Use r and r².
  1. r = 0.994
  2. r² = 0.989
  3. The line explains about 99% of the variation, on only 5 points
Key idea

Questions to ask

  • Are there outliers pulling the line?
  • Do the residuals show a pattern?
  • Are there separate groups?
  • Could a third variable explain the link?
Key idea

When a line is the wrong model

  • Plot residuals against x. A random scatter supports a line. A curve means a different model is needed.
A residual plot where the points form a U shape.
Key idea

Try it: when a line is wrong

Worked example

Looking for a third variable

  • Ice cream sales and drownings both rise together in an invented town.
  1. Temperature rises in summer
  2. Hot weather lifts ice cream sales
  3. Hot weather means more swimming
  4. The link is explained by a third variable
Key idea

Try it: one point changes r

Common mistakes

  • Trusting a high r from few points.
    Small samples can mislead.
  • Ignoring a curve in the residuals.
    Try a different model.

Your turn

1

r = 0.9. Find r².

2

r² = 0.81. What does it mean?

3

Residuals form a curve. What does that suggest?

4

Which is a lurking variable for ice cream and drownings?

Show answer

1. 0.81 2. The line explains about 81% of the variation 3. A straight line is not the right model 4. Temperature

Your turn

Sample question: Achieved

For 30 Year 12 students, daily screen time and hours of sleep have r = −0.85. Find r² and explain what it means in context.

Hint

Square r. Then say it as a percentage of the variation in sleep that the line explains.

Answer

r² = 0.7225, so about 72% of the variation in students' sleep is explained by the straight-line relationship with screen time. The other 28% comes from other things.

Step by step
  1. r² is the square of the correlation coefficient. It tells us how much of the variation in y the line explains.
  2. r² = (−0.85)² = 0.7225.
  3. Classic mistake: thinking r² is negative because r is. Squaring always gives a positive number.
  4. As a percentage: 0.7225 is about 72%.
  5. Here y is hours of sleep, so about 72% of the differences in sleep between these students go along with their screen time, on the line.
  6. The other 28% is due to other things, such as sport, part-time work or simply different sleep needs.
  7. It does not show that screen time causes less sleep. It measures how well the line fits.
  8. Check: r² must be between 0 and 1, and 0.7225 is.
Full working
  1. r² = (−0.85)² = 0.7225
  2. 0.7225 ≈ 72%share of variation explained
  3. remaining 28% from other variables
  4. r² ≈ 0.72: the line explains about 72% of the variation in sleep
Your turn

Sample questions: Merit

1

An agent wants to predict house prices in Hamilton. For 40 recent sales, price has r = 0.62 with land area and r = 0.81 with floor area. Find r² for each, compare them, and recommend which variable to use.

Hint

Square each r and compare the percentages of variation explained.

Answer

Land area r² = 0.3844 (about 38%); floor area r² = 0.6561 (about 66%). Floor area explains about 27 percentage points more of the variation in price, so it is the better single predictor, though about a third of the variation is still unexplained.

Step by step
  1. To compare how well two variables predict, compare their r² values: the share of the variation in price each line explains.
  2. Land area: r² = 0.62² = 0.3844, about 38%.
  3. Floor area: r² = 0.81² = 0.6561, about 66%.
  4. Difference: 0.6561 − 0.3844 = 0.2717, so floor area explains about 27 percentage points more.
  5. Classic mistake: comparing r values directly and saying floor area is only a little better (0.81 against 0.62). In terms of variation explained, the gap is much bigger.
  6. So floor area is the better single predictor of price for these sales.
  7. But even floor area leaves about 34% unexplained: location, age and condition matter too.
  8. Recommendation: use floor area, and look at the scatter plot and residuals to check that a straight line suits it.
Full working
  1. land: r² = 0.62² = 0.3844 ≈ 38%
  2. floor: r² = 0.81² = 0.6561 ≈ 66%
  3. 0.6561 − 0.3844 = 0.2717about 27 points more
  4. about 34% still unexplainedother variables
  5. Use floor area: it explains about 66% of the variation, against 38%
2

Across 25 Auckland suburbs, the number of cafés and the number of reported burglaries have r = 0.81. A resident says cafés attract burglars and wants fewer cafés. Evaluate the claim.

Hint

Look for a third variable that would make both numbers go up together.

Answer

The strong positive link does not show cause. Population (and how busy a suburb is) is a likely lurking variable: suburbs with more people and more shops have both more cafés and more burglaries. Comparing rates per 1000 residents would be a fairer test.

Step by step
  1. r = 0.81 is a strong positive linear relationship: suburbs with more cafés tend to have more burglaries.
  2. But a correlation only shows that the two go together. It does not show that one causes the other.
  3. Ask what else differs between suburbs. Bigger, busier suburbs have more people.
  4. More people means more customers, so more cafés. More people and more homes also means more chances for burglary.
  5. So population is a lurking variable: it pushes both numbers up, which can create the correlation by itself.
  6. Classic mistake: jumping from a strong r to a cause. A strong r can come entirely from a third variable.
  7. A fairer check: compare burglaries per 1000 residents with cafés per 1000 residents. If the link disappears, population explained it.
  8. Also, the data are observational, not an experiment, so cause cannot be shown either way.
  9. Conclusion: closing cafés is not supported by this evidence.
Full working
  1. r = 0.81strong positive association
  2. association is not cause
  3. population raises bothlurking variable
  4. compare per 1000 residentsfairer test
  5. Claim not supported: population likely explains the link
Your turn

Sample questions: Excellence

1

At one Auckland school, 12 Year 13 students report daily phone hours (x) and NCEA credits so far (y). For all 12, r = −0.85 and the line is y = 87.6 − 6.47x. One student, with 8 hours and 20 credits, had been in hospital for most of the year. Without that student, r = −0.73 and y = 77.2 − 2.80x. A newspaper reports: "Every hour on your phone costs you 6.5 credits." Evaluate this headline.

Hint

Consider the influential point, what r² says, the sample, and whether the study can show cause.

Answer

The headline is not justified. The 6.5 comes from a slope pulled down by one unusual student; without him the slope is about 2.8 credits per hour and r² falls from about 0.72 to 0.53. The sample is 12 students at one school, self-reported, and observational, so it cannot show that phones cause fewer credits; other factors such as work, illness or motivation may explain both. At most: in this small group, more phone time was linked to fewer credits.

Step by step
  1. Start with the headline's number: 6.5 is the slope from all 12 students, rounded from 6.47.
  2. The student at 8 hours and 20 credits is far below the others and at the largest x. Points like that pull the line strongly.
  3. Without him, the slope is 2.80. So one student more than doubles the slope. The 6.5 is not a stable figure.
  4. Strength: with him r² = 0.85² ≈ 0.72; without him r² = 0.73² ≈ 0.53. The relationship is moderate to strong, but weaker than it first looked.
  5. His low credits have a known cause, hospital, that is not about phone use. So he should not drive the conclusion.
  6. Classic mistake: reading a slope as a cost per hour. A slope from observational data describes an association, not what would happen if a student changed their phone use.
  7. Lurking variables: part-time work, illness, motivation or home life could raise phone time and lower credits at the same time.
  8. Sample: 12 students from one school, so the results may not apply to other schools. Phone hours are self-reported, which is often inaccurate.
  9. A fair statement: in this small group, students who used their phones more tended to have fewer credits, about 2.8 fewer per hour once the hospital case is set aside.
  10. To test cause, you would need a much larger random sample and ideally an experiment, which raises its own ethical issues.
Full working
  1. slope 6.47 with the outlier, 2.80 withoutone point more than doubles it
  2. r² ≈ 0.72 with, ≈ 0.53 withoutweaker than it looks
  3. hospital stay is a separate causeoutlier should not drive it
  4. observational, lurking variablesno cause shown
  5. 12 students, one school, self-reportedsmall, not representative
  6. Headline not justified: at most an association of about 2.8 credits per hour in this group
2

A nursery measures the height (m) of a young tree each year: age 1: 1.0, age 2: 2.6, age 3: 3.9, age 4: 4.8, age 5: 5.4, age 6: 5.7. The least squares line is h = 0.62 + 0.94t, with r² = 0.94. A worker says: "r² is 0.94, so the line is an excellent model, and the tree will be 11.9 m tall at age 12." Calculate the residuals and evaluate the worker's statement.

Hint

Find actual − predicted for each age and look at the signs in order. Then think about whether a tree keeps growing at the same rate.

Answer

Residuals: −0.56, 0.10, 0.46, 0.42, 0.08, −0.56. They are negative at both ends and positive in the middle, an arch, so the growth is curved: it is slowing down. A high r² does not show this. The prediction of 11.9 m at age 12 is double the age range of the data and assumes growth stays at 0.94 m a year when it has already dropped to 0.3 m a year, so it is very likely far too high.

Step by step
  1. Predicted heights from h = 0.62 + 0.94t: 1.56, 2.50, 3.44, 4.38, 5.32, 6.26.
  2. Residuals, actual − predicted: 1.0 − 1.56 = −0.56, 2.6 − 2.50 = 0.10, 3.9 − 3.44 = 0.46, 4.8 − 4.38 = 0.42, 5.4 − 5.32 = 0.08, 5.7 − 6.26 = −0.56.
  3. In order the signs are −, +, +, +, +, −: negative at both ends and positive in the middle. That arch is a pattern, not random scatter.
  4. It means the data curve: the tree grows fast at first and then slows down. The straight line is the wrong shape.
  5. Look at the yearly growth: 1.6, 1.3, 0.9, 0.6, 0.3 m. It drops every year.
  6. Classic mistake: judging the model by r² alone. r² = 0.94 says the points are close to some straight line, not that a straight line is the right shape.
  7. Prediction: h = 0.62 + 0.94 × 12 = 0.62 + 11.28 = 11.9 m.
  8. Age 12 is twice the oldest age in the data, a big extrapolation.
  9. The line assumes 0.94 m of growth every year, but the tree grew only 0.3 m in its last year. The residual at age 6 is already −0.56, and it will get worse.
  10. So 11.9 m is very likely far too high. The tree may only gain a little more height.
  11. Better: fit a curved model that levels off, and only predict a short way past age 6. Also, one tree is a very small sample.
Full working
  1. predicted: 1.56, 2.50, 3.44, 4.38, 5.32, 6.26
  2. residuals: −0.56, 0.10, 0.46, 0.42, 0.08, −0.56actual − predicted
  3. −, +, +, +, +, − is an archgrowth is curved
  4. yearly growth 1.6, 1.3, 0.9, 0.6, 0.3 mslowing
  5. h(12) = 0.62 + 11.28 = 11.9 mfar extrapolation
  6. The statement is wrong: the residuals show a curve, so 11.9 m is very likely far too high
Summary

What to take away

  • Numbers, residuals, context.
  • Five points is not much evidence.
Worksheet with answersWithout answersDownload PDF
Report a mistake

More in AS 91581

Is your child on track?

Take the free placement test