poisson.pmf returns the probability of observing exactly k events when a Poisson process has rate parameter lam. It provides a direct SciPy implementation of the Poisson probability mass function. section 3.1.4
Calculate an event-count probability
Import poisson from scipy.stats, then call poisson.pmf(k, lam). With lam = 2 and k = 4, the probability is approximately 9.02%. With lam = 10 and k = 8, it is approximately 11.26%. These values match the calculation from the Poisson PMF formula, exp(-lam) × lam**k / k!. section 3.1.4
