Courses / Mathematics I
Data Analysis and Probability

Correlation and Regression

Mathematics I 228 words Free to read

Correlation vs Regression

When two numerical variables are measured together, we use two key tools to understand their relationship.

Correlation measures the strength and direction of a linear relationship using the correlation coefficient rr, where 1r1-1 \le r \le 1.

Coefficient (rr)MeaningExample
Near +1+1Strong positive linear relationshipBoth variables rise together
Near 1-1Strong negative linear relationshipOne rises as the other falls
Near 00No linear relationshipNonlinear patterns may still exist

Linear regression goes further by fitting the line of best fit y^=mx+b\hat{y} = mx + b. This is chosen by least squares, which minimises the sum of squared vertical distances (residuals) from data points to the line.

Prediction and Pitfalls

The regression line allows you to predict yy from xx. The slope represents the average change in yy per unit change in xx, while rr measures how tightly points cluster around the line.

Common pitfall: Concluding that because two variables are correlated, one causes the other.

A high rr only means variables move together. A confounding variable may drive both (like ice-cream sales and drownings both driven by hot weather), the direction may be reversed, or it may be coincidence.

Causal claims require experiments, never correlation alone.

Correlation and Regression

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

13practice questions
2interactive scenes

Data Analysis and Probability