1 Introduction

Football is the most played sport in the world with hundreds of millions of players and more than 3 billions of fans. The soccer betting industry is growing with (615 millions of euro have been bet during the last world cup). In general, in soccer betting, one have to try to guess the number of goals scored during a match. It is therefore normal to want to use statistical methods to try to predict the number of goals.
In football, as in other team sports, the home advantage is the name of the benefit that the team playing home has against it’s opponent that is visiting. In this work, we want to study the effect of the home advantage and how it changed during the Covid period. For this, we will focus on the study of matches from the Premier League during the last four years.

2 Data Characteristics

The data that we use are from a collection of matches results for four English Premier League seasons: from 2018-2019 to 2021-2022. We grouped them into a single data set containing the results of 1400 matches from 26 different teams. For each match, we have information about the date, the final score, the half time score, the referee, the two teams playing and which team is playing home.

3 Exploratory Data Analysis

During the four seasons that we study, 26 different teams played at least one season but only 15 teams played all the four seasons. Figure 1 shows the correlation between different numeric covariates. Figures 2 and 3 show more precisely the distribution of the goals scored by the home team and away team respectively. The means of the number of scored goals are represented by the red dashed lines. The average number of goals scored by a team playing home is slightly larger that the average number of goals scored by a team playing away. We observe that most of the teams can score 0, 1 or 2 goals in a match. Moreover, we observe that the number of goals seems to have Poisson distributions. Finally, Figure 4 shows the proportion of times that a team that scored a given number of goals (in the x-axis) was playing home. Here is an explanation of the variable names:

  • FTHG is the number of goals scored during the match by the team playing home
  • FTAG is the number of goals scored during the match by the team playing away
  • HTHG is the number of goals scored during the first half of the match by the team playing home
  • HTAG is the number of goals scored during the first half of the match by the team playing away
Figure 1: Correlation of different covariates.

Figure 1: Correlation of different covariates.

Figure 2: Distribution of Goals Scored by the Home Team.

Figure 2: Distribution of Goals Scored by the Home Team.

Figure 3: Distribution of Goals Scored by the Away Team.

Figure 3: Distribution of Goals Scored by the Away Team.

Figure 4: Proportion of matches that were played home for a given number of scored goals.

Figure 4: Proportion of matches that were played home for a given number of scored goals.

4 Model Selection

We aim at creating a model that can predict the number of goals scored by each team. For this we create a generalized linear model, that we want to keep as simple as possible. We want our model to depend only on covariates that we can observe before the match like the date, the teams playing, which one is playing home, the referee and if the match take place before, during or after the Covid. To create our model we chose to use only the results of the matches where both teams are among the 15 teams that played during the 4 seasons. We chose this to avoid that the results of a team playing during a single season (during the Covid for example) alternate the results of our study.

While pre-processing the data, we coded every match twice: once from the home team perspective, once from the away team perspective. Like this both scores from a single match will be the response and we can call the coefficient of the team we are watching ‘offense’ and the coefficient of the opposite team ‘defense’. We assume that the numbers of goals scored by each team are independent.

Since we want to model the final number of scored goals, i.e. a counting, a Poisson model is natural. So we use a log-linear model (i.e. Poisson model with log as a link function) to predict the number of scored goals. Naturally, the number of scored goals during a match depends on the strengths of the two teams. Since we study the effect of the Covid period on the home advantage, we include them in our model. The final model is

\[ \begin{align*} \mathbb{E}[\text{Number of goals}]=e^{\text{Intercept}+\text{Home_Flag}*\text{Covid_Period}+\text{Offense}+\text{Defense}} \end{align*} \]

where Covid_Period indicates if the match take place before, during (from 12/03/2020 to 13/08/2021) or after the Covid period, \(\text{Home_Flag}\) indicates if the team Team played home and the coefficients Offense and Defense represent the strengths of the teams.

The values of the coefficients obtained, their standard deviation, p-values and 95% confidence intervals are presented in Figure 5.

We observe that the p-values of some coefficients like Intercept, indicator_period During, indicator_period Pre or offense Chelsea are larger 0.05. We also observe that some of the 95% confidence contain the value 0, like for the coefficient indicator_period During, so it is not absolutely sure that this coefficient has a positive effect.

Figure 5: table of the coefficients for the final model.
Estimation Standard variation P values 2.5% 97.5%
(Intercept) 0.18 0.13 0.172 -0.08 0.44
played_home 0.24 0.08 0.003 0.08 0.41
as.factor(indicator_period) During 0.13 0.09 0.124 -0.04 0.30
as.factor(indicator_period) Pre 0.04 0.08 0.611 -0.11 0.19
offenseBrighton -0.23 0.13 0.070 -0.47 0.02
offenseBurnley -0.39 0.13 0.003 -0.65 -0.14
offenseChelsea 0.05 0.11 0.686 -0.18 0.27
offenseCrystal Palace -0.25 0.13 0.047 -0.50 0.00
offenseEverton -0.10 0.12 0.415 -0.33 0.14
offenseLeicester 0.08 0.11 0.488 -0.15 0.31
offenseLiverpool 0.37 0.11 0.000 0.17 0.59
offenseMan City 0.45 0.11 0.000 0.25 0.66
offenseMan United 0.04 0.12 0.709 -0.18 0.27
offenseNewcastle -0.27 0.13 0.033 -0.52 -0.02
offenseSouthampton -0.20 0.12 0.113 -0.44 0.05
offenseTottenham 0.14 0.11 0.204 -0.08 0.37
offenseWest Ham -0.08 0.12 0.511 -0.32 0.16
offenseWolves -0.30 0.13 0.019 -0.55 -0.05
defenseBrighton 0.07 0.12 0.561 -0.16 0.30
defenseBurnley 0.19 0.11 0.097 -0.03 0.42
defenseChelsea -0.29 0.13 0.025 -0.55 -0.04
defenseCrystal Palace 0.17 0.12 0.152 -0.06 0.39
defenseEverton 0.07 0.12 0.549 -0.16 0.30
defenseLeicester 0.07 0.12 0.573 -0.16 0.30
defenseLiverpool -0.53 0.14 0.000 -0.81 -0.26
defenseMan City -0.38 0.14 0.005 -0.65 -0.11
defenseMan United 0.01 0.12 0.923 -0.22 0.25
defenseNewcastle 0.23 0.11 0.044 0.01 0.45
defenseSouthampton 0.35 0.11 0.002 0.13 0.57
defenseTottenham -0.03 0.12 0.792 -0.27 0.21
defenseWest Ham 0.15 0.12 0.202 -0.08 0.38
defenseWolves -0.02 0.12 0.868 -0.26 0.22
played_home:as.factor(indicator_period) During -0.23 0.12 0.052 -0.46 0.00
played_home:as.factor(indicator_period) Pre -0.07 0.11 0.489 -0.28 0.13

5 Residuals and Diagnostics

Figure 6 shows three different residuals diagnostics plots for the final model. The one on the top left represents the residuals against the fitted values, the one on the right is a normal Q-Q plot for the residuals and the one bellow shows the Cook’s distances vs the leverages. The fit appears good overall, but we can see that tow observations correspond to high Cook’s distance. We check those two observations: one is a match between Man United and Southampton won by Man United at home 9-0. The other one is a match between Southampton and Leicester won by Leicester away 9-0. Man United and Leicester scored a number of goals higher than usual, that is why there are two points with high Cook’s distance, but it is not a problem in the data.

Figure 6: Three residuals diagnostics plots.

Figure 6: Three residuals diagnostics plots.

6 Stability/sensitivity Inspection

We want to determine if our two assumptions were reasonable for the analysis. First we test whether it was reasonable to assume that the team were equally good during the three different Covid periods. To do this, we fit a new model where the strengths of the teams depend on the Covid period. Looking at the p-value (0.57) of a model/sub model test, we see that we cannot reject the hypothesis that the team were equally good during the three periods. Secondly we test if it was reasonable to assume that in match, the number of scored goals of both teams are independent. To check this, we fit again a new model using the scored goals of the adverse team as a aggressor and perform a model/sub model test. The p-value is 0.17, which indicates that we cannot reject the null hypothesis based on that. So we have no reason to don’t treat the number of scored goals of both teams in a match as not independent or to not assume that the strengths of the teams were constant during the three Covid period.

7 Interpretation

Using the coefficients listed in the table above we can predict the number of goals scored as follow: the number of goals scored by Arsenal playing home against Brighton playing away before the Covid, is predicted to be

\[ \begin{align*} \mathbb{E}[\text{Number of goals}]&=e^{\text{Intercept + Home_Flag + Coeff Offense Arsenal + Coeff Defense Brighton + Coeff before Covid + Coeff before Covid:Home_Flag}}\\ &=e^{0.18+0.24+0+0.07+0.04-0.07}\\ &=1.58 \end{align*} \]

We can also compute the average number of goals scored by a team playing home or away for each period of time (before, during or after the Covid). This is shown in the Figure 7.

We can compute the home advantage in the three different periods and we get that the home advantage before the Covid is \(e^{0.24-0.07}=1.19\) which means that a team playing a home game before the Covid will score on average 1.19 times more goals than if they were playing away. Similarly we find that the home advantage during the Covid is \(e^{0.24-0.23}=1.01\) and the home advantage after the Covid is \(e^{0.24}=1.27\). Hence we can say that the home advantage totally disappeared during the Covid period and reappeared even stronger after the Covid.

Figure 7: Table of the average number of goals in six cases.
Period Home Away
Before Covid 1.48 1.25
During Covid 1.38 1.36
After Covid 1.52 1.20

8 Discussion

In our analysis we study only the teams that played all the four seasons but if we had studied all the 26 teams, we might have had quite different results. It could have been interesting to know how many penalties were taken and scored for each match to study the effect of the home advantage on the penalties, which might be even stronger than the home advantage on ‘regular’ goals.

During the preparation of this work, we discovered that the effect of the home advantage is very different for the goals scored during the first half and during the second half of the match: it is more important during the second half of the match.

The most important during a football match is usually to win. So it would have been interesting to study the effect of the home advantage on the outcome (won, lost or draw).

Finally, study prediction of goals scored during a football match is difficult because not a lot of goals are scored in a match. It would be interesting to see if we get better prediction for a sport where more points are scored at each match, like basketball.