Normal distribution is continuous, while Poisson is discrete. However, like the binomial distribution, a large enough Poisson distribution will approximate a normal distribution with a specific mean and standard deviation.
from numpy import random import matplotlib.pyplot as plt import seaborn as sns sns.distplot(random.normal(loc=50, scale=7, size=1000), hist=False, label=‘normal’) sns.distplot(random.poisson(lam=50, size=1000), hist=False, label=‘poisson’) plt.show() |
The binomial distribution has only two possible outcomes, while the Poisson distribution can have unlimited outcomes. However, when n is very large and p is near zero, the binomial distribution closely resembles the Poisson distribution, where n * p is approximately equal to λ.
from numpy import random import matplotlib.pyplot as plt import seaborn as sns sns.distplot(random.binomial(n=1000, p=0.01, size=1000), hist=False, label=‘binomial’) sns.distplot(random.poisson(lam=10, size=1000), hist=False, label=‘poisson’) plt.show() |