The link between Poisson and Exponential distribution
By: Valentina Alto
Tags: Poisson, Random Variable, Probability, Exponential Distribution, Statistics

When you are dealing with random experiments, linked to a set of possible outcomes, it is useful to assign to each of the possible outcomes (which might be not numerical, like events) a real number, so that you can make useful computations.

The function which assigns to each event of the space of outcomes a real number is called Random Variable. More formally, given a measurable space ( Ω, A), a random variable is a function defined on Ω with codomain in R, Borel-measurable with respect to the algebra A.

A Random variable can be:

Discrete, if it can only take a countable number of values

Continuous, if it can take infinitely many values

Random variables are provided with a probability distribution function, which assigns to each value of the function X a number between 0 and 1. This number is a probability and it defines the likelihood of occurrence of that outcome. We will refer to that function as p(x). Note that, in order to be a probability function, the function p(x) has to respect two conditions:

p(x) cannot be negative (non-negativity)

the summation of all of its values (in the continuous case, the integral between minus infinity and infinity) must be equal to 1 (normalization condition)

In this article, I’m going to explain two important probability distribution functions (one for each kind of random variable) which are conceptually correlated. Those are the Poisson Distribution (for the discrete case) and the Exponential Distribution (for the continuous case).

Let’s first dwell on each of them.

Poisson Distribution

The Poisson distribution is used to model random variables that count the number of events taking place in a given period of time or in a given space. Namely, the number of landing airplanes in one hour, or the number of calls received in a call-center in 45 minutes, or the number of cars passing in your street in a day.

The probability mass function (pmf) of Poisson distribution is:

And a Poisson random variable is expressed like:

Let’s see the shape of the probability mass function with different values of lambda:

parameters=list([1,20,30,50])

for i in parameters:

poisson=np.random.poisson(i,10000)

count, bins, ignored=plt.hist(poisson, 14, normed=True)

plt.title('lambda={}'.format(i))

plt.show()

Let’s consider a numerical example. Imagine you want to predict the number of clients who will enter your shop in the next hour. You also know that, on average, each hour around 8 clients enter your shop.

If you want to know which is the probability that exactly 5 clients will enter your shop in the next hour, the computation will be the following:

On the other hand, if we want to compute the probability that no more than 1 client will enter your shop:

Now, it might be interesting to inquire about one other information about this problem, that is, the time between each client entering the shop. This information can be derived by modeling that time, which is a continuous value, with an exponential distribution.

Exponential Distribution

If the Poisson distribution deals with the number of occurrences in a fixed period of time, the exponential distribution deals with the time between occurrences of successive events as time flows by continuously. Random variables with this distribution are continuous, hence they will have a probability density function (pdf) like that:

And if a random variable X follows an exponential distribution, we write:

Here there are the shapes of three different distribution, with beta equal to, respectively, 1, 2 and 5.

How can we relate the two distributions

Basically, given an interval of time [0, T], the Exponential distribution is the continuous waiting time (measured as a fraction of T) for events whose number, in a fixed time interval [0, T], is a random variable N ∼ Po(λ). Hence, if N is the number of events which are likely to occur in the interval of time [0,T], and X is the waiting time for the next event, then:

Let’s recall the example above, where, on average, each hour 8 clients enter your shop, hence N ∼ Po(8). Imagine we want to compute the probability that we have to wait to more than 15 minutes before a new client enters the shop. How shall we proceed?

First, we need to find our beta, which is equal to 1/lamda. However, since the problem is asking for waiting time in minutes, we need to convert our parameter: if in 1 hour 8 clients enter the shop, it means that, each minute, 8/60=0.13 clients enter the shop. Hence, beta will be equal to 1/0.13=7.5.

Now we can compute the probability as follows:

Finally, to have a better understanding of the relationship between the two distributions, let’s consider this last example, always related to the problem of clients above.

We said that lambda is the average number of clients that pass per unit of time, which is 1 hour, hence in our example lambda=8. We know, however, that the actual number will vary — some days more, some days less. Poisson Distribution allows us to model this variability.

Now, an average of 8 clients per hour equates to an average of 0.13 clients entering by each minute. Again though, we know there’s going to be variability in the amount of time between each client. Exponential Distribution allows us to model this variability.