Bayesian modelling · All chapters
Bayesian modellingChapter 02 of 06

Three from three

A new striker scores his first three penalties. Is he a 100% penalty taker? Your gut says no. Time to turn that gut feeling into a curve.

AuthorJack Maughan
ModelBeta-Binomial
Figures2, interactive
Reading time7 minutes
PreviouslyIn Chapter 1, a referee taught us the rule: what you believe now = what you believed before × how well the evidence fits. The answer to "did he dive?" was a single probability.

Three from three. On paper that's a perfect record. In the pub, nobody believes it. Everyone "knows" that most penalties go in, but not all of them, so three in a row tells you a bit, not everything.

The difference from Chapter 1 is that this isn't a yes-or-no question any more. We want a number, his true conversion rate. The same rule still works; we just apply it to every possible rate at once.

§ 01 — From one number to a curve

How good is the new striker?

Back to our penalty taker. This time the question isn't yes-or-no. His true conversion rate could be anything from 0% to 100%, so instead of one probability we keep a belief about every possible rate, drawn as a curve. Taller means more believable.

The ochre line is your prior: what you'd guess before he's taken a single kick. Most takers score roughly three out of four, so it starts centred there. The dashed blue line is what his kicks alone say. The shaded teal area is the posterior: the two combined.

He's scored three from three. Hit the buttons and see what you should believe. Then take some more kicks; the computer secretly knows his real skill.

Fig. 2 — Updating a belief0 kicks
01  Prior
02  Evidence
Prior (before) Kicks alone Posterior (after)
Prior 100%Who's winning the argument?Kicks 0%
Record3/3scored / taken
Raw rate100%kicks alone
Best guess79%posterior average
90% range66–90%credible interval

After three from three, the raw rate says 100%. The Bayesian answer says something like "probably about 79%, and somewhere between the mid-60s and 90% wouldn't surprise me". That's a far more honest summary of three kicks.

Two things to try. First, drag How sure you are to the far left: with a weak prior, the data takes over almost immediately. Drag it right and the prior digs in. Second, keep pressing Take 10 kicks. The teal area gets narrower and slide towards his real skill, and the tug-of-war bar swings towards the kicks. The more evidence you have, the less your starting guess matters.

Notice the answer is never one number. You get a whole range, and it tells you how unsure to be. That's arguably the most useful thing Bayesian modelling gives you.

§ 02 — Does the prior matter?

Three pundits, one striker

The obvious complaint: "Isn't the prior just your opinion? Pick a different one and you get a different answer." True, at first. So let's give three pundits three very different opinions and make them watch the same striker for a whole career.

The sceptic reckons he's a 60% taker. The average fan says 76%. The believer is sure he's 92%. Each line is that pundit's best guess after every kick.

Fig. 3 — ConvergenceTrue skill: ?
Sceptic (starts 60%) Average fan (76%) Believer (92%) His real skill
Show as a table

They start miles apart and end up in the same place. After a few dozen kicks the evidence has out-voted all three opinions. That's the reassuring bit: with enough data, reasonable people with different priors end up agreeing.

The catch is the word "enough". Even regular penalty takers only get a handful of spot kicks a season, so in real football you rarely reach the right-hand side of that chart. Most of the time you're living on the left, where the prior still matters a lot. That's exactly why it's worth choosing it carefully and saying it out loud, rather than pretending three from three means 100%.

Key findings

  1. Prior: what you believed before seeing the data. Everyone has one; Bayes makes you write it down.
  2. Likelihood: how well each possible answer explains what you've seen.
  3. Posterior: prior × likelihood, rescaled. Your updated belief, which becomes the prior for the next piece of data.
  4. The answer is a range, not a single number, so you always know how unsure you are.
  5. Little data: the prior matters a lot. Lots of data: it barely matters at all.
Appendix — the maths

The penalty model is the classic Beta-Binomial. The prior on the conversion rate θ is a Beta distribution. A prior guess m held with the strength of s kicks becomes:

θ ~ Beta(α = m·s, β = (1−m)·s)

After k goals from n kicks, the posterior is again a Beta, which is why it's such a tidy textbook example:

θ | data ~ Beta(α + k, β + n − k) best guess = (α + k) ÷ (α + β + n)

That last line is the tug-of-war bar. The best guess is a weighted average of your prior guess and the raw rate, and the data's weight is n ÷ (n + s). With the league-average prior (76%, worth 20 kicks) and three from three: (15.2 + 3) ÷ (20 + 3) ≈ 79%.

Real models swap the coin-flip setup for regressions, hierarchies (players nested in teams nested in leagues) and simulation methods like MCMC, but the logic never changes: prior × likelihood → posterior.

Next · Chapter 03

Goals per game

Penalties are yes-or-no. Goals are counts. A promoted side wins 5–0 on opening day: how far should one result move you, and what happens next week?

→