Skip to main content

A Python library designed for developers and analysts to calculate betting odds with ease using the power of Poisson distribution based on team qualities.

Project description

Odds by Poisson Distribution

This library enables the calculation of betting odds (moneyline, handicaps, totals) based on team qualities using the Poisson distribution.

It provides a simple interface for initializing calculations, requiring only the qualities of both teams. These qualities can be obtained using metrics such as expected goals (xG) or average number of goals.

Installation

pip install poisson-odds

Usage Example

from poisson_odds import *

test = Poisson(1.1, 2.1)

test.print_probability_table_goal_draws()
### Output:

Probability Table

print(test.moneyline)

### Output:
1-X-2: 5.291-4.878-1.669
handicaps = test.calculate_handicap_odds_by_Poisson()
print('\n'.join([str(items) for key, items in handicaps.items()]))
### Output:
...
0.75: 2.206 / 1.879
1.0: 1.918 / 2.089
1.25: 1.75 / 2.403
1.5: 1.582 / 2.717
...
totals = test.calculate_total_odds_by_Poisson()
print('\n'.join([str(items) for key, items in totals.items()]))
### Output:
...
Over/Under 2.75: 1.788 / 2.333
Over/Under 3: 1.961 / 2.04
Over/Under 3.25: 2.243 / 1.848
Over/Under 3.5: 2.525 / 1.656
...

Demonstrating

A real-world example of using the 'poisson_odds' library to analyze actual NHL odds by comparing them to probabilities based on expected goals (xG).

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

poisson_odds-0.1.2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

poisson_odds-0.1.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file poisson_odds-0.1.2.tar.gz.

File metadata

  • Download URL: poisson_odds-0.1.2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for poisson_odds-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e9f5e61528eba4a94b3d5153fda3b9a55555ae766d7bb12a91bef020523ce65e
MD5 7f4fba45d366d24a00b16938cc1772b8
BLAKE2b-256 ec67083b853f8f7802df427db23f0feb1315a2938eef0d6ce2cd2e1007124249

See more details on using hashes here.

File details

Details for the file poisson_odds-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: poisson_odds-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for poisson_odds-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2105df90d0f3fca1a7ff8113b626b841434611e97314740e39acaec1037d04f0
MD5 f0f3d2f22602543a5b0d3d6fd10d2c58
BLAKE2b-256 71c6558edd1ad1fbae72cd31ab66a5b28a560beeae7cd699907ceb7d500d6ea2

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