For anyone watching football, being able to predict matches is a key aspect of the hobby. Whether explicitly (e.g. when betting on matches, or deciding on recruitment for an upcoming season), or more implicitly when discussing favourites to win the league in the pub, almost all discussion of the sport on some level require predictions about some set of upcoming games.
The first step of prediction is some form of quantification of ability.
When studying why people make the economic choices they do, we need some way of quantifying the value to the person of the offered choices. For instance, when deciding whether to ride to my office by bike or instead catch the bus, there are myriad factors that my brain feeds into an equation to get two values:
the utility of taking the bus the utility of riding my bike For instance, if it looks like it might rain, I’m more likely to take the bus as getting soaked reduces the utility of cycling to work.
In what is becoming a repeated series, I enjoy answering trivia questions from The Guardian’s The Knowledge football trivia column.
There’s a few questions that built up that seemed amenable to coding answers so I’ve taken a stab at them here
#munging library(tidyverse) library(data.table) library(zoo) #english football data library(engsoccerdata) #web data scraping library(rvest) #plotting library(openair) Calendar Boys The first question this week concerns players scoring on (or nearest to) every day of the year
Riddler Classic In my spare time I enjoy solving 538’s The Riddler column. This week I had a spare few hours waiting for the Superbowl to start and decided to code up a solution to the latest problem to keep me busy.
The question revolves around a card game in which whatever choice a player makes, they are likely to lose to a con artist. Formally this is phrased as:
Every so often a question on The Guardian’s The Knowledge football trivia section piques my interest and is amenable to analysis using R. Previously, I looked at club name suffixes and young World Cup winners last August. This week (give or take), a question posed on twitter caught my attention:
@TheKnowledge_GU was just chatting to some colleagues in the kitchen at work about why Essex doesn't have many big football clubs and it got me thinking.