Exponential distribution describes the time until the next event occurs, such as failure or success. It has two parameters:
Generate a sample from an exponential distribution with a scale of 2.0, resulting in a 2×3 array.
from numpy import random x = random.exponential(scale=2, size=(2, 3)) print(x) |
from numpy import random import matplotlib.pyplot as plt import seaborn as sns sns.distplot(random.exponential(size=1000), hist=False) plt.show() |
Poisson distribution focuses on the number of occurrences of an event within a specific time period, while exponential distribution describes the time intervals between these events.