Goal Betting Analysis
Betting on the number of goals using the Poisson distribution
A new feature in Trefík is the ability to display odds for a bet determined by the under/over threshold in the Offer window. The under/over threshold and the type of bet are used as parameters for displaying odds. This way, we can work with the total number of goals, the number of goals for one team, the number of goals in half time, the number of corners, cards, fouls, shots on goal, ...
In principle, the calculations in the Offer window give us a threshold for the under/over bet. This gives us the odds and we can analyze the results of the calculation. For example, we choose a match where, using a simple calculation from the past matches of both teams (the sum of the number of goals divided by the number of matches), we find that the expected total of goals in the match will be around the threshold of 1.50. So we want to analyze the odds for a bet on under/over 1.5 goals in the match. For another match, the calculation may show a threshold of 2.50 goals. The new feature provides a way to work with different under/over thresholds for one type of bet in bulk.
This example will illustrate the use of the new function for the result of a calculation using the Poisson distribution and the number of goals scored by the home team in a match. The Poisson distribution is well suited for modeling the expected number of goals.
When creating the filter, we will use the basis for calculating the value of Poisson distribution. The adjustments will be made in the Filter / Columns section, where we will add the necessary rows to evaluate the bet on the number of goals and calculate the profit:
.. LAMBDA X value from the Poisson distribution calculation indicates the expected number of goals of the home team (it is derived from home attack power and away defense power and mathematically corresponds to the mean value). We will therefore use this value to determine the under/over threshold for the desired bet on the number of home goals. The ROUND_?.5 function in the Columns window returns the value from "Column 1" "rounded" to the value "WholePartOfTheNumber" + 0.5. For example, to the value 1.5 for the input parameter 1.22. The under/over threshold is therefore calculated on the first visible line in the Columns section and is marked as "xGH".
The next two lines "xG1 under" and "xG1 over" get the odds for the under/over bet on the number of goals of the home team. Bets on the number of home goals are marked as "G1" in Trefík. The under/over parameter will be the already created column "xGH" (the same result would be achieved by using the value "lambda X", since rounding to "whole".5 is always performed before using the parameter value).
Now we have the under/over threshold and the odds for bets with this threshold. And we have to decide whether to place an under or over bet. This decision will be based on the value of "lambda X", i.e. the calculated estimate for the number of home goals. And the decision will be simple: if "lambda X" is below the under/over bet threshold (i.e. below the rounding of the value of "lambda X" to the value "whole".5), then we place an UNDER bet. Otherwise, we place an OVER bet.
The lines "H lambda under" and "H lambda over" are therefore a comparison and a decision as to whether to bet UNDER or OVER. If the line "H lambda under" has a value of 1, then the bet UNDER will be made. Otherwise, the OVER bet is derived from the value of 1 for the item "H lambda over".
This has determined what bet will be placed. Now we need to evaluate the bet to get an overview of the overall profit of the analyzed strategy.
The line "? H under" will have a value corresponding to the odds of the UNDER bet if this bet is placed. Otherwise it will have a value of zero (multiplied by 1 or 0 depending on whether we specified in the previous step that the bet should be used). Similarly, the line "? H over" will have a value of the odds of the OVER bet if it is placed, otherwise it will be zero.
The line "H bet" is the sum of the two previous lines, i.e. the sum of the bet odds (either from the UNDER bet or the OVER bet) and zero. It will therefore have a value corresponding to the bet odds.
Next, we need to evaluate the number of goals in the match. To do this, we will use the column "Goals Home No OT", as this is the number of goals scored by the home team in the match, excluding goals scored in overtime (in order for this column to contain the added number of goals, it must be activated in the Columns section).
The line "? G under" evaluates whether the home team scored fewer goals in the match than the threshold for the under/over bet used. If there were fewer goals, it will have a value of 1. Otherwise, there will be a zero value. Similarly, the next line "? G over" will have a value of 1 if the home team scored more goals.
Now we can use the previous columns to evaluate both under/over bets in turn.
The item "? G under win" multiplies the "information" of whether the UNDER bet was successful with the odds for the under bet (if it was placed, otherwise with zero). The odds for the UNDER bet will be returned if it was placed and was successful, or a zero value. Similarly, the item "? G over win" will return the odds for the successful OVER bet or zero.
The line "Win Odds" adds the two previous lines together. The result will be the winning odds or a zero value.
The last line "G Profit" calculates the profit from the bet on the number of home goals. That is, it subtracts the value 1 from the odds from the previous line (the entry in "Column 2" must be indicated with a + sign, otherwise it would be a reference to the odds on the home team). The result will be either the value -1 in the case of an unsuccessful bet or the relative value of the profit from the winning odds.
Using the items created in the Filter / Columns section, we obtained the profit amount in a few steps when betting on the number of goals scored by the home team with a variable limit for the under/over bet.
To fine-tune the filter, we will use the Filter / Conditions section:
.. we should eliminate matches where odds for the given number of goals for the home team were not listed, and matches that have not yet been played. Attention - the UNDER_? and OVER_? functions when working with the number of home and away goals also use the bets "home team will score" and "away team will score" with the parameter 0.5 - these are identical bets.
In Filter / Conditions we define 2 lines:
.. the condition whether the number of goals is filled in (i.e. whether the match was played), and the condition whether the bet odds (i.e. the item "H bet" from the Filter / Columns section) are higher than 1. This ensures that the filter will not return unplayed matches and matches without odds for the bet we are tracking
Now we can use the created filter in the Offer window:
.. the filter was applied to matches of the German Bundesliga in the time period 1.8.2024 to 4.11.2024. Odds from Bet365. The total profit (ratio of the amount received and the amount bet) is 0.13, i.e. 13% profit (the evaluation of the total profit is displayed after activating the Average function using the right mouse button on the footer in the list of matches). This is a result worthy of attention.
If we activate the "365-Pin-SBO-888" bookie selection at the bottom left, the highest available odds from the selected bookies will be displayed (also works for the UNDER_? and OVER_? functions) and the result will be:
.. so profit 16%.
Finally, let's go through the displayed columns for the last match Monchengladbach - Bremen:
- first, columns with the number of goals scored by both teams without taking into account overtime are displayed (in this case it is not important, it is shown for illustration, it can be useful in hockey),
- lambda X: calculation of the estimated number of home goals according to the Poisson distribution,
- xGH: rounding "lambda X" to "WholeNumber".5, i.e. the threshold for the desired bet under/over the number of goals scored by the home team,
- xG1 under, xG1 over: under and over odds for the selected bet for the number of goals scored by the home team (returned using the UNDER_? and OVER_? functions),
- H lambda under: whether an UNDER bet will be placed,
- H lambda over: whether an OVER bet will be placed,
- ? H under: if an UNDER bet is placed, then the odds of this bet, otherwise zero value,
- ? H over: if an OVER bet is placed, then the odds of this bet, otherwise zero value,
- H bet: odds bet (either for the UNDER or OVER bet),
- ? G under: whether the home team scored fewer goals than the threshold for the under/over bet being watched,
- ? G over: whether the home team scored more goals than the threshold for the under/over bet being watched,
- ? G under win: if the UNDER bet was bet and it won, then the odds of this bet, otherwise zero,
- ? G over win: if the OVER bet was bet and it won, then the odds of this bet, otherwise zero,
- Win odds: if the UNDER or OVER bet was successful, then the odds of this bet, otherwise zero,
- G Profit: profit from the bet on the number of goals the home team will score in this match; a value of -1 means that the bet lost.
Similarly, you can work with bets on the number of away goals, the total number of goals, the number of yellow cards, corner kicks, fouls, shots on goal or offsides (Trefík records odds for all of these data at selected bookies).
Further investigation may be to skip matches where the parameter "lambda X" is too close to the rounded value of "WholePartOfTheNumber" + 0.5 and the decision whether to bet UNDER or OVER is too close. Or in such cases we can choose the UNDER or OVER bet according to the lower/higher odds. The possibilities are various and the excellent profit result on this sample page is certainly an encouragement for further analysis in Trefík.
The filter created above is available in the Filter / Samples section.