What is Poisson Distribution? When to use it? How to predict football match results? | Towards Data Science

Understanding the dataset, performing appropriate preprocessing operations, and interpreting the results are essential for training the machine in the light of more accurate data. For example, if we consider dimensionality reduction, the type of dimensionality reduction method (linear or nonlinear) is applied depending on the structure of the dataset. Distribution types are also one of the most important approaches for reading, understanding, and making inferences about the dataset. This article explains the probability of teams scoring goals against each other by using the Poisson Distribution and 2019–2020 Turkish Football League dataset, which is always memoryless, with the Poisson distribution. This article explains in-depth the Poisson distribution and models the probability of Galatasaray and Fenerbahçe scoring each other using the Poisson Distribution based on the real dataset of the 2019–2020 Turkish Football League.
Table of Contents1. What is Poisson Distribution?1.1. How can we decide whether is a poisson distribution?1.2. Examples1.3. Real Applications2. Predicting Football Match Result3. References
In its shortest form, the distribution of the number of independent events occurring in a certain interval (this interval can be time, distance, area, volume, etc.) is the Poisson distribution. For example, the number of accidents at a certain junction in 24 hours, chickens in a square meter plot of land, the number of fires in X region in 3 months, etc. Before continuing with these examples, let’s take a look at the theoretical background of the subject:
where λ= mean number of occurrences at a certain interval
e = Euler constant
x = the number of events of which probability is desired
Events occur randomly and independently in Poisson Distribution.
Events occur in a specific range.
To model with a Poisson Distribution, distribution should be given according to the count of events. For example, the average weight of people crossing the street in a 10-minute period is not the Poisson distribution, but the number of people who are >x kg can be modeled with the Poisson distribution.
Looking at the 2 graphs in Figure 1 and the red square randomly placed:
In the graph on the left, it is seen that while the number of events (data points) in the square is 0 in some places, it is 15–20 in some other places. This indicates that the data is not independently distributed but grouped with certain conditions, If the events (data points) are distributed randomly, independently and at the same theoretical rate across the entire plot then it does not make sense to get 15–20 events in a square if we get 0 events at another square. So, it cannot be modeled with the Poisson distribution.
When the red square is applied to different parts of the graph on the right, the number of events (data points) in the square will be close to each other. This can be modeled with the Poisson distribution compared to the other.
Here, what is modeled with Poisson is not the dataset at hand, but the numbers of events (data points) in the frames applied to the dataset.
Let’s solve some basic problems to dive into the topic.
1- One nanogram of Uranium-234 has an average of 4.6 radioactive decays per second and let’s calculate the probability of 3 radioactive decays per second based on the Poisson distribution.
Lambda = 4.6
X=3
and the following code block solves the equation:
The probabilities of values are shown in Figure 2 and if 4.6 radioactive decays per second, the probability of 3 radioactive decays 16%, and the other probabilities of other values are shown.
2- An average of 12 people visits a museum in 30 minutes. What is the probability that no new people will come to this museum in any 5 minutes?
If an average of 12 people visit in 30 minutes, then an average of 2 people will visit in 5 minutes, so lambda = 2;
If the X value, that is, the probability, is the desired value, it is 0.
The following code block solves this problem without using the Poisson distribution library:
In Figure 3, the probability of visiting up to 10 people is shown. The probability of no new visitors in 5 minutes is 13.53%.
The following list includes the real applications of the Poisson distribution:
The study aims to determine the probability of the number of goals scored by the teams when Galatasaray is home and Fenerbahçe is away (GS vs FB). In this context, the following dataset containing all match results in the Turkish league between 1959–2021 was used. To find the probability of the number of goals they will score each other in the match where Galatasaray is home and Fenerbahçe is away, it has been studied the 2019–2020 season as seen in the code block below:
The dataset (license:CC0: Public Domain) can be accessed from the link
In the first part, by choosing the 2019–2020 season with the dataset imported; home, away, home goal score, and away goal score columns are selected.In the second part, the total and the average number of goals scored by the home and away teams in the 2019–2020 season are calculated. There are a total of 18 teams in the league and 18*17 = 306 matches were played during the season, the total number of goals scored by the home teams was 493 (average: 1.611), while the total number of goals scored by the away teams was 382 (average 1.248).In the third section, the total goals scored and conceded by Galatasaray in the home matches and the average goal values ​​were calculated. Galatasaray scored 32 goals (average: 1.882) in 17 home matches and conceded 15 goals (average: 0.882).In the fourth section, the total goals scored and conceded by Fenerbahçe in the away matches and the average number of goals were calculated. The goal scored by the home team in Fenerbahce’s 17 away matches, which means Fenerbahce’s number of goals conceded is 24 goals (average of 1.412), while Fenerbahce’s number of goals scored is 17 (average 1.00).In the fifth section, the values ​​collected in the previous section were compiled and tabulated. (Figure 5)
In the first part, by choosing the 2019–2020 season with the dataset imported; home, away, home goal score, and away goal score columns are selected.
In the second part, the total and the average number of goals scored by the home and away teams in the 2019–2020 season are calculated. There are a total of 18 teams in the league and 18*17 = 306 matches were played during the season, the total number of goals scored by the home teams was 493 (average: 1.611), while the total number of goals scored by the away teams was 382 (average 1.248).
In the third section, the total goals scored and conceded by Galatasaray in the home matches and the average goal values ​​were calculated. Galatasaray scored 32 goals (average: 1.882) in 17 home matches and conceded 15 goals (average: 0.882).
In the fourth section, the total goals scored and conceded by Fenerbahçe in the away matches and the average number of goals were calculated. The goal scored by the home team in Fenerbahce’s 17 away matches, which means Fenerbahce’s number of goals conceded is 24 goals (average of 1.412), while Fenerbahce’s number of goals scored is 17 (average 1.00).
In the fifth section, the values ​​collected in the previous section were compiled and tabulated. (Figure 5)
6. In the sixth section, the attack and defense powers of Galatasaray(home) and Fenerbahçe(away) are calculated as follows:
Galatasaray attack power: The average of goals scored in the matches where Galatasaray is home / league home average
Fenerbahce attack power: The average of goals scored in the matches where Fenerbahce is away / league away average
Galatasaray defense power: The average of goals conceded by Galatasaray where Galatasaray is home / league away average
Fenerbahce defense power: The average of goals conceded by Fenerbahçe in away matches / league home average
This part can optionally be calculated using different mathematical operators.
7. In the seventh section, the average number of goals that Galatasaray will score against Fenerbahçe when it is home and the average number of goals that Fenerbahçe will score against Galatasaray when it is away are calculated by using the attack and defense powers of the teams obtained in the sixth section. (GS 1.649–0.707 FB)
Of course, since the result of the match is not likely to end 1.649–0.707, the distribution of these average values ​​with the Poisson distribution has been obtained in the following sections:
8. In the eighth episode, the probability of goals that Galatasaray will score against Fenerbahçe is shown in Figure-6.
The highest probability of Galatasaray against Fenerbahce scoring is 1 goal (31.7%) and the second one is the 2 goals with 26.14%
9. In the ninth section, the probability of goals that Fenerbahçe will score against Galatasaray is shown in Figure-7.
The highest probability of Galatasaray against Fenerbahce scoring is 0 goal (49.32%), which means Galatasaray has a 49.32% chance of not conceding a goal. The second one is the 1 goal with 34.86%.
[1] J. Letkowski, “Applications of the Poisson probability distribution.”