Correlation &
Simple Regression
Learn how to measure linear relationships between variables and build predictive models using real business data.
What Is Correlation?
Correlation measures the strength and direction of a linear relationship between two quantitative variables. When one variable changes, does the other tend to increase, decrease, or show no pattern at all?
Visualising Scatter Plots
Why It Matters in Business
Businesses use correlation and regression every day: forecasting sales from ad spend, predicting costs from output, or testing whether employee training hours relate to productivity. These tools turn raw data into actionable decisions.
The Correlation Coefficient \( r \)
The Regression Line
The least-squares regression line minimises the total squared vertical distance between each data point and the line. It always passes through the point \( (\bar{x}, \bar{y}) \).
Correlation vs. Regression
| Correlation \( r \) | Regression | |
|---|---|---|
| Purpose | Measure strength & direction | Predict \( y \) from \( x \) |
| Output | Single number \([-1, +1]\) | Equation: \( \hat{y} = b_0 + b_1 x \) |
| Symmetry | \( r_{xy} = r_{yx} \) | Swapping \( x \) and \( y \) changes the line |
| Causation? | No | No (still just association) |
\( R^2 \): Coefficient of Determination
A high \( R^2 \) suggests the model captures most variability, but always check the residual plot for non-linear patterns before trusting it.
How to Apply It
Example 1: Ad Spend vs. Sales
A small company tracks monthly ad spend (\( x \), in $1,000s) and monthly sales (\( y \), in $1,000s) over 8 months. They find: \( \bar{x} = 5 \), \( \bar{y} = 40 \), \( s_x = 2 \), \( s_y = 8 \), and \( r = 0.95 \).
Interpreting the Results
Example 2: Negative Correlation
A retailer tracks price per unit (\( x \), in $) and units sold per week (\( y \)). Summaries: \( \bar{x} = 30 \), \( \bar{y} = 200 \), \( s_x = 10 \), \( s_y = 60 \), \( r = -0.85 \).
Example 3: Residual Analysis
Using the Ad Spend model, if actual sales in a month with \( x = 4 \) were $38,000, the residual is:
Beware of Extrapolation
Extrapolation means using the regression line to predict \( y \) for an \( x \)-value far outside the range of the original data. The linear pattern may not hold there.
Common Mistakes
Key Formulas at a Glance
| Concept | Formula / Symbol | Interpretation |
|---|---|---|
| Correlation | \( r \in [-1, +1] \) | Strength & direction of linear fit |
| Slope | \( b_1 = r \dfrac{s_y}{s_x} \) | Change in \( \hat{y} \) per unit change in \( x \) |
| Intercept | \( b_0 = \bar{y} - b_1 \bar{x} \) | Predicted \( y \) when \( x = 0 \) |
| \( R^2 \) | \( r^2 \) | % of \( y \)-variation explained by model |
| Residual | \( e_i = y_i - \hat{y}_i \) | Error for observation \( i \) |
Question 1 of 5
A dataset has \( r = -0.72 \). What does this tell us?
Question 2 of 5
Given \( r = 0.80 \), \( s_y = 12 \), \( s_x = 4 \), what is the slope \( b_1 \)?
Question 3 of 5
A regression model gives \( \hat{y} = 10 + 2.5x \). If \( x = 6 \) and the actual \( y = 28 \), what is the residual?
Question 4 of 5
If \( R^2 = 0.64 \), which statement is correct?
Question 5 of 5
A regression line always passes through which point?