← Statistics for Data Science learning path
Statistics for Data Science · Module 8 of 10

Correlation and regression

Measure relationships and predict values.

📖 Key ideas

  1. Correlation (r) ranges from −1 to 1.
  2. Linear regression fits y = a + b·x.
  3. Slope b shows change in y per unit x.
  4. R² shows the share of variance explained.
  5. Check residuals for patterns and outliers.
💡 Real-life example: Regression draws the best road through scattered houses, showing the general direction.
Correlation coefficientStrength and direction of linear relation
SlopeChange in y per unit x
R-squaredVariance explained
ResidualActual minus predicted