Skip to main content

Bayesian models for football match prediction, based on Dixon and Coles (1997).

Project description

bpl-next

tests

new version of bpl, implemented in numpyro

Statistical model

The statistical model behind bpl is a slight variation on the Dixon & Coles approach. The likelihood is:

equation

where y_h and y_a are the number of goals scored by the home team and the away team, respectively. a_i is the attacking aptitude of team i and b_i is the defending aptitude of team j. gamma_i represents the home advantage for team i, and tau is a correlation term that was introduced by Dixon and Coles to produce more realistic scorelines in low-scoring matches. The model uses the following bivariate, hierarchical prior for a and b

equation

X_i are a set of (optional) team-level covariates (these could be, for example, the attack and defence ratings of team i on Fifa). beta are coefficient vectors, and mu_b is an offset for the defence parameter. rho encodes the correlation between a and b, since teams that are strong at attacking also tend to be strong at defending as well. The home advantage has a log-normal prior

equation

Finally, the hyper-priors are

equation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bpl_next-0.4.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bpl_next-0.4.0-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file bpl_next-0.4.0.tar.gz.

File metadata

  • Download URL: bpl_next-0.4.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.16

File hashes

Hashes for bpl_next-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f9af660d0bccac43e6d32910fdeb6d2fed169de0f201527fea93d177b69312e2
MD5 1f6e2eab02500aa79fb56ecf60003fd6
BLAKE2b-256 2a192870b7c25e56c4a8f5485c5e2a9cbf9a7eb3e5bb70e8104546c7aae1c2b8

See more details on using hashes here.

File details

Details for the file bpl_next-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: bpl_next-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.16

File hashes

Hashes for bpl_next-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e123b4172278dc3981b04f6d10aba678acc4bf0394d35d846af176e07163e48
MD5 f86eee152b99706776705399eda571d9
BLAKE2b-256 73fc7bffaa8217ed6758b6c671f85853880bec24639db014b430e53c7a42dcde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page