Module 9 · Lesson 11 of 22
Correlation and regression laboratory
Learning objectives
- Calculate correlation and fit a simple linear regression in a free spreadsheet.
- Interpret slope, intercept and R² with units.
- Inspect residuals and avoid extrapolation.
Core idea
Correlation measures linear association. Simple linear regression estimates how the mean of Y changes per unit X and supports prediction inside the studied range only.
Spreadsheet lab
- Scatter Y = seam strength (N) vs X = stitches per inch (SPI).
- r = =CORREL(X,Y); note sign and magnitude.
- Slope b = =SLOPE(Y,X); intercept a = =INTERCEPT(Y,X); R² = =RSQ(Y,X).
- Predict: ŷ = a + b·x for x inside min(X)..max(X).
- Residuals column: =Y - (a + b*X); plot vs X and vs fitted.
Garment-factory example
For 40 knit-polo seams, r = 0.62 between SPI and strength; slope = 3.1 N per SPI, R² = 0.38. A useful positive trend but not a full explanation — fabric weight matters too.
Method
- Plot before fitting.
- Report slope with units (Y per X) and R².
- Check residuals; refit or stratify if patterns appear.
Common mistakes
- Interpreting correlation as causation.
- Extrapolating beyond the sampled X range.
- Ignoring nonlinear or grouped patterns in residuals.
Knowledge check
Pick one answer per question. Explanations appear after you submit.
1. Which function returns Pearson correlation between two ranges?
2. R² = 0.38 means:
Author: Sanjeewa Dehiwalage · Last reviewed: 2026-07-21