I'll generate a complete, self-contained HTML slide deck following the design system exactly. ```html Correlation & Regression — IB Mathematics AI
01 / 20

Correlation &
Regression

Measuring how two variables move together with Pearson's \( r \), fitting a line of best fit, and interpreting slope, intercept, and residuals.

IB Mathematics: Applications & Interpretation

What Is Correlation?

Correlation measures the strength and direction of a linear relationship between two numerical variables, \( x \) and \( y \). We visualise it with a scatter plot: each point is one observation \( (x, y) \).

Direction & Strength

Positive Negative No correlation

Pearson's \( r \)

The Pearson correlation coefficient \( r \) puts strength and direction into a single number computed by technology (GDC):

The sign of \( r \) gives the direction; the size of \( |r| \) gives the strength.

Interpreting \( |r| \)

0 0.25 0.50 0.75 1 weak moderate strong
Weak
\( |r| < 0.25 \): little linear pattern.
Moderate
\( 0.25 \leq |r| < 0.75 \): clear but loose trend.
Strong
\( |r| \geq 0.75 \): points hug a line.

The Regression Line

When correlation is reasonably strong, we fit the least-squares regression line of \( y \) on \( x \):

It always passes through the mean point \( (\bar{x}, \bar{y}) \).

Residuals: The Vertical Gaps

y x line of best fit residual

Correlation ≠ Causation

A strong \( r \) shows two variables move together, but does not prove that one causes the other. Three possibilities exist:

1
Direct cause: \( x \) really does affect \( y \).
2
Hidden (confounding) variable: a third factor drives both, e.g. ice-cream sales and drownings both rise with hot weather.
3
Coincidence: the pattern is pure chance, especially with small data sets.

Reading Slope & Intercept

Slope \( a \)
The predicted change in \( y \) for each 1-unit increase in \( x \). Always state units, e.g. "kg per cm".
Intercept \( b \)
The predicted value of \( y \) when \( x = 0 \). Only meaningful if \( x = 0 \) is realistic in context.

Using Your GDC: Step by Step

1
Enter data into two lists, one for \( x \) and one for \( y \).
2
Plot a scatter diagram and look at the shape: is it roughly linear?
3
Run linear regression to get \( r \), the slope \( a \), and intercept \( b \).
4
Interpret \( r \): describe direction and strength in context.
5
Predict by substituting \( x \) into \( y = ax + b \), staying within the data range.

Example 1: Interpreting \( r \)

A study of 8 students gives hours studied \( x \) and test score \( y \). The GDC reports \( r = 0.91 \) and the line \( y = 6.2x + 41 \).

Example 2: Predicting

Using \( y = 6.2x + 41 \), predict the score for a student who studies 5 hours. The data ranged from 1 to 9 hours.

Example 3: Residual

A student who studied 5 hours actually scored 78. The line predicts 72. Find and interpret the residual.

Common Mistakes

✕ Assuming causation
A high \( r \) never proves \( x \) causes \( y \).
✕ Extrapolating
Predicting far outside the data range is unreliable.
✕ Misreading the intercept
\( b \) is meaningless when \( x = 0 \) is impossible.
✕ Using \( r \) for curves
\( r \) only measures linear association.

Quick Summary

Correlation \( r \) Regression \( y=ax+b \)
PurposeMeasure linear associationModel & predict \( y \)
OutputA number in \( [-1, 1] \)Slope \( a \), intercept \( b \)
Sign meaningDirection of trendSign of slope \( a \)
Best whenAlways describes spread\( |r| \) is reasonably strong

Question 1 of 5

A data set gives \( r = -0.88 \). Which best describes the relationship?

Question 2 of 5

For \( y = 3.5x + 20 \), what does the slope \( 3.5 \) mean?

Question 3 of 5

A point lies below the regression line. Its residual is:

Question 4 of 5

Ice-cream sales and drowning incidents have \( r = 0.85 \). The best conclusion is:

Question 5 of 5

Using \( y = 2x + 5 \), predict \( y \) when \( x = 8 \).

``` I've produced a complete, self-contained 20-slide deck covering Correlation & Regression for IB Mathematics AI. It follows the design system exactly: the mandatory CSS template, semantic HTML, KaTeX for all math (titles, body, choices, feedback), generously-sized SVG diagrams, color-coded callouts matching diagram colors, the accordion mobile pattern, full keyboard/touch navigation, and single-attempt MCQ assessment with "✓ Correct!" prepended feedback.