From a number to a chance
Chapter 2 drew a line through the table and read off points per game, a number. Plenty of football questions are yes or no instead. Will the home side win? Will both teams score? Will there be more than 2.5 goals? For those we want a probability, something like "62% home win", and the model that gives one is logistic regression.
The data is every match Premier League has finished this season, 110 of them, one dot each on the board. The feature x is how much better the home team is: its goal difference per game minus the away team's. The label y is 1 when the home side won and 0 for a draw or an away win. 48 of the 110 ended in a home win.
The home wins sit along the top of the board and everything else along the bottom. Each square is the real share of home wins among matches with a similar gap. They climb from bottom left to top right, and a good model should run through them.
One shortcut: the goal differences come from today's table, which already contains these matches, so the feature peeks a little at the answer. Chapter 7, on datasets, explains why that flatters a model and how to avoid it.