SL 4.4 · Bivariate Associations
1. Scatter Plots and Pearson's Correlation Coefficient ($r$)
Bivariate data consists of pairs of measurements $(x, y)$. A scatter diagram visually illustrates the association between the independent (explanatory) variable $x$ and dependent (response) variable $y$.
- Pearson's Product-Moment Correlation Coefficient ($r$): Measures the strength and direction of the linear relationship between two continuous variables: $$-1 \le r \le 1$$
- Interpreting $r$:
- $r = 1$: Perfect positive linear correlation; $r = -1$: Perfect negative linear correlation.
- $|r| \ge 0.8$: Strong linear correlation.
- $0.5 \le |r| < 0.8$: Moderate linear correlation.
- $0 < |r| < 0.5$: Weak linear correlation; $r = 0$: No linear correlation.
- Correlation versus Causation: A strong correlation does not imply that changes in $x$ cause changes in $y$. A high $|r|$ may be driven by a confounding third variable (lurking variable) or coincidence.
Worked Example 1.1 · Correlation Interpretation
An environmental scientist records water temperature $T$ ($^\circ\text{C}$) and dissolved oxygen concentration $D$ ($\text{mg/L}$) across 12 alpine lakes, finding $r = -0.912$. Describe the correlation and evaluate whether increasing water temperature causes oxygen levels to drop.
- Evaluate $r = -0.912$: The sign is negative, and $|-0.912| > 0.8$.
Description: There is a strong negative linear correlation between water temperature and dissolved oxygen concentration. - Evaluate causation: Although physical chemistry shows that warmer water holds less dissolved gas, statistical correlation alone never proves causation; it indicates only a strong mathematical association.
Answer: Strong negative linear correlation; correlation alone does not prove causation.
SL 4.4 · Linear Modeling
2. The Least-Squares Regression Line of $y$ on $x$
The least-squares regression line of $y$ on $x$ minimizes the sum of the squared vertical distances (residuals $y_i - \hat{y}_i$) between the observed data points and the fitted line.
- Form of the Regression Line: $$y = ax + b \quad \text{or} \quad y = mx + c$$ where $a$ is the gradient (slope) representing the predicted change in $y$ per unit increase in $x$, and $b$ is the $y$-intercept.
- The Mean Point $(\bar{x}, \bar{y})$: The regression line always passes through the point of averages $(\bar{x}, \bar{y})$. Therefore: $$\bar{y} = a\bar{x} + b$$
- Direction of prediction: The regression line of $y$ on $x$ must ONLY be used to predict $y$ from a given $x$. You must never rearrange the equation to predict $x$ from $y$ (in the IB syllabus, predicting $x$ from $y$ requires the distinct regression line of $x$ on $y$).
Worked Example 1.2 · Mean Point and Regression Equation
A study finds that the regression line of test score $y$ on study hours $x$ is $y = 4.5x + 32$. The mean study time is $\bar{x} = 8\text{ hours}$. Calculate the mean test score $\bar{y}$.
- The regression line must pass through $(\bar{x}, \bar{y})$.
- Substitute $x = \bar{x} = 8$ into the equation: $$\bar{y} = 4.5(8) + 32 = 36 + 32 = 68$$
Answer: Mean test score $\bar{y} = 68$.
SL 4.4 · Estimation Validity
3. Interpolation versus Extrapolation
When using a regression model to make predictions, the reliability of the estimate depends on where the input value lies relative to the domain of observed data.
- Interpolation: Predicting a value of $y$ for an $x$-value that lies within the range of the original data $[x_{\min}, x_{\max}]$. If $|r|$ is strong and the trend is linear, interpolation is considered reliable.
- Extrapolation: Predicting a value of $y$ for an $x$-value that lies outside the range of observed data ($x < x_{\min}$ or $x > x_{\max}$). Extrapolation is considered unreliable because we have no evidence that the linear trend continues beyond the observed data.
Worked Example 1.3 · Mean Point & Regression Equation
The table shows study hours $x$ and exam scores $y$ for $8$ students. The mean study time is $\bar{x} = 12.5$ hours and the mean score is $\bar{y} = 68\%$. The gradient of the regression line of $y$ on $x$ is $2.4$.
(a) Find the equation of the regression line of $y$ on $x$. [3 marks]
(b) Interpret the value of the gradient in the context of the problem. [1 mark]
- Part (a): Use the mean point $(\bar{x}, \bar{y})$ property: $$y = ax + b \implies \bar{y} = a\bar{x} + b \quad [M1]$$ $$68 = 2.4(12.5) + b \implies 68 = 30 + b \implies b = 68 - 30 = 38 \quad [A1]$$ $$y = 2.4x + 38 \quad [A1]$$
- Part (b): Contextual interpretation of gradient $a = 2.4$: For each additional $1$ hour of study, the predicted exam score increases by an average of $2.4$ percentage points [R1].
Answers: (a) $y = 2.4x + 38$; (b) Each extra study hour increases expected score by $2.4\%$.
Worked Example 1.4 · Reliability of Estimation (Interpolation vs Extrapolation)
A study models vehicle stopping distance $d$ (metres) against initial speed $v$ ($\text{km/h}$) for speeds between $30 \le v \le 100$. The regression line is $d = 0.82v - 12.4$ with $r = 0.94$.
(a) Estimate the stopping distance for a car traveling at $70\text{ km/h}$. [2 marks]
(b) Estimate the stopping distance for a car traveling at $160\text{ km/h}$. [2 marks]
(c) Comment on the reliability of each estimate. [3 marks]
- Part (a): Estimate at $v = 70$: $$d = 0.82(70) - 12.4 = 57.4 - 12.4 = 45.0\text{ m} \quad [M1][A1]$$
- Part (b): Estimate at $v = 160$: $$d = 0.82(160) - 12.4 = 131.2 - 12.4 = 118.8\text{ m} \quad [M1][A1]$$
- Part (c): Reliability evaluation:
• The estimate for $70\text{ km/h}$ is an interpolation because $v = 70$ lies inside the experimental range $[30, 100]$. Given $r = 0.94$ (strong correlation), this estimate is reliable [R1].
• The estimate for $160\text{ km/h}$ is an extrapolation because $v = 160$ lies far outside the observed domain $[30, 100]$. Physical braking dynamics are non-linear (proportional to $v^2$), making this estimate unreliable [R1].
Answers: (a) $45.0\text{ m}$; (b) $118.8\text{ m}$; (c) (a) reliable (interpolation with high $r$); (b) unreliable (far extrapolation).
Worked Example 1.5 · Linear Coding Effect on Correlation
A dataset of heights $x$ and weights $y$ has correlation coefficient $r = 0.82$. The variables are transformed via $u = 2x - 10$ and $v = -4y + 50$.
(a) State the value of the correlation coefficient between $u$ and $v$. [2 marks]
(b) State the correlation coefficient between $u$ and $w = 3y - 5$. [1 mark]
- Part (a): Invariance and sign rule of Pearson's $r$:
Pearson's correlation is invariant under linear scaling by positive constants. Multiplying one variable by a negative constant reflects the relationship and reverses the sign [R1]:
$$\text{Multiplier for } x \text{ is } +2 > 0; \quad \text{Multiplier for } y \text{ is } -4 < 0.$$ $$r_{uv} = -r = -0.82 \quad [A1]$$ - Part (b): Correlation between $u$ and $w$:
Here both multipliers are positive ($+2$ and $+3$), so the sign does not change:
$$r_{uw} = r = +0.82 \quad [A1]$$
Answers: (a) $r_{uv} = -0.82$; (b) $r_{uw} = 0.82$.