import numpy as np
import scipy.stats as st
import matplotlib.pyplot as pltX = st.poisson(1.5 / 100 * 48)# a.
X.pmf(0)0.4867522559599717
X.cdf(0)0.4867522559599715
# b.
np.sum(X.pmf(np.arange(6)))0.9998951831177709
X.cdf(5)0.9998951831177708
# c.
X = st.poisson(1.5 / 100 * 24)
1 - np.sum(X.pmf(np.arange(3)))0.00595077061399496
1 - X.cdf(2)0.00595077061399496
# Why is the answer to part b so big? Is the density at 5 big too?X.pmf(5)0.0007848546020606052
1.5 / 100 * 480.72
x = np.arange(10)
plt.scatter(x, X.pmf(x))