Skip to main content

Poisson Odds

PyPI Python 3.11+ Python Tests

A Python library for calculating sports betting probabilities and fair odds using the Poisson distribution.

Poisson Odds calculates moneyline (1X2), handicaps, and over/under totals based on team qualities. Team qualities can be estimated using expected goals (xG), historical scoring averages, or other performance metrics suitable for modeling scoring rates.


Installation

Install Poisson Odds from PyPI using pip:

pip install poisson-odds

Requirements: Python 3.11 or newer.


Usage

Initialize the Poisson model with two positive numeric values representing the teams' qualities:

from poisson_odds import Poisson

model = Poisson(1.1, 2.1)

Moneyline (1X2)

Get the fair odds for a home win, draw, and away win:

print(model.moneyline)

Output:

1-X-2: 5.291-4.878-1.669

Handicaps

Calculate fair odds for handicap betting markets, including Asian handicaps:

handicaps = model.calculate_handicap_odds_by_poisson()

print(handicaps[1.5])

Output:

1.5: 1.582 / 2.717

The result shows the handicap line followed by the fair odds for the home and away teams, respectively.

Totals (Over/Under)

Calculate fair odds for total goals betting markets, including Asian totals:

totals = model.calculate_total_odds_by_poisson()

print(totals[2.75])

Output:

Over/Under 2.75: 1.788 / 2.333

The result shows the total goals line followed by the fair odds for Over and Under, respectively.


Probability Table

Display the Poisson probability distribution for both teams, including the probabilities of matching scores:

model.print_probability_table_goal_draws()

Poisson Probability Table


Demo Project

Explore the Poisson Odds Demo, a practical example of using the library to analyze NHL betting odds and compare them with probabilities calculated from expected goals (xG).


License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for poisson-odds 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for poisson-odds 0.2.0
File Size Uploaded Provenance Actions
poisson_odds-0.2.0.tar.gz 13.7 kB Without provenance Details for poisson_odds-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for poisson-odds 0.2.0
File Interpreter ABI Platform Actions
poisson_odds-0.2.0-py3-none-any.whl Python 3 none any Details for poisson_odds-0.2.0-py3-none-any.whl

Total release size: 24.6 kB

Release files / poisson_odds-0.2.0.tar.gz

Download URL poisson_odds-0.2.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1ce67fadcf74c017d3da190e3823a814e64e978ebc2bdaf30772a76ddac9e224
BLAKE2b-256 checksum
How to use checksums
2a3bad27950f2f569da06a3d5f9d21e37d604fc609d072822cd81e4d6545c626
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / poisson_odds-0.2.0-py3-none-any.whl

Download URL poisson_odds-0.2.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85281f5ee8ade7940e3f1a276603417f8eee505db9bb97d50f2e0489f2f94037
BLAKE2b-256 checksum
How to use checksums
4581682ac6d8f07a46e584e8482e6bc4b5cb1a1610ca455172220536e5aca719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for poisson-odds 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page