CHAPTER 06 · STATISTICS & PROBABILITY
Correlation & regression
Progress stays on this device
papers AI SL chapter & section analysis
Your chapter
Use a scatter plot, correlation and regression together to make defensible predictions.
Read all chapter notes
6.1
Measuring correlation
Pearson’s product-moment correlation coefficient r measures the direction and strength of a linear association between paired numerical variables. It lies from −1 to 1; values near either end indicate a close straight-line pattern, while values near zero indicate little linear association.
Plot the data first. A curved pattern or influential unusual point can make r a poor summary of the relationship. Correlation is unchanged by adding constants to either variable and by multiplying by positive constants; multiplying one variable by a negative constant reverses its sign.
A correlation is not a regression gradient and does not measure a change in units. It does not establish a causal mechanism. Quote its value to the requested precision and interpret direction and linear strength in the particular variables; avoid calling zero correlation proof of independence.
Watch out: A low Pearson correlation can conceal a strong curved relationship; is not a general independence test.
Worked example
Paired measurements have , and . Find Pearson’s r.
- Compute .
- Therefore .
6.2
The line of best fit
A least-squares regression line of y on x predicts the response y from a known predictor x. It minimizes the sum of squared vertical residuals and passes through the point . A positive or negative gradient describes the modelled change in the response for each unit increase in the predictor.
Use a GDC to fit the paired observations and retain the full stored coefficients for predictions. Report the equation using the requested variables and units. Its intercept is the predicted response at , but that interpretation may be unrealistic when zero lies outside the relevant domain.
Choose the regression direction according to what is being predicted. The regression of x on y generally differs from rearranging the regression of y on x. Reversing the two fitted directions only gives the same geometric line in a perfect linear fit.
Watch out: Do not swap the x and y lists or round the coefficients before a later calculation.
Worked example
A regression line of y on x has , , and . Find its slope and intercept, in that order.
- The slope is .
- The point lies on the line, so the intercept is .
6.3
Interpreting the regression line
Use the units and context to explain a fitted gradient: it is the predicted change in the response for an increase of one predictor unit. The intercept describes the model at input zero; explain if this is outside the observed range or meaningful domain.
Interpolation predicts at an input within the observed range. Extrapolation extends beyond that evidence and assumes the relationship continues; it is usually less reliable. A high correlation does not remove this concern, nor does it guarantee a useful prediction for every individual.
A residual equals observed minus predicted response. Positive residuals put observations above the fitted line; negative residuals put them below. A useful model should also be checked for systematic residual patterns, influential observations, sensible units and practical restrictions on its outputs.
Watch out: A fitted model can produce an exact calculated number without that prediction being reliable or physically possible.
Worked example
A model predicts cooling time minutes. For one object, kg and observed cooling time is 32 minutes. Find the residual.
- The predicted cooling time is minutes.
- Residual= minutes; the object took longer than predicted.
