01 / 21

Correlation &
Simple Regression

Learn how to measure linear relationships between variables and build predictive models using real business data.

Business Statistics

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

Strong Positive
\( r \approx +0.9 \): points cluster tightly along an upward line
Strong Negative
\( r \approx -0.9 \): points cluster tightly along a downward line
Weak / None
\( r \approx 0 \): points scattered with no clear linear pattern
\( r = +0.92 \)
\( r = -0.88 \)
\( r = +0.08 \)

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.

Marketing
Ad budget vs. revenue: is the spending effective?
Operations
Production volume vs. unit cost: economies of scale?
HR
Training hours vs. performance scores: worth the investment?

The Correlation Coefficient \( r \)

1
Numerator: sum of the products of each pair's deviation from its mean: captures how \( x \) and \( y \) move together.
2
Denominator: product of total spreads in \( x \) and \( y \): scales the result to \([-1, +1]\).
3
Interpretation: \( |r| \) near 1 means strong linear fit; the sign tells direction.

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

If \( r = 0.90 \)
\( R^2 = 0.81 \): 81% of variation in \( y \) is explained by \( x \).
If \( r = 0.50 \)
\( R^2 = 0.25 \): only 25% explained: a weak model.

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

1
Plot the data as a scatter plot. Look for a linear pattern and check for outliers.
2
Compute \( r \). Confirm a strong enough linear relationship to justify a model.
3
Find \( b_1 \) and \( b_0 \). Write the regression equation \( \hat{y} = b_0 + b_1 x \).
4
Report \( R^2 \). Interpret the percentage of variance explained.
5
Check residuals. A good model has randomly scattered residuals with no curved pattern.

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 \).

Ad Spend ($1,000s) Sales ($1,000s) 1 2 3 4 5 6 7 8 20 30 40 50 60 \( \hat{y} = 21.0 + 3.80x \)

Interpreting the Results

1
Slope \( b_1 = 3.80 \): for each additional $1,000 in ad spend, predicted sales increase by $3,800.
2
Intercept \( b_0 = 21.0 \): with zero ad spend, the model predicts $21,000 in baseline sales.
3
\( R^2 = (0.95)^2 = 0.9025 \): about 90.25% of the variation in sales is explained by ad spend.

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:

Residual Plot (should look random) Predicted \( \hat{y} \) Residual Good: random scatter around zero

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.

\( x \) \( y \) Interpolation (safe) Extrapolation (risky) ?

Common Mistakes

✕ Correlation = Causation
A high \( r \) does not prove that \( x \) causes \( y \). Lurking variables may explain both.
✕ Ignoring Outliers
A single extreme point can dramatically inflate or deflate \( r \). Always check the scatter plot first.
✕ Extrapolating Wildly
Predicting outside the data range assumes the linear trend continues forever: it usually does not.
✕ Misreading \( R^2 \)
An \( R^2 \) of 0.36 does not mean "36% correlation." It means 36% of variance in \( y \) is explained by the model.
✕ Non-Linear Data
If the scatter plot shows a curve, a straight line is the wrong model. \( r \) only measures linear association.

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?