Skip to content

FraMaBu/football-oracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Football Oracle Dashboard

An interactive analytics dashboard for predicting football (soccer) scores from bookmaker odds with statistics.

It only uses bookmaker 1X2 odds (home–draw–away) and a Poisson model to estimate probabilities for exact scorelines (e.g., 0-0, 1-1, 2-1, etc.). Simply enter 1X2 odds to get:

  • A scoreline probability matrix (e.g., chance of 0–0, 1–1, 2–1, etc.)
  • Likelihood of “Over 2.5 Goals” and “Both Teams to Score”
  • Tipping game suggestions for best expected points

Why Use This App

  • Instant insights: Get from basic bookmaker odds to a detailed breakdown of scores—no extra data (league tables, advanced stats) required.
  • Easy & interactive: A friendly dashboard interface (Streamlit), with separate tabs for quick overviews, detailed probabilities, and a “tipping game” breakdown.
  • Flexible: Adjust goal cutoffs and initial parameters for the Poisson model — great for testing scenarios or other sports (e.g., ice hockey).
  • Fun tipping game tool: Discover which exact score guesses maximize your expected points if you’re in a score-prediction contest (e.g., kicktipp) with friends or colleagues.
  • Open Source: Adapt, extend, or customize it. Perfect for learning or for a quick project demonstration.

Disclaimer: This dashboard helps you understand probabilities—it does not guarantee correct predictions or betting success. Football is inherently unpredictable and statistics only enables us to "model" football match outcomes!

Installation

  1. Ensure Poetry is installed.
  2. Clone this repo:
    git clone https://github.com/YourUser/my-poisson-dashboard.git
    cd my-poisson-dashboard
  3. Install dependencies
    poetry install

Usage

After installation, launch the app with:

poetry run streamlit run football_oracle/app.py

Then open the local URL (e.g. http://localhost:8501) in your browser.

Methodology

Our goal is to derive from simple 1X2odds, which are widely available, estimates for a variety of other match outcomes (exact scorelines, Over 2.5 goals, Home win likelihood, etc.). This provides us with additional information about potential match outcomes, which we can then leverage to find "optimal" guesses in "score-guessing" games or other competitions.

For this we utilize a parametrical statistics approach:

  1. Compute the expected goals for the home (λ_home) and away (λ_away) team from the 1x2odds.
  2. Use these expected goals as parameters for a Poisson model to estimate the probabilities for exact scorelines (e.g., 2-1).

In the following sections, we give additional details and intuition.

1. Odds to probabilities

Bookmakers typically provide 1X2 odds (Home–Draw–Away). These embed a “margin.”
We remove that margin to get three “fair” probabilities for each outcome.

2. Why Poisson?

  • Football scoring tends to be low (0–3 goals are common). The Poisson distribution is a mathematically simple way to model how likely different counts of goals can be.
  • By fitting two Poisson rates (λ_home for home goals, λ_away for away goals), we can produce a probability for every final score (e.g., 0–0, 1–0, 2–1, etc.).
  • Minimizing the difference between the model’s overall probability of home/draw/away and the original (fair) probabilities determines λ_home and λ_away.

3. Scoring distribution

Once we have λ_home and λ_away, we can use the Poisson distribution and it’s easy to:

  • Calculate the probability of each score.
  • Sum those probabilities to find over/under totals, likelihood of both teams scoring, or any other event.

4. Tipping points

We can use the results to find the optimal guess in a “score-guessing” competition, where points are assigned based on final scores (e.g., 4 for exact, 3 for correct goal difference, etc.). We multiply these points by each score’s probability to see which guess yields the highest expected points.

This statistical approach provides a quick and simple way to expand 1X2 odds into full score distributions, which can be used for a variety of applications (e.g., tipping games, derive fair BTTS odds, etc.).

Project structure

football-oracle/
├── pyproject.toml  # Poetry config
├── football_oracle/
│   └── app    # main application
│   └── core   # core functionality
│   └── utils  # UI elements
└── README.md
└── .gitignore

About

An interactive analytics app predicting football scores from bookmaker odds

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages