Expected goals (xG) estimates how many goals a player is expected to score based on the quality of their scoring chances.
Can a player’s expected goals (xG) predict the number of goals they actually score?
2026-10-20
Expected goals (xG) estimates how many goals a player is expected to score based on the quality of their scoring chances.
Can a player’s expected goals (xG) predict the number of goals they actually score?
The dataset contains goal scoring statistics of football players in different leagues.
For this analysis the two main variables are:
Other variables include country, player name, league, club, matches played, minutes played and shots.
Source: Kaggle Goal Scorers Dataset
The graph shows a positive relationship, with players having a higher xG generally scoring more actual goals
Simple linear regression is used to study the relationship between two numerical variables
In this analysis:
We use simple linear regression to see how well xG can predict the number of goals a player scores
The relationship between xG and actual goals can be written as:
\[ Goals = \beta_0 + \beta_1(xG) + \varepsilon \]
\(\beta_0\) = intercept
\(\beta_1\) = change in actual goals when xG increases by 1
\(\varepsilon\) = random error
The model explains how actual goals are related to expected goals
After using the data, the fitted regression model is:
\[ \widehat{Goals} = \hat{\beta}_0 + \hat{\beta}_1(xG) \]
where:
\(\widehat{Goals}\) = predicted number of goals
\(\hat{\beta}_0\) = estimated intercept
\(\hat{\beta}_1\) = estimated effect of xG
The fitted model allows us to predict actual goals using a player’s xG
We use lm() to fit the simple linear regression model.
model <- lm(Goals ~ xG, data = goal_data)
The fitted model gives:
\[ \widehat{Goals} = 2.61 + 0.96(xG) \]
This means that when xG increases by 1, the model predicts about 0.96 more goals.
The regression line shows a positive relationship between xG and actual goals. As xG increases the predicted number of goals increases
Hover over points to see player’s name, xG and actual goals
The regression analysis shows the xG is a strong predictor of actual goals.
Players with higher expected goals generally score more actual goals showing that xG can be useful for predicting goal scoring performance