The University of Hong Kong · FACULTY OF STATISTICS

MEDD8815 Chap.2 Scatterplots, Correlation and Least-Squares Regression

- one subject, every graph, every model, every mark
8 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 2 of 8 · MEDD8815

Scatterplots, Correlation and Least-Squares Regression

Two variables on the same cases

The second session moves from one variable to how two quantitative variables recorded for the same cases move together. It starts with roles, an explanatory variable that may explain or influence and a response variable that measures the outcome, and with the scatterplot, which puts the explanatory variable on the horizontal axis.

A scatterplot is described by direction, form and strength, plus any striking departures, and a categorical variable can be added by marking the points in different colours.

Correlation and its limits

The correlation coefficient r measures the direction and strength of a straight-line relationship.

It lies between minus one and one, has no units, is unchanged when either variable is rescaled, and does not distinguish the two variables.

The chapter spends as long on what r cannot do as on what it can: it needs two quantitative variables, it misses curved patterns, and one outlying point can move it a long way.

Fitting and questioning a line

The least-squares line minimises the sum of squared vertical distances from the points, passes through the point of means, and has slope equal to r times the ratio of the standard deviations.

Its square of correlation is the fraction of the variation in the response that the line accounts for.

The chapter works a line from five summary numbers, then examines residuals, influential points and extrapolation using an AskSia-authored data set in which adding a single case drops r sharply and flattens the slope.

Association is not causation

Three explanations can lie behind an observed association: genuine causation, common response to a lurking variable, and confounding of two influences that cannot be separated.

A well-designed experiment is the most convincing route to a causal claim; without one, the chapter sets out the criteria that together make a causal argument stronger. The SPSS routes from the session handout, for correlation, simple regression and scatterplots with group markers, are shown alongside the hand calculations.

In this chapter

What this chapter covers

  • 01

    Explanatory and response variables

  • 02

    Reading direction, form and strength from a scatterplot

  • 03

    The correlation coefficient and its properties

  • 04

    The least-squares regression line

  • 05

    Slope, intercept and r squared

  • 06

    Residuals and residual plots

  • 07

    Outliers, influential points and extrapolation

  • 08

    Causation, common response and confounding

Worked example · free

Which quantities survive a change of units?

Q [4 marks]. AskSia-authored practice. A line predicting reading score from weekly reading time in hours is y-hat = 38 + 12x, with r = 0.6. Time is re-recorded in minutes. Give the new slope, intercept, r and r squared, and explain each. The marks shown are an AskSia study allocation and are not the University's marking scheme.
One point, a different story.One point, a different story. A student with 20 hours and a score of 15 drops r from 0.948 to 0.310 and flattens the slope to 0.25.Add one student far to the right and the line swings04812162081216202428Weekly hours of self-studyQuiz scoreŷ = 15.50 + 0.250xr = 0.310 r² = 0.096
One point, a different story. A student with 20 hours and a score of 15 drops r from 0.948 to 0.310 and flattens the slope to 0.25.
  • 1Rescale the slope for minutes rather than hours.
  • 1Decide whether the intercept moves.
  • 2State what happens to r and to r squared, with the reason.
One hour is 60 minutes, so each minute is worth one sixtieth of the hourly effect: the slope becomes 12/60 = 0.2 points per minute. The intercept is the predicted score at zero time, and zero hours is zero minutes, so it stays 38. Correlation has no units and is unchanged by rescaling either variable, so r stays 0.6 and r squared stays 0.36; the new line predicts exactly the same scores as the old one, just from a differently measured x.
Sia tip — Slope carries the units of y per unit of x, so it changes whenever either variable is rescaled; r never does.
Glossary

Key terms

Explanatory Variable
A variable that may explain or influence changes in another, placed on the horizontal axis of a scatterplot.
Response Variable
The variable that measures an outcome of a study, placed on the vertical axis and predicted by a regression line.
Correlation Coefficient
A number r between minus one and one summarising how closely, and in which direction, two quantitative variables follow a straight line.
Least-Squares Line
The straight line that makes the sum of squared vertical distances from the data points to the line as small as possible.
Residual
An observed response minus the response the fitted line predicts for the same case.
Influential Observation
A case whose removal would markedly change the fitted line; cases lying far out along the x axis are the usual source.
Lurking Variable
A variable not included in a study that nonetheless affects the relationship between the variables studied.
Extrapolation
Using a regression line to predict outside the range of explanatory values used to fit it, which is often unreliable.
FAQ

Scatterplots, Correlation and Least-Squares Regression FAQ

Does a strong correlation mean one variable causes the other?

No. A lurking variable can drive both, which is common response, or two influences can be tangled together, which is confounding. Only a well-designed experiment gives fully convincing evidence of cause; without one, look for strength, consistency, dose-response, time order and a plausible mechanism together.

What does r squared tell me in a regression?

It gives the share of the variability in the response that is explained by the straight-line relationship with the explanatory variable. An r of 0.8 gives 0.64, so about 64 per cent of the variation is explained and the rest is left to other influences.

How can a point lie on the line and still be a problem?

A case far out in the x direction can pull the line towards itself, so its residual looks small while the whole fit depends on it. Refit without that case: if the slope or r changes markedly, the point is influential and both fits should be reported.

How do I get r and the line in SPSS?

Analyze, Correlate, Bivariate gives the Pearson correlation. Analyze, Regression, Linear gives the fitted line: in the Coefficients table, B for the constant is the intercept and B beside the predictor is the slope, and the Model Summary gives R and R Square.

Study strategy

Assessment move

Keep a two-column sheet of the pairs this chapter separates: r and slope, residual and influence, outlier and influential point, common response and confounding. For each pair, write one sentence and one tiny example of your own. The homework and the quiz both reward naming the right member of a pair, and the sheet makes the difference automatic.

Working through Scatterplots, Correlation and Least-Squares Regression in MEDD8815? Sia is AskSia’s AI Statistics tutor — ask any MEDD8815 Scatterplots, Correlation and Least-Squares Regression question and get a clear, step-by-step explanation grounded in how MEDD8815 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 26 of your The University of Hong Kong subjects - and 1,000+ Bibles across every Australian university.
Sia - your MEDD8815 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works