Poisson distribution

Imagine we are counting the number of red cars passing through an avenue per hour. We could use Poisson distribution to describe this data. Poisson distribution is generally used to describe the probability of a given number of events occurring on a fixed time/space interval. Thus, the Poisson distribution assumes that the events occur independently of each other and at a fixed interval of time and/or space. This discrete distribution is parametrized using only one value,  (the rate, also commonly represented with the Greek letter ).  corresponds to the mean and also the variance of the distribution. The probability mass function of Poisson distribution is as follows:

The equation is described here:

  • is the average number of events per unit of time/space
  •  is a positive integer value {0, 1, 2, ...}
  •  is the factorial of , that is, .

In Figure 4.10, we can see some examples of the Poisson distribution family for different values of :

mu_params = [0.5, 1.5, 3, 8]
x = np.arange(0, max(mu_params) * 3)
for mu in mu_params:
y = stats.poisson(mu).pmf(x)
plt.plot(x, y, 'o-', label=f'μ = {mu:3.1f}')
plt.legend()
plt.xlabel('x')
plt.ylabel('f(x)')

Figure 4.10

Note that  can be a float, but the output of the distribution is always an integer. In Figure 4.10, the dots represent the values of the distribution, while the continuous lines are a visual aid to help us easily grasp the shape of the distribution. Remember, the Poisson distribution is a discrete distribution.

The Poisson distribution can be seen as a special case of the binomial distribution when the number of trials  is very large but the probability of success  is very low. Without going into too much mathematical detail, let's try to clarify this statement. Following the car example, we can affirm that we either see the red car or we do not, thus we can use a binomial distribution. In that case we have:

Then, the mean of the binomial distribution is:

And the variance is given by:

But note that even if you are in a very busy avenue, the chance of seeing a red car compared to the total number of cars in a city is very small, and therefore we have:


So, we can make the following approximation:

Now, the mean and the variance are represented by the same number, and we can confidently state that our variable is distributed as a Poisson distribution:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.42.87