5.10 Looking ahead
We can now compare two groups properly. We can also say exactly what such a comparison does not deliver, which turns out to be the more important lesson.
Two limitations remain, and both point the same way.
The first is that comparing two groups uses the data wastefully. Splitting the 680 students at the median attendance threw away everything we knew about how much each student attended, reducing a rich variable to a coin flip. A student who attended 32 classes and one who attended 20 were treated as identical.
The second is selection. The attendance groups differed in attendance and in everything correlated with it, and a two-sample test cannot separate them because it knows about nothing else.
Both problems have the same solution. Instead of splitting a variable in two and comparing averages, we can model the relationship between the whole of one variable and the whole of another — and, crucially, do so while holding other variables fixed.
That is regression, and it occupies the rest of this book.