Lesson 10 — Correlations
Measuring how two continuous variables move together — and why that doesn’t mean one causes the other.
The Pearson correlation test measures the strength and direction of the linear relationship between two continuous variables.
Do dogs that drink more also drool more? A scatterplot and correlation test will tell us.
Before calculating, visualize. Each dog is one point: (water consumed, saliva produced).
If points trend up-right: positive correlation. Down-right: negative. Random cloud: no correlation.
Scatterplots also reveal if the relationship is linear — a requirement for Pearson’s test.
The correlation coefficient r ranges from −1 to +1.
Our dogs: r = 0.8 → strong positive correlation between water intake and saliva production.
Always ask: is there a third variable (a confounder) that could explain the relationship?
Once we know variables are correlated, regression tells us by how much one changes when the other does.
Every +1 liter of water → ~1.21 more liters of saliva. Now we can make predictions!
Going further
Predict one outcome from many variables simultaneously.