Poisson Distribution
Defintion
Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occuring in a fixed interval of time or space if these events occur with a known constant mean rate and independently of the time since the last event.
The PMF for the Poisson distribution is:
where \(x\) is the number of occurences and \(e\) is the Euler's number. Poisson distribution is denoted by \(X \sim \mathcal{Poi}(\lambda)\).
Figure 1 shows the PMF and CDF of \(\mathcal{Poi}(2)\) and \(\mathcal{Poi}(4)\).
Mean and Variance
Recall that the moment-generating function for discrete random variables is:
Then moment-generating function for Poisson distribution is:
Note her that we used:
The first and second derivatives of the moment-generating function are:
Then the expected value of Poisson distribution is:
The variance is the central second moment:
Properties
The sum of finite independent set of Poisson variables is also Poisson. Specifically, if \(X_i \sim \mathcal{Poi}(\lambda_i)\), then \(Y = X_1 + \cdots + X_k\) is distributed as \(\mathcal{Poi}(\lambda_1 + \cdots + \lambda_k)\).
Appendix
Plotting Script
from scipy.stats import poisson
import numpy as np
from matplotlib import pyplot as plt
## Poisson distribution
lambda_1, lambda_2 = 2, 4
pd_1, pd_2 = poisson(lambda_1), poisson(lambda_2)
x = np.arange(0, 21)
fig, ax = plt.subplots(1, 2)
ax[0].set_title("Poisson Distribution PMF")
ax[0].set_xlim((-0.5, 20.5))
ax[0].plot(x, pd_1.pmf(x), "-o", label="lambda = {}".format(lambda_1), alpha=1.0)
ax[0].plot(x, pd_2.pmf(x), "-o", label="lambda = {}".format(lambda_2), alpha=0.7)
ax[0].set_box_aspect(1)
# ax[0].set_xticks(x)
ax[0].set_xlabel("x")
ax[0].set_ylabel("Probability")
ax[0].grid(True)
ax[0].legend()
ax[1].set_title("Poisson Distribution CDF")
ax[1].set_xlim((-0.5, 20.5))
ax[1].plot(x, pd_1.cdf(x), "o", label="lambda = {}".format(lambda_1), alpha=1.0)
ax[1].plot(x, pd_2.cdf(x), "o", label="lambda = {}".format(lambda_2), alpha=0.7)
ax[1].set_box_aspect(1)
# ax[1].set_xticks(x)
ax[0].set_xlabel("x")
ax[1].set_ylabel("Probability")
ax[1].grid(True)
ax[1].legend()
fig.tight_layout()
fig.savefig("poisson_distribution.png", dpi=800, bbox_inches="tight")