24  Relationships and Prediction

Module V compared groups. Every test in it needed the data divided into categories, with a measured outcome compared across them, and every one of them answered a question of the form “are these groups different?”

A great many questions are not of that form. Marketing spend and revenue, delivery time and satisfaction, floor space and footfall: two measured quantities, neither of which divides the data into groups, and a question about how they move together. Forcing such a question into the previous module by cutting one variable into bands is possible, and it discards most of what the variable knows.

This module takes those questions directly. Chapter 21 introduces correlation, which compresses the relationship between two measured variables into a single number, and spends as much time on what that number conceals as on what it reveals. Chapter 22 turns the same relationship into a line, which can do what a correlation cannot: say how much one variable changes per unit of the other, and predict.

Chapter 23 admits the third variable that Chapter 21 warned about, fitting several predictors at once so that each coefficient is read holding the others fixed, and watching the marketing effect of Chapter 22 collapse when store size joins the model. Chapter 24 then asks the question the output never answers by itself: whether any of it should be believed. It covers what the residuals show when an assumption fails, which single observations are quietly deciding the answer, what to do when the spread is not constant, and why a model that fits its own data beautifully is almost no evidence that it will fit anything else.

The shift is larger than it first appears. Up to here the output of an analysis has been a verdict, a p-value attached to a claim about groups. From here the output is a model: a description of how one quantity depends on others, which can be examined, criticised, and used on data it has never seen. That change brings its own obligations, and the chapters take them seriously.