Untitled
unknown
plain_text
a year ago
484 B
1
Indexable
Never
import numpy as np import matplotlib.pyplot as plt from scipy.stats import poisson # Mean for the Poisson distribution mu = 1.64706 # Values of k (number of cases) k_values = np.arange(0, 10) # Calculate the probabilities probabilities = poisson.pmf(k_values, mu) # Create a bar plot plt.bar(k_values, probabilities, color='blue', alpha=0.7, align='center') plt.title('Poisson Distribution: $\mu=1.64706$') plt.xlabel('Number of Cases ($k$)') plt.ylabel('Probability') plt.show()