Poisson Distribution: 2 Minutes Explanation

Datasans
2 min readJan 2, 2023

Poisson Distribution is a probabilistic model used to determine the probability of an event occurring within a certain time or space. The event can be anything, such as the number of visits to a museum in a day, the number of car accidents in a month, or the number of spam messages in your inbox in a week.

Mathematically, the Poisson Distribution can be written as follows:

where:

f(x,λ) is the Poisson distribution function that calculates the probability of x events occurring within a certain time or space λ is the average number of events within that time or space e is the natural logarithm base (2.71828…) x! is the factorial of x (for example, 5! = 5 * 4 * 3 * 2 * 1)

Example

Let’s say you want to calculate the probability of the number of visits to a museum in a day. You already know that the average number of visits to the museum is 100 people per day. Using the Poisson Distribution, you can calculate the probability of a particular number of visits in a day. For example, the probability of 105 visits in a day is:

f(105; 100) = (e^(-100)) * (100¹⁰⁵) / 105! = 0.0157

This means there is a 1.57% chance of 105 visits to the museum in a day.

Here is an example Python script that can be used to calculate the Poisson Distribution:

from math import exp, factorial 
def poisson(x, lambd):
return (exp(-lambd) * (lambd**x)) / factorial(x)

# Calculate the probability of 105 visits to the museum in a day
# With an average of 100 visits per day
prob = poisson(105, 100)
print(prob)

Output:

0.034400657738926

Poisson Distribution is a useful tool for calculating the probability of an event occurring within a certain time or space. It can be applied to a wide range of real-world situations, such as predicting the number of visits to a museum or the number of car accidents in a given area. By understanding the underlying mathematical formula you can make more informed decisions based on statistical analysis.

Thank You!

--

--

Datasans

All things about data science that are discussed “sans ae”, data sains? sans lah…