Skip to content

Learn

Statistics, maths and machine learning, each one introduced through a football question.

Every intermediate piece, series by series, in part order.

How many shots until his hat-trick? The Negative Binomial distribution

The Geometric distribution waits for the first goal. The Negative Binomial waits for the third, or the fifth. It shows how long a hat-trick really takes, and it has a second job modelling goals that vary more than Poisson allows.

Intermediate Part 6 of Statistics Through Football

Eight from ten. Is he an 80% penalty taker? The Beta distribution

A striker scores 8 of his 10 penalties. Calling him an 80% taker is overconfident. The Beta distribution describes how sure we can really be about a probability, and how that changes as the evidence grows.

Intermediate Part 8 of Statistics Through Football

Will the third goal come before full time? The Gamma distribution

The Exponential distribution waits for one goal. The Gamma waits for several. It shows why a team that averages two goals a game gets its third before full time only about one match in three.

Intermediate Part 9 of Statistics Through Football

Why the average transfer fee misleads. The Log-Normal distribution

Transfer fees, wages and market values can't go below zero, cluster low and have a few enormous outliers. The Log-Normal distribution describes them, and shows why the average fee is a poor guide to a typical one.

Intermediate Part 12 of Statistics Through Football

Same style, different volume? The dot product and cosine similarity

Distance says how far apart two players' numbers are. Cosine similarity asks whether they point the same way, which compares playing style rather than volume. It only works once the stats are standardised.

Intermediate Part 4 of Linear Algebra Through Football

4-3-3 without the ball, 3-2-5 with it. Formations as transformations

A formation is a set of player positions, and the change from the defensive shape to the attacking one is a transformation. Measure it and you can see how far the team moves, how much it stretches, and which player's job is different.

Intermediate Part 7 of Linear Algebra Through Football

Who links the play? Passing networks as matrices

Write down who passes to whom and you have a matrix. Its rows and columns count passes made and received, and multiplying it by itself shows how the ball travels in two passes, who links defence to attack, and who plays the one-twos.

Intermediate Part 10 of Linear Algebra Through Football

Top at halfway. Who'll win the league? From beliefs to predictions

Take what we believe about every team, play the rest of the season thousands of times, and count who wins. Tested on 25 SPFL title races, the simulation's favourite won 20; the side top at halfway won 17.

Intermediate Part 5 of Bayesian Thinking Through Football

Three questions and a prediction. Decision trees

A decision tree predicts a match the way a pundit reasons, with a string of yes-or-no questions, and it learns which questions to ask from the data. On five SPFL test seasons two questions nearly match logistic regression; twelve fall apart.

Intermediate Part 9 of Machine Learning Through Football

Ask a hundred pundits. Random forests

One decision tree is jumpy, so grow a hundred, each on a slightly different set of matches, and average what they say. On five SPFL test seasons the forest fixes most of a single tree's wild guesses, and still finishes just behind logistic regression.

Intermediate Part 10 of Machine Learning Through Football

Learning from its mistakes. Gradient boosting

Start with a rough guess, look at what it got wrong, and fix a little of it with a small tree. Repeat a few hundred times. On five SPFL test seasons gradient boosting draws level with logistic regression, and shows where three numbers run out.

Intermediate Part 11 of Machine Learning Through Football

How does a model learn? Rolling downhill with gradient descent

Machine learning models learn by measuring how their error changes as they adjust a setting, then stepping downhill. That's the derivative at work. 25 SPFL seasons show it finding how much of last season's scoring carries into this one.

Intermediate Part 6 of Calculus Through Football

Where should he put it? Penalties and the Nash equilibrium

A penalty taker and a goalkeeper choose at almost the same moment, and any habit gets punished. Game theory says both should mix it up, and says exactly how often. The professionals turn out to do almost exactly that.

Intermediate Part 1 of Game Theory Through Football

Why don't keepers just stand still? The middle, the Panenka and three choices

Keepers almost never stay put for a penalty, and takers rarely go down the middle. Add the middle to the penalty game and the maths explains both, says how often each should happen, and shows why a perfect Panenka gets used less, not more.

Intermediate Part 2 of Game Theory Through Football

Why Gijón wasn't a prisoner's dilemma

In 1982 West Germany and Austria knew a 1–0 win for West Germany put them both through, and for 80 minutes nobody tried to change it. Game theory's most famous puzzle, the prisoner's dilemma, explains why deals fall apart. Gijón shows the other kind, the deal that needs no one to agree to it.

Intermediate Part 3 of Game Theory Through Football

How far forward should we push? Attack, defence and the price of a rule

Push more players forward and you score more, but you concede more too. Calculus finds the best setting, and when the board sets a limit on goals conceded, it puts a price on that limit, in points a season for every goal.

Intermediate Part 2 of Decision Science Through Football