Study Guide

Bivariate data: correlation and regression

IB Mathematics Analysis and Approaches SL· 12 min read

1. Correlation Classification for Bivariate Datasets★☆☆☆☆⏱ 3 min

Bivariate data consists of paired (x,y) observations, where x is the independent explanatory variable and y is the dependent response variable. Correlation describes the linear association between these two variables, with no inherent assumption of causal relationship.

📘 Definition

Pearson's Correlation Coefficient

rr

A value bounded between -1 and 1 that quantifies linear association: positive values indicate variables increase together, negative values indicate one variable decreases as the other increases.

  • 0 ≤ |r| < 0.3: Very weak or no linear association

  • 0.3 ≤ |r| < 0.7: Moderate linear association

  • 0.7 ≤ |r| ≤ 1: Strong linear association

📐 Worked Example

A dataset of 12 students records revision time (hours) and exam score (percentage). The calculated r value is -0.82. Classify the association between the two variables.

  1. 1

    Step 1: Check the sign of r. The value is negative, so as revision time increases, exam score tends to decrease.

  2. 2

    Step 2: Compare the magnitude of r to classification thresholds. |-0.82| = 0.82, which falls in the 0.7 to 1 range.

  3. 3

    Step 3: Final classification: Strong negative linear association between revision time and exam score.

✓ Quick check
  1. Which r value represents the strongest negative linear association?

    • -0.91

    • -0.23

    • 0

    • 0.76

    Reveal answer
    -0.91

    The largest magnitude negative r value indicates the strongest negative linear relationship.

Exam tip:

IB mark schemes require you to state both direction and strength when interpreting r to earn full marks.

2. Calculating Pearson's r★★☆☆☆⏱ 3 min

You can calculate r manually using the sum of products formula, or directly output the value from your GDC after inputting paired x and y datasets. Manual calculation is rarely required in exams, but you must understand the formula structure.

r=nxyxy[nx2(x)2][ny2(y)2]r = \frac{n\sum xy - \sum x \sum y}{\sqrt{\left[n\sum x^2 - \left(\sum x\right)^2\right]\left[n\sum y^2 - \left(\sum y\right)^2\right]}}
📐 Worked Example

Calculate r for the 3 paired data points: (1, 3), (2, 5), (3, 7)

  1. 1

    Step 1: Compute all required sums: n=3, Σx=6, Σy=15, Σxy=34, Σx²=14, Σy²=83

  2. 2

    Step 2: Substitute into the formula: Numerator = 334 - 615 = 102 - 90 = 12

  3. 3

    Step 3: Denominator = sqrt([314 - 36][383 - 225]) = sqrt([6][24]) = sqrt(144) = 12

  4. 4

    Step 4: r = 12 / 12 = 1, representing perfect positive linear association.

3. Least-Squares Linear Regression Line★★★☆☆⏱ 4 min

The regression line of y on x is the unique linear model that minimizes the sum of squared vertical distances between each data point and the line. It passes through the mean point (\bar{x}, \bar{y}) of the dataset.

🔬 Derivation
Goal:

Find the slope a of the regression line y = ax + b

Starting from:

Minimize sum of squared residuals S = Σ(y_i - ax_i - b)^2

  1. 1

    Differentiate S with respect to b, set to zero to find b = \bar{y} - a\bar{x}

  2. 2

    Substitute b back into S, differentiate with respect to a, set to zero

  3. 3

    Rearrange to get a = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2}

Result:

The slope a represents the predicted change in y for every 1 unit increase in x.

📐 Worked Example

Given n=10, Σx=60, Σy=420, Σxy=3200, Σx²=500, find the full regression line equation

  1. 1

    Step 1: Calculate slope a: a = (103200 - 60420)/(10*500 - 60²) = (32000 - 25200)/(5000 - 3600) = 6800 / 1400 ≈ 4.86

  2. 2

    Step 2: Calculate means: \bar{x} = 60/10 = 6, \bar{y} = 420/10 = 42

  3. 3

    Step 3: Calculate intercept b: b = 42 - 4.86*6 ≈ 12.8

  4. 4

    Step 4: Final regression equation: y = 4.86x + 12.8

4. Prediction Validity and Limitations★★☆☆☆⏱ 2 min

Predictions made for x values inside the range of your original observed dataset are called interpolation, and are statistically reliable. Predictions made outside this range are extrapolation, and are almost always unreliable, as the linear trend does not hold for unobserved values.

📐 Worked Example

The regression line for age (x, years) vs height (y, cm) for 5-12 year olds is y = 5.2x + 85. The observed x range is 5 to 12 years. Predict height for x=9 and x=30, comment on validity.

  1. 1

    Step 1: For x=9: y = 5.2*9 + 85 = 131.8 cm. This is interpolation inside the observed range, so prediction is valid.

  2. 2

    Step 2: For x=30: y = 5.2*30 + 85 = 241 cm. This is extrapolation far outside the 5-12 age range, so prediction is completely invalid.

5. Common Pitfalls

Wrong move:

Assuming strong correlation implies direct causation between variables

Why:

Correlation only measures linear association, and cannot confirm causal direction or rule out confounding variables

Correct move:

Explicitly state that correlation does not prove causation, and name possible third variables that could explain the trend

Wrong move:

Using the x on y regression line to predict y values

Why:

The two distinct regression lines minimize different sets of deviations, and produce incorrect predictions if swapped

Correct move:

Always confirm which variable is the dependent response (y) before generating your regression model

Wrong move:

Stating r=0 means no relationship exists between the two variables

Why:

r only measures linear association, and strong non-linear relationships can exist even when r equals 0

Correct move:

Note that r=0 means no linear association, and inspect a scatter plot to check for curved non-linear patterns

Wrong move:

Extrapolating far outside the observed x range of the original dataset

Why:

The observed linear trend in the measured range almost never continues indefinitely for unobserved values

Correct move:

Clearly state that predictions outside the original data range are not statistically valid

Wrong move:

Rounding r to 1 or 2 decimal places in final answers

Why:

IB mark schemes require 3 significant figures for r values to award full credit

Correct move:

Report all r values directly from your GDC to 3 significant figures without extra rounding

6. Quick Reference Cheatsheet

Metric

Formula / GDC Input

Interpretation Rule

Pearson's r

Input paired data, run LinReg on GDC

-1 ≤ r ≤ 1, sign = direction, magnitude = strength

Regression slope a

a = (nΣxy - ΣxΣy)/(nΣx² - (Σx)²)

Change in y for every 1 unit increase in x

Regression intercept b

b = \bar{y} - a\bar{x}

Predicted y value when x = 0

Valid prediction

x within original data range

Interpolation is statistically reliable

Invalid prediction

x outside original data range

Extrapolation is not recommended

When this came up on past exams

AI-estimated based on syllabus patterns — cross-check with official past papers for accuracy. Use only as revision-focus signals.

  • 2024 · Paper 2

    Correlation calculation and interpretation

  • 2023 · Paper 1

    Regression line prediction task

  • 2022 · Paper 2

    Limitations of extrapolation

What's Next

Mastering correlation and linear regression is a high-yield skill for your IB Math AA SL exam, as these concepts appear in 6-8 mark Paper 2 questions. Make sure you can calculate and interpret Pearson's product-moment correlation coefficient r, find the regression line of y on x, and use it for prediction while recognising the dangers of extrapolation and of confusing correlation with causation. Work through full exam-style bivariate data practice questions to eliminate common mark-loss points. Note that chi-squared tests for independence — often confused with this topic — belong to Math AI, not AA, so they are not required for AA SL. This content also directly supports your IA if you choose to run a statistical analysis of paired experimental or survey data.