# 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:
```

```
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](https://github.com/nikolaitolmachev/poisson_odds_demo) of using the 'poisson_odds' library to analyze actual NHL odds by comparing them to probabilities based on expected goals (xG).
Raw data
{
"_id": null,
"home_page": "https://github.com/nikolaitolmachev/poisson_odds",
"name": "poisson-odds",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Nikolai Tolmachev",
"author_email": "Nikolai Tolmachev <nikolai.tolmachev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/5c/a1/db0ffe813daed2e15bffc943d63ee19c4d928f435a6c95913ee98e6cbac5/poisson_odds-0.1.3.tar.gz",
"platform": null,
"description": "# Odds by Poisson Distribution\r\nThis library enables the calculation of betting odds (moneyline, handicaps, totals) based on team qualities using the Poisson distribution.\r\n\r\nIt 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.\r\n\r\n## Installation\r\n```\r\npip install poisson-odds\r\n```\r\n\r\n## Usage Example\r\n```\r\nfrom poisson_odds import *\r\n\r\ntest = Poisson(1.1, 2.1)\r\n\r\ntest.print_probability_table_goal_draws()\r\n### Output:\r\n```\r\n\r\n```\r\nprint(test.moneyline)\r\n\r\n### Output:\r\n```\r\n```\r\n1-X-2: 5.291-4.878-1.669\r\n```\r\n```\r\nhandicaps = test.calculate_handicap_odds_by_Poisson()\r\nprint('\\n'.join([str(items) for key, items in handicaps.items()]))\r\n### Output:\r\n```\r\n```\r\n...\r\n0.75: 2.206 / 1.879\r\n1.0: 1.918 / 2.089\r\n1.25: 1.75 / 2.403\r\n1.5: 1.582 / 2.717\r\n...\r\n```\r\n```\r\ntotals = test.calculate_total_odds_by_Poisson()\r\nprint('\\n'.join([str(items) for key, items in totals.items()]))\r\n### Output:\r\n```\r\n```\r\n...\r\nOver/Under 2.75: 1.788 / 2.333\r\nOver/Under 3: 1.961 / 2.04\r\nOver/Under 3.25: 2.243 / 1.848\r\nOver/Under 3.5: 2.525 / 1.656\r\n...\r\n```\r\n\r\n## Demonstrating\r\nA [real-world example](https://github.com/nikolaitolmachev/poisson_odds_demo) of using the 'poisson_odds' library to analyze actual NHL odds by comparing them to probabilities based on expected goals (xG).\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python library designed for developers and analysts to calculate betting odds with ease using the power of Poisson distribution based on team qualities.",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/nikolaitolmachev/poisson_odds"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "330f047b471e4639ed9d569e5eb725d487066b74f828966fe7fc1a6bf3e91c5a",
"md5": "b43d57b9f3f4b76ed5bded385400ff69",
"sha256": "233e4eaa9108652e5a35d20da1ee09c95af4e52297cd77880ddcf6cfb3de5086"
},
"downloads": -1,
"filename": "poisson_odds-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b43d57b9f3f4b76ed5bded385400ff69",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 11706,
"upload_time": "2025-03-09T18:53:02",
"upload_time_iso_8601": "2025-03-09T18:53:02.572132Z",
"url": "https://files.pythonhosted.org/packages/33/0f/047b471e4639ed9d569e5eb725d487066b74f828966fe7fc1a6bf3e91c5a/poisson_odds-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5ca1db0ffe813daed2e15bffc943d63ee19c4d928f435a6c95913ee98e6cbac5",
"md5": "223ea5dcd72fea1ef33b880d4478311a",
"sha256": "8b763743a38e48bc0f0fb64f046cb6196aab4e3278542182601c14202158accf"
},
"downloads": -1,
"filename": "poisson_odds-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "223ea5dcd72fea1ef33b880d4478311a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11358,
"upload_time": "2025-03-09T18:53:04",
"upload_time_iso_8601": "2025-03-09T18:53:04.833347Z",
"url": "https://files.pythonhosted.org/packages/5c/a1/db0ffe813daed2e15bffc943d63ee19c4d928f435a6c95913ee98e6cbac5/poisson_odds-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-09 18:53:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nikolaitolmachev",
"github_project": "poisson_odds",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "tabulate",
"specs": [
[
"==",
"0.8.10"
]
]
}
],
"lcname": "poisson-odds"
}