By the end of this lesson, you should be able to
- Describe a relationship using a scatterplot.
- Interpret Pearson's sample correlation coefficient.
- Explain how an influential observation can alter correlation without proving causation.
Suppose you measure how many hours students studied and their examination scores. If higher study time tends to accompany higher scores, the variables are associated.
Now for the critical part: that does not automatically mean the extra study time caused higher scores.
Students differ in prior preparation, difficulty of coursework, sleep, access to resources, and many other ways. Statistics can help us identify patterns. Inferring causes requires more thought.
A scatterplot preserves the pairs
A dataset containing pairs of observations can be drawn as a scatterplot. Each point represents a case.
A plot can suggest a positive association, negative association, curved relationship, clusters, or no obvious pattern. Before calculating a single coefficient, inspect the graph.
If the relationship is curved, a measure of linear association may summarize it poorly.
Pearson’s correlation
The sample Pearson correlation coefficient is
For nonconstant paired data, lies between and .
- Near indicates a strong positive linear association.
- Near indicates a strong negative linear association.
- Near indicates weak linear association; there might still be a pronounced nonlinear relationship.
Correlation is unchanged if we add a constant to either variable or multiply both by positive constants. It is not immune to outliers.
If either variable has zero variability, Pearson correlation is undefined. There is simply no direction of linear covariation to standardize.
The case of one surprising observation
Imagine seven observations following a clear upward trend. Now add an eighth observation very far above or below the trend.
That one observation can change the correlation dramatically. A statistic summarizing the entire sample may look convincing even when one data point exerts disproportionate influence.
Try the laboratory below. Move the last observation vertically, keeping the first seven fixed. Watch the graph and the correlation value together.
In a real analysis, this would be a reason to investigate data collection, fit diagnostics, and the scientific context—not to discard a point because the result is inconvenient.
A final warning
A correlation between ice cream sales and swimming-related emergencies might be associated with season or temperature rather than ice cream causing emergencies. An observational association alone cannot identify the correct causal explanation.
We will return to causal interpretation, confounding, and regression in the later modeling unit. For now, the most important habit is simple: look at the paired data before telling a story about the coefficient.
Check your understanding
- If one variable is constant, what happens to Pearson’s ?
- Does necessarily imply the variables are independent?
- If moving one point greatly changes , what should the analyst do next?
Suggested responses
- It is undefined. 2. No: relationships can be nonlinear, and zero correlation alone does not imply independence. 3. Examine the point, data quality, plots, model assumptions, and substantive context; do not remove it reflexively.
Centering, scaling, and the limits of a single number
Define , , and . Pearson’s correlation is , provided both sums of squares are positive. Cauchy–Schwarz gives . If either variable is constant, the denominator is zero and correlation is undefined, not zero.
For pairs , the response is exactly . Yet , so . Zero linear correlation does not imply absence of a relationship. A scatterplot should precede or accompany the coefficient.
Adding a constant to a variable leaves correlation unchanged. Multiplying one variable by a positive constant leaves it unchanged; multiplying by a negative constant reverses its sign. Thus changing centimetres to metres does not change , while reversing a scale’s orientation can. The regression slope changes magnitude under unit changes because it has response-per-predictor units; correlation is dimensionless.
Additional practice
- Compute for .
- What is if every response in those pairs is negated?
- Why can a single influential point increase or decrease dramatically in a small sample?
Worked additional solutions
- The points lie exactly on a line with positive slope, giving ; direct centered sums give the same result.
- .
- The coefficient uses all centered cross-products and squared deviations. A distant point can dominate those sums. Investigate its provenance and scientific role rather than deleting it merely to obtain a preferred coefficient.
The point that changes the correlation
Seven synthetic observations follow an upward trend. Move an eighth observation up or down to see how the sample Pearson correlation changes. Both axes use arbitrary units.
Show the observations as an accessible table
| Observation | X | Y |
|---|---|---|
| 1 | 1 | 1.0 |
| 2 | 2 | 2.0 |
| 3 | 3 | 2.9 |
| 4 | 4 | 4.1 |
| 5 | 5 | 5.2 |
| 6 | 6 | 5.7 |
| 7 | 7 | 7.3 |
| 8 (moving) | 8 | 8.0 |
An influential observation should prompt investigation, not automatic deletion. Correlation alone cannot establish causation.
Keep your place
Mark this lesson complete after you've read it, attempted its exercises, and explained its central idea in your own words.
Progress is not saved unless you choose to mark the lesson complete.
Saved only in this browser's local storage. No required account, server transmission, or analytics. You can reset your saved progress on the course page. Clearing browser data also clears the record.