Statistics, maths and machine learning, each one introduced through a football question.
Every beginner piece, series by series, in part order.
A penalty has two outcomes and nothing in between. That simple idea, the Bernoulli trial, is the building block of expected goals and of most football statistics.
Beginner
Part 1 of Statistics Through Football
One penalty is a Bernoulli trial. Five penalties, each with the same chance, is the Binomial distribution, and it shows why missing one in five is normal, not a slump.
Beginner
Part 2 of Statistics Through Football
A team averages two goals a game. How likely is it to score exactly three? The Poisson distribution turns an average into a probability for every score, and it sits underneath most football prediction models.
Beginner
Part 3 of Statistics Through Football
Poisson counts goals. The Exponential distribution times the wait between them, and shows why "we're due a goal" isn't how probability works.
Beginner
Part 4 of Statistics Through Football
A striker scores with one shot in five. How many shots until his first goal? The Geometric distribution answers it, and shows why a three-match drought is often just bad luck.
Beginner
Part 5 of Statistics Through Football
A match has three possible results, not two. The Multinomial distribution handles any number of outcomes, and shows why a team's "expected" record over ten games almost never happens exactly.
Beginner
Part 7 of Statistics Through Football
Ranking players from fastest to slowest tells you the order, not how unusual anyone is. The Normal distribution, and its standard deviation, measures how far a player stands out from the rest.
Beginner
Part 10 of Statistics Through Football
The Uniform distribution says every outcome is equally likely. It's the fairest-sounding model in statistics, and testing it against 28,016 goals shows football isn't that fair.
Beginner
Part 11 of Statistics Through Football
Pick the best 200 of 5,000 young players and, among those picked, the more technical turn out to be the less athletic, even when the two have nothing to do with each other. How the way you choose your data can create a link that was never there, with a simulator and a real check on league tables.
Beginner
Part 16 of Statistics Through Football
Hearts scored with 34.7% of their shots on target last season and Dundee United with 28.8%. How far luck alone can move a rate like that, how to put a margin round it, and why most of the gap in finishing between clubs is luck.
Beginner
Part 17 of Statistics Through Football
Premiership games moved from Saturday 3pm, mostly for television, have more goals, and a shuffle test says the gap is no fluke. How a hypothesis test works, what a p-value does and doesn't tell you, and why this one still isn't about the cameras.
Beginner
Part 18 of Statistics Through Football
A player's performance can be written as a list of numbers in a fixed order. That list is a vector, and it's the first step to comparing players, finding replacements and feeding football into machine learning.
Beginner
Part 1 of Linear Algebra Through Football
One player's performance is a vector. Stack several players together and you have a matrix, the grid that almost all of data science starts from. Multiply it by a set of weights and every player gets a rating.
Beginner
Part 2 of Linear Algebra Through Football
Two players' stats are two vectors, and the distance between them measures how alike they are. It's how recruitment teams shortlist replacements, and it only works once every stat is put on the same scale.
Beginner
Part 3 of Linear Algebra Through Football
A run from one spot on the pitch to another is a vector, how far forward and how far across. From that pair of numbers you get the length of the run, its direction, its speed and whether it was heading for goal.
Beginner
Part 5 of Linear Algebra Through Football
Every pass has a start and an end, so every pass is a vector. That turns "he never passes forward" from an opinion into a number, and shows why a player's average pass can hide half of what he does.
Beginner
Part 6 of Linear Algebra Through Football
A new signing scores his first four penalties. Bayesian thinking combines what you believed before with what you've just seen, and shows why a perfect start should nudge your opinion, not replace it.
Beginner
Part 1 of Bayesian Thinking Through Football
A half-time lead is evidence, and what it means depends on who's leading. Bayes' theorem combines the pre-match odds with the half-time score, and 5,419 SPFL matches show it working.
Beginner
Part 3 of Bayesian Thinking Through Football
Rangers sacked Russell Martin after one win in seven league games; Danny Röhl won four of his first six. A Bayesian comparison puts the chance he's genuinely better at about nine in ten, not the near-certainty it felt like, and shows why more games couldn't settle it.
Beginner
Part 8 of Bayesian Thinking Through Football
Every machine learning model starts with two decisions, what to predict and what to tell the model. The first is the target, the second the features, and real SPFL results show why the features matter as much as the model.
Beginner
Part 1 of Machine Learning Through Football
A model that has seen the answers will always look brilliant. Holding matches back to test it, and choosing which ones, is how you find out whether it can predict a match it hasn't seen. Real SPFL seasons show the difference.
Beginner
Part 2 of Machine Learning Through Football
A model can learn its training matches too well, rules and all, and then fall apart on matches it hasn't seen. Real SPFL seasons show how it happens, how to spot it, and what to do about it.
Beginner
Part 3 of Machine Learning Through Football
A model can fail by being too simple to see the patterns or too complicated to ignore the noise. Real SPFL seasons, and the bookmakers, show what each looks like and where the sweet spot sits.
Beginner
Part 4 of Machine Learning Through Football
A model can be too rigid to learn, or so sensitive that one result rewrites everything it believes. Those are bias and variance, and twenty-five years of SPFL results show what each costs.
Beginner
Part 5 of Machine Learning Through Football
A single test season can flatter a model or bury it. Cross-validation tests it again and again on different slices of the data; for football, that means walking forward through the seasons. 23 SPFL seasons show why it matters.
Beginner
Part 6 of Machine Learning Through Football
Accuracy counts how many results a model called right, and hides almost everything else. A confusion matrix shows where the mistakes are, probability scores show how confident it was, and five SPFL seasons show why draws break accuracy.
Beginner
Part 7 of Machine Learning Through Football
Draw the best straight line through 310 Scottish team-seasons and it says a goal comes every 3.1 shots on target. Then test it on seasons it never saw, and watch one version break when the way shots are counted changes.
Beginner
Part 16 of Machine Learning Through Football
Every time you say a winger shot away from a defender, you're talking about rate of change. That's the heart of calculus, and a few seconds of sprinting are enough to see the derivative at work.
Beginner
Part 1 of Calculus Through Football
Still accelerating, at full speed, lost a yard of pace. Each is about what's happening at one moment, which is what the derivative measures, and it gives coaches something to train, measure and improve.
Beginner
Part 2 of Calculus Through Football
Two players can hit the same top speed and look identical for a second, then one pulls clear. The difference is how quickly their acceleration fades, and that is the second derivative.
Beginner
Part 3 of Calculus Through Football
Speed tells you how fast; integration tells you how far. It's the area under the speed graph, and it's how tracking data turns thousands of speed readings into distance covered and high-speed running.
Beginner
Part 4 of Calculus Through Football
One run into space, pulled apart and put back together. Position, speed and acceleration are one chain linked by derivatives and integrals, and it's how tracking data turns dots on a pitch into what coaches want to know.
Beginner
Part 5 of Calculus Through Football
A player and a club both gain from a new deal; the only question is how they split the gain. Game theory's answer is that it depends on what each could get by walking away, and on who's in more of a hurry.
Beginner
Part 8 of Game Theory Through Football
Five players on a shortlist, £10m to spend. Chase goals and you sign the striker. Chase points and three cheaper players beat him. Add one rule and the answer changes again. The three parts of every optimisation problem, with a transfer window.
Beginner
Part 1 of Decision Science Through Football
A goal isn't worth the same at every score. Real half-time results show one down a side can afford to risk two goals against for every goal it might score, and one up barely half of one. The same chance can be the right call in one game and the wrong one in the next.
Beginner
Part 10 of Decision Science Through Football
Of 26 Premiership sides bottom at Christmas, the seven that changed manager by the end of March all finished bottom, while eight of the 19 that kept theirs got off it. Why that comparison can't tell you what the change did, and the result you never get to see.
Beginner
Part 1 of Cause and Effect Through Football
Home sides take about a third of a point a game more than away sides. Compare matches where both sides had the same shots-on-target edge and the advantage all but disappears. Why that doesn't make home advantage a myth, and how a causal diagram tells you what to hold fixed.
Beginner
Part 2 of Cause and Effect Through Football