Correlation patterns and honest claims
Task 3 · steps 4–6
Scatter plots show what a single r can hide: a perfect U-shape has zero linear correlation, and a plotted subset is not the population behind a reported statistic.
Lab 6 PDF p. 4 · Task 3 (continued)
Your task
Predict, plot and compute r for y = x, y = −x and y = x²; answer the three population questions about the 50 plotted students; rewrite a causal claim as an association.
Evidence to include
r = 1, −1 and 0; one sentence on the zero-correlation curve; a revised claim using “is associated with” and naming a possible common factor.
Worked example and code
Try the task in the PDF first, then compare your working below. Run the code in your own Python notebook.
Open Lab 6 instructions (PDF)Task 3 continued · L6 p. 4.
4. Three datasets
Predictions: A positive, B negative, C zero (symmetric U-shape).
x = np.arange(-3, 4)
datasets = {"A": x, "B": -x, "C": x ** 2}
fig, axes = plt.subplots(1, 3, figsize=(9, 3))
for ax, (name, y) in zip(axes, datasets.items()):
ax.scatter(x, y)
ax.set(xlabel="x", ylabel="y", title=name)
r = np.corrcoef(x, y)[0, 1]
print(name, "r =", round(r, 3))
plt.tight_layout()
plt.show()
Output: A r = 1.0, B r = -1.0, C r = 0.0.
- A: y increases by exactly 1 whenever x increases by 1: perfect positive linear correlation.
- B: y decreases by exactly 1 whenever x increases by 1: perfect negative linear correlation.
- C: y falls from 9 to 0 as x goes from −3 to 0, then rises back to 9. The decreasing and increasing halves cancel, so r = 0, yet y is completely determined by x (x = −2 and x = 2 both give 4).
Zero correlation is not independence. Pearson r measures only straight-line association. C has a perfect curved relationship with r = 0, so "no correlation" must not be read as "unrelated". Always plot.
5. Same population for plot and statistic
- One point represents one student (an entry score and final grade pair).
- No. 0.48 was computed on all 1,200 DS100 students; the 50 plotted points are a selection and could have a different correlation.
- The number of pairs tells the reader which observations were summarised and how much evidence supports the value. A statement should say, for example, "Among all 1,200 DS100 students, entry score and final grade have a positive linear association (r ≈ 0.48)."
6. Rewrite the causal claim
Unsupported: "The correlation is positive, so increasing entry score will cause a higher final grade."
Supported: "Among the 1,200 DS100 students, higher entry scores are associated with higher final grades (r ≈ 0.48). These observational records show how the two scores vary together; they do not show that raising a student's entry score would raise their final grade." A factor that could relate to both: prior mathematical preparation (or study habits, or time available for study).
Saved only in this browser. This note doesn’t fill in the downloaded notebook; “reviewed” is a personal checklist, not a grade.