What If They Took the Shot? A Hierarchical Bayesian Framework for Counterfactual Expected Goals
Mikayil Mahmudlu, Oktay Karakuş, Hasan Arkadaş
TL;DR
This paper presents a hierarchical Bayesian framework that incorporates expert Football Manager priors to model player-specific finishing in expected goals (xG) and enable counterfactual analyses. By integrating StatsBomb event data with FM ratings, the model achieves stable, uncertainty-aware estimates and outperforms a non-linear benchmark while preserving interpretability. The authors develop a counterfactual transfer framework (C$^3$T) and a context-weighted score (FATS) to quantify how players would fit into different tactical systems, demonstrated through Berardi–Sansone and Vardy–Giroud case studies with real-world transfer implications. The approach provides a principled tool for player evaluation, recruitment, and tactical planning, with potential applicability across multiple scoring sports and domains where skill interacts with context.
Abstract
This study develops a hierarchical Bayesian framework that integrates expert domain knowledge to quantify player-specific effects in expected goals (xG) estimation, addressing a limitation of standard models that treat all players as identical finishers. Using 9,970 shots from StatsBomb's 2015-16 data and Football Manager 2017 ratings, we combine Bayesian logistic regression with informed priors to stabilise player-level estimates, especially for players with few shots. The hierarchical model reduces posterior uncertainty relative to weak priors and achieves strong external validity: hierarchical and baseline predictions correlate at R2 = 0.75, while an XGBoost benchmark validated against StatsBomb xG reaches R2 = 0.833. The model uncovers interpretable specialisation profiles, including one-on-one finishing (Aguero, Suarez, Belotti, Immobile, Martial), long-range shooting (Pogba), and first-touch execution (Insigne, Salah, Gameiro). It also identifies latent ability in underperforming players such as Immobile and Belotti. The framework supports counterfactual "what-if" analysis by reallocating shots between players under identical contexts. Case studies show that Sansone would generate +2.2 xG from Berardi's chances, driven largely by high-pressure situations, while Vardy-Giroud substitutions reveal strong asymmetry: replacing Vardy with Giroud results in a large decline (about -7 xG), whereas the reverse substitution has only a small effect (about -1 xG). This work provides an uncertainty-aware tool for player evaluation, recruitment, and tactical planning, and offers a general approach for domains where individual skill and contextual factors jointly shape performance.
