## The Partial Pooling Problem
When modelling multiple leagues simultaneously, you face two extremes:
- **Complete pooling:** Treat all leagues as identical — one model for all. Ignores real inter-league differences.
- **No pooling:** Separate model per league — each uses only its own data. Poor for leagues with small data.
Hierarchical (multilevel) models offer a third option: **partial pooling** — leagues share information, but each retains its own estimates.
## How Hierarchical Models Work
In a hierarchical model, league-specific parameters are assumed to come from a common distribution:
β_league_k ~ Normal(μ_β, σ_β)
Where μ_β and σ_β are global parameters estimated from all leagues. This "shrinks" small-league estimates toward the global mean — appropriate when data is sparse.
## An Example: Home Advantage
Global home advantage: μ_HA = 0.35 (on log scale for Poisson model)
League-specific home advantages:
- Premier League: 0.28 (slight shrinkage toward global mean)
- Greek Super League: 0.42 (larger home advantage)
- New expansion league: 0.35 (little data → strong pull to global mean)
The new expansion league's estimate is heavily regularised toward the global mean — appropriate given limited data.
## Implementation
Hierarchical models can be implemented in:
- Python: PyMC (Bayesian), statsmodels (frequentist mixed effects)
- R: lme4, brms
- Stan: most flexible, full Bayesian inference
For most betting applications, the lme4/statsmodels approach (frequentist mixed effects) provides adequate partial pooling without the computational complexity of full Bayesian inference.
Create a free account to track your progress and save bookmarks.