How to be Bayesian and spare yourself a dreadful afternoon with your stupid football team losing the derby
Yesterday was the second-last game of the Italian Serie A; I’ve been a Sampdoria supported since I was 12
Anyway, this season has been rather crappy and yesterday it was a crucial game: we were playing the derby against local rival Genoa entering the game with 40 points and two games left in the campaign. Two teams couldn’t reach us any more (as they were trailing by over 6 points). But at least one between Carpi and Palermo could still overtake us if we lost our two remaining games and they won all of theirs. Also, Udinese was just one point behind us so they too could overtake us, technically. With three teams being relegated, we weren’t statistically safe yet.
So, that’s kind of nervous and earlier last week I thought about this a bit. I had a bad feeling about our game, because we’ve not been great lately (the previous game we were beaten by Palermo) and, clearly, Genoa would try really hard to mess it up for us… But, irrespective of the outcome of the derby, if at least one between Carpi, Palermo and Udinese failed to win their match we would be safe (as there wouldn’t be enough points left for them to catch us). Carpi played at home against Lazio, whose season hasn’t been great either, but they were already safe and with not much else to fight for, except a strong finish; Palermo were away at Fiorentina, who theoretically were still fighting for a Europa league qualification and so should have something to play for; Udinese were away at Atalanta, who much as Lazio were mathematically safe and with not much to play for.
Although one can make a much more complex model, I reasoned that instead of the actual result, what was only important was the chance that either of the three teams behind us would win and so I set up a model with $ y_{} (_{})$,
Then I set up some priors: I reasoned that because they were playing at home, Carpi may have a slightly higher chance of winning the game
This is effectively the prior I was assuming:
and I thought it was just about reasonable (the dotted vertical lines indicate a rough estimate of the 95% prior credible interval). Then I did something similar to derive the priors for a Palermo and Udinese win
Again, I was relatively happy with this and so used these priors in my model, which one could code in R as something like
~ rbeta(10000,15.80107,28.4877) # P(win) on average .35 and with 95% mass <= .45
p.car ~ rbeta(10000,3.279775,10.1191) # P(win) on average .2 and with 95% mass <=.4
p.pal ~ rbeta(10000,3.279775,10.1191) # P(win) on average .2 and with 95% mass <=.4
p.udi <- 1-(p.car*p.pal*p.udi) p.safe
The most important variable in the model is the probability of Sampdoria being mathematically certain of avoiding relegation, p.safe, which is 1 minus the probability of the worst happening
I am not really one to stay at home on a Sunday just to watch the football game (so perhaps I’m not really a footaball fan?) and we’d planned to see some friends, but this reassured me that we shouldn’t be in too much trouble, even if we lost the derby. In the event, Kobi wasn’t great (possibly as a result of venturing an outing at the seaside on Saturday) and so we stayed at home
We did lose the derby very badly, but Carpi, Palermo and Udinese all failed to win their games, which means we are safe. I’m glad I didn’t watch the game…