SECTION 1
Historical Context & Motivation
Humans have always looked for patterns in data, but for most of history we relied on intuition rather than mathematics. Is there a connection between how many hours you study and the grade you earn? Does temperature affect ice-cream sales? These questions feel simple, yet answering them rigorously required centuries of mathematical development. The story of correlation and regression begins in the 1800s, when scientists first tried to quantify how two measurements move together.
1805 • Legendre's Method of Least Squares
1886 • Galton Coins 'Regression'
1896 • Pearson's Correlation Coefficient
1970s–Today • Technology-Supported Analysis
The central question this topic addresses is deceptively straightforward: When two variables seem related, how do we measure the strength of that relationship and use it to make predictions? In IB Mathematics: Applications and Interpretation SL 4.2, you will learn how to answer this question using scatter plots, the correlation coefficient r, the regression line ŷ = ax + b, and residual analysis — all supported by technology.
SECTION 2
Core Principles & Definitions
Before diving into calculations, it is essential to build a clear vocabulary. The ideas below form the foundation of everything you will do with bivariate data — data sets that pair up two variables for each individual or observation.
Bivariate Data & Scatter Plots
Correlation Coefficient (r)
Line of Best Fit (Regression Line)
Residuals
Interpolation vs. Extrapolation
KEY TAKEAWAY
SECTION 3
Visual Explanation — The Scatter Plot & Regression Line
A scatter plot is the starting point for every correlation and regression analysis. The diagram below shows a bivariate data set with a regression line drawn through it. Notice how the data points cluster around the line, with some sitting above it (positive residuals) and others below (negative residuals). The vertical dashed segments illustrate the residuals themselves.
In the diagram, notice that the data points generally trend upward from left to right. This indicates a positive correlation: as hours of study increase, test scores tend to increase as well. The regression line captures this upward trend and provides a formula you can use for predictions. The residuals show you where the model is imperfect — no real-world data falls perfectly on a line. Examining whether residuals are randomly scattered (good) or show a curved pattern (bad) tells you whether a linear model is appropriate.
SECTION 4
Mathematical Framework
In IB Applications and Interpretation SL, you are expected to use your GDC (graphing display calculator) or approved technology to compute the values of r, a, and b. However, understanding the formulas helps you know what your calculator is doing and why the outputs make sense.
REGRESSION LINE (LEAST-SQUARES)
ŷ = predicted value of the dependent variable; a = slope (gradient) of the line; b = y-intercept (the value of ŷ when x = 0); x = value of the independent variable.
SLOPE OF REGRESSION LINE
Sₓᵧ = Σ(xᵢ − x̄)(yᵢ − ȳ) is the sum of the products of deviations; Sₓₓ = Σ(xᵢ − x̄)² is the sum of squared deviations of x. Your GDC computes these automatically.
PEARSON CORRELATION COEFFICIENT
Sᵧᵧ = Σ(yᵢ − ȳ)². The value of r always satisfies −1 ≤ r ≤ 1. A positive r means a positive linear trend; a negative r means a negative linear trend.
RESIDUAL
yᵢ = observed (actual) value; ŷᵢ = value predicted by the regression line at the same x. A residual of zero means the point sits exactly on the line.
IB Exam Tip
SECTION 5
Interpreting the Correlation Coefficient
One of the most common exam tasks is to describe the correlation between two variables. You need to state both the direction (positive or negative) and the strength (weak, moderate, or strong) of the correlation. The spectrum bar below gives you a visual reference for how to classify values of r.
Strength of Linear Correlation (r)
Correlation ≠ Causation
SECTION 6
Worked Example
A teacher records the number of absences (x) and the final exam score (y) for eight students. The data are shown below. Let's walk through a complete analysis using technology.
| Student | Absences (x) | Exam Score (y) |
|---|---|---|
| A | 2 | 88 |
| B | 5 | 74 |
| C | 3 | 82 |
| D | 8 | 60 |
| E | 1 | 92 |
| F | 6 | 68 |
| G | 4 | 78 |
| H | 7 | 65 |
Absences vs. Exam Score data
Finding and Interpreting the Regression Line
- 1
Step 1 — Enter Data into Your GDC
Enter the absences (x) into List 1 and the exam scores (y) into List 2 on your GDC. Make sure both lists have the same number of entries (8 in this case). - 2
Step 2 — Run Linear Regression
Use the statistics menu to perform linear regression (LinReg or equivalent). The GDC outputs: a = −4.37 (3 s.f.), b = 96.5 (3 s.f.), and r = −0.987 (3 s.f.).ŷ = −4.37x + 96.5, r = −0.987 - 3
Step 3 — Interpret the Slope
The slope a = −4.37 means that for each additional absence, the predicted exam score decreases by approximately 4.37 points. The negative slope reflects the negative correlation between absences and scores. - 4
Step 4 — Interpret the y-Intercept
The y-intercept b = 96.5 means that a student with zero absences would be predicted to score about 96.5 on the exam. This is within a reasonable range, so the intercept has a sensible real-world interpretation here. - 5
Step 5 — Interpret the Correlation Coefficient
Since r = −0.987, there is a very strong negative linear correlation between absences and exam scores. The value is very close to −1, which tells us the data points lie almost exactly along the regression line. - 6
Step 6 — Make a Prediction and Calculate the Residual
Predict the score for a student with 3 absences: ŷ = −4.37(3) + 96.5 = −13.11 + 96.5 = 83.4 (3 s.f.). The actual score for Student C (x = 3) is 82. The residual is: e = 82 − 83.4 = −1.4. The negative residual tells us the student scored slightly below the prediction.Predicted score = 83.4; Residual = −1.4 - 7
Step 7 — Assess Reliability of a Prediction
If someone asks you to predict the score for a student with 15 absences, be cautious! The data only goes up to x = 8. Predicting at x = 15 would be extrapolation and the result (ŷ = −4.37 × 15 + 96.5 = 31) may be unreliable because the linear trend might not hold that far.
SECTION 7
Strengths & Limitations of Linear Regression
Linear regression is one of the most widely used statistical tools in the world, but it is not perfect. Understanding when it works well and when it fails is just as important as knowing how to compute the regression line.
| Strengths | Limitations |
|---|---|
| Simple to compute and interpret — a single equation summarizes the relationship. | Only models linear relationships; curved patterns will be poorly described. |
| The correlation coefficient r gives a quick measure of strength and direction. | Sensitive to outliers — a single extreme point can dramatically shift the line. |
| Enables predictions (interpolation) within the data range with reasonable accuracy. | Extrapolation beyond the data range is unreliable and can produce nonsensical predictions. |
| Residual analysis helps diagnose whether the model is appropriate. | Correlation does not imply causation — lurking variables may create misleading associations. |
| Technology makes the computation nearly instantaneous on a GDC or spreadsheet. | Requires bivariate quantitative data — cannot be applied to categorical variables directly. |
Strengths vs. Limitations of Linear Regression
KEY TAKEAWAY
SECTION 8
Connection to Advanced Theory
The linear regression you learn in SL 4.2 is the foundation for more powerful techniques you may encounter in HL Mathematics or university statistics courses. The table below shows how the concepts you have learned relate to their advanced counterparts.
| SL 4.2 Concept | Advanced Extension |
|---|---|
| Simple linear regression (one x variable) | Multiple regression: ŷ = a₁x₁ + a₂x₂ + … + b, using several predictor variables simultaneously |
| Pearson's r for linear correlation | Coefficient of determination r² (the proportion of variance explained by the model); Spearman's rank correlation for non-linear monotonic relationships |
| Residuals (y − ŷ) checked visually | Formal residual analysis including tests for normality, homoscedasticity (constant variance), and independence |
| Line of best fit (linear model) | Non-linear regression models: quadratic, exponential, logarithmic, logistic, and polynomial curves fitted to data |
SL 4.2 vs. Advanced Statistics
The key idea connecting SL to higher-level work is that r² (the coefficient of determination) tells you what fraction of the variability in y is 'explained' by the model. For instance, if r = −0.987, then r² ≈ 0.974, meaning about 97.4% of the variation in exam scores can be explained by the number of absences. This powerful interpretation extends directly into university-level statistics and data science.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
In SL 4.2, you learned to analyse bivariate data using scatter plots to visualize relationships. The Pearson correlation coefficient (r) quantifies the direction and strength of a linear association on a scale from −1 to 1. Using technology (your GDC), you can find the least-squares regression line ŷ = ax + b, where the slope (a) tells you how much ŷ changes for each one-unit increase in x, and the y-intercept (b) gives the predicted value when x = 0.
Residuals (y − ŷ) measure how far each data point falls from the regression line and should be randomly scattered if a linear model is appropriate. Always interpret your results in context. Use interpolation for reliable predictions within the data range, and be cautious with extrapolation outside it. Finally, remember that correlation does not imply causation — lurking variables may create associations that do not reflect a direct cause-and-effect relationship.