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.

  1. 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.
  2. 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}$.

  1. The regression line must pass through $(\bar{x}, \bar{y})$.
  2. 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.
Explanatory variable (x) Response (y) x_min x_max ← INTERPOLATION ZONE (Reliable) → EXTRAPOLATION (Unreliable) → y = ax + b Mean Point (x̄, ȳ) Vertical Residual (y_i - ŷ_i) Fig 4.3: Least-Squares Regression Line passing through (x̄, ȳ) with Vertical Residuals
Figure 4.3: The least-squares regression line minimizes $\sum(y_i - \hat{y}_i)^2$, passes through $(\bar{x}, \bar{y})$, and supports reliable interpolation only within $[x_{\min}, x_{\max}]$.

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]

  1. 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]$$
  2. 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]

  1. Part (a): Estimate at $v = 70$: $$d = 0.82(70) - 12.4 = 57.4 - 12.4 = 45.0\text{ m} \quad [M1][A1]$$
  2. Part (b): Estimate at $v = 160$: $$d = 0.82(160) - 12.4 = 131.2 - 12.4 = 118.8\text{ m} \quad [M1][A1]$$
  3. 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]

  1. 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]$$
  2. 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$.

Topic 4.4 Practice Exercises

10 tiered problems covering Pearson's $r$, scatter diagrams, least-squares line of $y$ on $x$, mean points, and prediction validity.

Question 1

State the strength and direction of the linear correlation represented by each correlation coefficient:
(a) $r = 0.88$
(b) $r = -0.42$
(c) $r = -0.96$

Show Step-by-Step Solution

Part (a): $r = 0.88$ represents a strong positive linear correlation ($0.88 \ge 0.8$).

Part (b): $r = -0.42$ represents a weak negative linear correlation ($|-0.42| < 0.5$).

Part (c): $r = -0.96$ represents a strong negative linear correlation ($|-0.96| \ge 0.8$).

Final Answer: (a) Strong positive; (b) Weak negative; (c) Strong negative.

Question 2

The regression line of weekly gym visits $y$ on distance from home $x$ (km) is given by $y = -0.45x + 5.2$ for $1 \le x \le 10$.
(a) Predict the number of weekly visits for a member living $4\text{ km}$ away.
(b) State whether this prediction is an interpolation or an extrapolation, and comment on its reliability.

Show Step-by-Step Solution

Part (a): Substitute $x = 4$:

$$y = -0.45(4) + 5.2 = -1.8 + 5.2 = 3.4\text{ visits}$$

Part (b): Since $4\text{ km}$ lies within the observed domain $[1, 10]\text{ km}$, this is an interpolation and is therefore considered reliable.

Final Answer: (a) 3.4 visits; (b) Interpolation, reliable.

Question 3

The mean point of a bivariate dataset is $(\bar{x}, \bar{y}) = (14, 48)$. The gradient of the regression line of $y$ on $x$ is $2.5$. Find the complete equation of the regression line of $y$ on $x$.

Show Step-by-Step Solution

Step 1: The regression line has form $y = ax + b$ with $a = 2.5$.

Step 2: Use the property that the line passes through $(\bar{x}, \bar{y})$:

$$\bar{y} = a\bar{x} + b \implies 48 = 2.5(14) + b$$ $$48 = 35 + b \implies b = 48 - 35 = 13$$

Final Answer: $y = 2.5x + 13$

Question 4

Explain what the gradient $a = -0.45$ in the regression equation $y = -0.45x + 5.2$ represents in real-world terms.

Show Step-by-Step Solution

Interpretation: For every additional 1 kilometer increase in distance from home to the gym, the predicted number of weekly visits decreases by an average of $0.45$.

Final Answer: An average decrease of 0.45 visits per additional kilometer.

Question 5

A botanist measures the height $h$ (cm) of 8 plants after receiving varying amounts of fertilizer $f$ (grams), where $2 \le f \le 12$. The regression line is $h = 3.8f + 14.2$, with $r = 0.94$.
(a) Estimate the height of a plant given $8\text{ g}$ of fertilizer.
(b) Estimate the height of a plant given $35\text{ g}$ of fertilizer.
(c) Compare the reliability of your answers to parts (a) and (b).

Show Step-by-Step Solution

Part (a): $f = 8 \implies h = 3.8(8) + 14.2 = 30.4 + 14.2 = 44.6\text{ cm}$.

Part (b): $f = 35 \implies h = 3.8(35) + 14.2 = 133 + 14.2 = 147.2\text{ cm}$.

Part (c): Reliability comparison:
• The estimate in (a) is an interpolation because $f = 8$ lies inside the experimental range $[2, 12]$. Given $r = 0.94$ (strong positive), this estimate is highly reliable.
• The estimate in (b) is an extrapolation because $f = 35$ lies far beyond the experimental range. In biological systems, excessive fertilizer may cause toxicity or burns rather than continuous linear growth. Thus, (b) is completely unreliable.

Final Answer: (a) $44.6\text{ cm}$; (b) $147.2\text{ cm}$; (c) (a) is reliable (interpolation with high $r$); (b) is unreliable (far extrapolation).

Question 6

A study of 100 cities finds a strong positive correlation ($r = 0.87$) between the number of coffee shops $c$ and the number of library books borrowed $b$.
(a) A journalist writes: "Drinking coffee increases literacy and encourages reading." Explain why this conclusion is flawed.
(b) Suggest a plausible lurking variable that explains the observed correlation.

Show Step-by-Step Solution

Part (a): Flawed causal claim:
Correlation does not imply causation. A high positive correlation between two variables only measures association and does not demonstrate that coffee consumption directly stimulates book reading.

Part (b): Lurking variable:
City population size: Larger cities have more residents, and therefore naturally have both more coffee shops and more library visitors/book loans. Total population is the confounding common cause.

Final Answer: (a) Correlation does not imply causation; (b) City population size.

Question 7

The regression line of $y$ on $x$ for a dataset of 10 points is $y = 1.6x - 4$.
(a) Given $\sum x = 50$, find $\sum y$.
(b) A student wants to predict $x$ when $y = 20$. They rearrange the formula: $x = \frac{20 + 4}{1.6} = 15$. Explain why this calculation is mathematically invalid in the context of regression modeling.

Show Step-by-Step Solution

Part (a): Find $\sum y$:
Mean $\bar{x} = \frac{\sum x}{n} = \frac{50}{10} = 5$.
Since $(\bar{x}, \bar{y})$ lies on the regression line:
$$\bar{y} = 1.6(5) - 4 = 8 - 4 = 4$$ $$\sum y = n\bar{y} = 10 \times 4 = 40$$

Part (b): Why rearranging is invalid:
The regression line of $y$ on $x$ was derived by minimizing the sum of squared vertical residuals $\sum(y_i - \hat{y}_i)^2$, treating $x$ as an exact known input. To predict $x$ from $y$, one must minimize the sum of squared horizontal residuals $\sum(x_i - \hat{x}_i)^2$, which produces a completely different line (the regression line of $x$ on $y$). Rearranging $y$ on $x$ does not yield the least-squares predictor for $x$.

Final Answer: (a) $\sum y = 40$; (b) Rearranging is invalid because regression of $y$ on $x$ minimizes vertical residuals, not horizontal residuals.

Question 8

Two variables $u$ and $v$ are transformed from raw data $x$ and $y$ via $u = x + 10$ and $v = 3y$. The original correlation coefficient between $x$ and $y$ is $r_{xy} = 0.72$.
(a) Find the correlation coefficient $r_{uv}$ between $u$ and $v$.
(b) What would the correlation coefficient be if $v = -3y$?

Show Step-by-Step Solution

Part (a): Invariance under positive linear transformations:
Pearson's $r$ is scale- and translation-invariant under positive multipliers ($a > 0$ and $c > 0$):
Here $u = 1x + 10$ (shift by $+10$, scale by $+1$) and $v = 3y + 0$ (scale by $+3$). Both scale factors are positive.
Therefore, $r_{uv} = r_{xy} = 0.72$.

Part (b): Effect of negative scale factor:
If $v = -3y$, the scale factor for $y$ is negative ($-3 < 0$), which reflects the association across the vertical axis.
Therefore, the correlation reverses direction: $r_{uv} = -r_{xy} = -0.72$.

Final Answer: (a) $r_{uv} = 0.72$; (b) $r_{uv} = -0.72$.

Question 9

The table shows the flight altitude $a$ (in km) and ambient temperature $T$ ($^\circ\text{C}$) recorded by a weather balloon:

Altitude $a$ (km)1.02.54.06.08.510.0
Temperature $T$ ($^\circ\text{C}$)8.0-1.5-11.0-24.0-40.5-50.0

(a) Calculate the mean altitude $\bar{a}$ and mean temperature $\bar{T}$.
(b) Given that the regression line of $T$ on $a$ has gradient $-6.45$, determine its equation in the form $T = ma + c$.
(c) Predict the temperature at an altitude of $5.0\text{ km}$ and justify its validity.
(d) Predict the altitude at which the temperature reaches $0^\circ\text{C}$, and state the limitation of using this model.

Show Step-by-Step Solution

Part (a): Means:
$$\sum a = 1.0 + 2.5 + 4.0 + 6.0 + 8.5 + 10.0 = 32.0 \implies \bar{a} = \frac{32.0}{6} = 5.333\text{ km}$$ $$\sum T = 8.0 - 1.5 - 11.0 - 24.0 - 40.5 - 50.0 = -119.0 \implies \bar{T} = \frac{-119.0}{6} \approx -19.833^\circ\text{C}$$

Part (b): Regression equation:
Gradient $m = -6.45$. Line passes through $(\bar{a}, \bar{T})$: $$\bar{T} = m\bar{a} + c \implies -19.833 = -6.45\left(\frac{32}{6}\right) + c$$ $$-19.833 = -34.40 + c \implies c = 34.40 - 19.833 = 14.567 \approx 14.6$$ $$T = -6.45a + 14.6$$

Part (c): Prediction at $a = 5.0\text{ km}$:
$$T = -6.45(5.0) + 14.57 = -32.25 + 14.57 = -17.68 \approx -17.7^\circ\text{C}$$ Valid because $5.0\text{ km}$ is within the observed interval $[1.0, 10.0]$ (interpolation) where atmospheric temperature decreases linearly with altitude (lapse rate).

Part (d): Predicting altitude from $T = 0^\circ\text{C}$:
If using the rearranged formula as an approximation: $$0 = -6.45a + 14.57 \implies a = \frac{14.57}{6.45} \approx 2.26\text{ km}$$ Limitation: This uses the regression line of $T$ on $a$ in reverse; strictly, the regression line of $a$ on $T$ should be used to predict altitude from a given temperature.

Final Answer: (a) $\bar{a} = 5.33\text{ km}, \bar{T} = -19.8^\circ\text{C}$; (b) $T = -6.45a + 14.6$; (c) $-17.7^\circ\text{C}$ (valid interpolation); (d) $\approx 2.26\text{ km}$ (limited by reverse regression).

Question 10

The relationship between microbial population $P$ and time $t$ (hours) is hypothesized to follow the exponential model $P = A b^t$.
(a) Show that taking the natural logarithm transforms this model into a linear relation $Y = mt + c$, stating $Y, m,$ and $c$ in terms of $P, A,$ and $b$.
(b) A regression analysis of $\ln P$ on $t$ yields $\ln P = 0.42t + 3.50$. Find the values of $A$ and $b$ to 3 significant figures.
(c) Estimate the population at $t = 5\text{ hours}$.

Show Step-by-Step Solution

Part (a): Logarithmic linearization:
Take $\ln$ of both sides: $$\ln P = \ln(A b^t) = \ln A + \ln(b^t) = \ln A + t\ln b$$ Let $Y = \ln P$, $m = \ln b$, and $c = \ln A$: $$Y = mt + c$$

Part (b): Find $A$ and $b$:
Comparing with $\ln P = 0.42t + 3.50$:
$c = \ln A = 3.50 \implies A = e^{3.50} \approx 33.115 \approx 33.1$.
$m = \ln b = 0.42 \implies b = e^{0.42} \approx 1.52196 \approx 1.52$.

Part (c): Estimate at $t = 5$:
Method 1: $\ln P = 0.42(5) + 3.50 = 2.10 + 3.50 = 5.60 \implies P = e^{5.60} \approx 270.4 \approx 270$.
Method 2: $P = 33.115 \times (1.522)^5 \approx 270$.

Final Answer: (a) $Y = \ln P, m = \ln b, c = \ln A$; (b) $A \approx 33.1, b \approx 1.52$; (c) $P \approx 270$ microbes.

IB Formula Booklet References (Topic 4)

Pearson's Product-Moment Correlation Coefficient ($r$):

$$r = \frac{s_{xy}}{s_x s_y}$$

Equation of Regression Line of $y$ on $x$:

$$y - \bar{y} = \frac{s_{xy}}{s_x^2}(x - \bar{x})$$

Must-Memorize Properties

Mean Point Property:

$$\bar{y} = a\bar{x} + b \quad \text{(The regression line ALWAYS passes through } (\bar{x}, \bar{y})\text{)}$$

Correlation Range & Symmetry:

$$-1 \le r \le 1, \quad r_{xy} = r_{yx}$$

Prediction Reliability:

$$\text{Interpolation } (x \in [x_{\min}, x_{\max}]) \implies \text{Reliable}; \quad \text{Extrapolation } (x \notin [x_{\min}, x_{\max}]) \implies \text{Unreliable}$$

Critical IB Examination Pitfalls

  • Rearranging the Line of $y$ on $x$ to Predict $x$: NEVER solve for $x$ by rearranging $y = ax + b$. The regression of $y$ on $x$ minimizes vertical residuals $\sum(y - \hat{y})^2$. To predict $x$ from $y$, you must use the regression line of $x$ on $y$ (which minimizes horizontal residuals).
  • Confusing Correlation with Causation: Stating that "an increase in $x$ causes $y$ to increase" will lose reasoning marks ($R0$). Use words like "associated with" or "tends to increase".
  • Extrapolating Beyond the Data Range: Always check if the input $x$ is between $x_{\min}$ and $x_{\max}$. If not, explicitly state: "This is an extrapolation and therefore unreliable because the trend may not remain linear."
  • GDC Diagnostics Off: If your calculator displays $a$ and $b$ but does not show $r$ or $r^2$, you must turn "DiagnosticON" in the catalog or mode settings.

Topic 4.4 Diagnostic Mini Test

Section A: 4 Diagnostic MCQs with immediate feedback. Section B: 2 Exam-style Free Response Questions with full markschemes.

Section A: Diagnostic Multiple Choice

Question 1: Which value of Pearson's correlation coefficient $r$ represents the strongest linear association?

Question 2: The regression line of $y$ on $x$ for a dataset is $y = 2.4x - 1.8$. Which point must lie on this line?

Question 3: The observed domain for $x$ in a study is $[12, 45]$. Using the regression line of $y$ on $x$ to estimate $y$ when $x = 60$ is an example of:

Question 4: If every $x$-value is multiplied by $2$ and every $y$-value has $5$ added to it, how does Pearson's $r$ change?

Section B: Examination-Style Free Response Questions

Question 5 (6 marks)

The fuel efficiency $F$ (in km/L) and engine capacity $C$ (in Litres) for 8 hybrid cars are recorded, where $1.2 \le C \le 2.5$. The regression line of $F$ on $C$ is $F = -4.2C + 24.8$, and $r = -0.89$.
(a) Describe the correlation between engine capacity and fuel efficiency. [2 marks]
(b) Predict the fuel efficiency of a car with engine capacity $1.8\text{ L}$. [2 marks]
(c) A student uses the equation to calculate that a car with $C = 6.0\text{ L}$ has fuel efficiency $F = -0.4\text{ km/L}$. Comment on the validity of this result. [2 marks]

Show Full Markscheme

(a) Correlation description:
Since $r = -0.89$, there is a strong negative linear correlation between engine capacity and fuel efficiency. [A1 A1]

(b) Prediction:
Substitute $C = 1.8$:
$F = -4.2(1.8) + 24.8 = -7.56 + 24.8 = 17.24 \approx 17.2\text{ km/L}$. [M1 A1]

(c) Validity critique:
• $C = 6.0$ is an extrapolation far beyond the observed range $[1.2, 2.5]$. [R1]
• A negative fuel efficiency ($F < 0$) is physically impossible in the real world. [R1]

Question 6 (7 marks)

A company analyzes weekly advertising expenditure $x$ (in hundreds of dollars) and weekly sales revenue $y$ (in thousands of dollars) over 12 weeks.
Summary data: $\sum x = 72, \quad \sum y = 144, \quad r = 0.92$.
The gradient of the regression line of $y$ on $x$ is $1.35$.
(a) Find the coordinates of the mean point $(\bar{x}, \bar{y})$. [2 marks]
(b) Find the equation of the regression line of $y$ on $x$ in the form $y = ax + b$. [2 marks]
(c) Interpret the value of the gradient $a = 1.35$ in context. [1 mark]
(d) Explain why a high value of $r = 0.92$ does not necessarily prove that increasing advertising spending causes revenue to increase. [2 marks]

Show Full Markscheme

(a) Mean point coordinates:
$\bar{x} = \frac{72}{12} = 6$. [A1]
$\bar{y} = \frac{144}{12} = 12$. [A1]
Mean point is $(6, 12)$.

(b) Regression equation:
Line passes through $(6, 12)$ with gradient $a = 1.35$:
$12 = 1.35(6) + b \implies 12 = 8.1 + b \implies b = 3.9$. [M1]
Equation: $y = 1.35x + 3.9$. [A1]

(c) Gradient interpretation:
For each additional $\$100$ spent on advertising, weekly sales revenue is predicted to increase by an average of $\$1350$ ($1.35$ thousand dollars). [A1]

(d) Causation vs correlation:
Correlation measures linear association, not causation. [R1]
External factors such as seasonal market demand, promotional campaigns, or competitor actions could simultaneously drive higher advertising spend and higher sales. [R1]