Loading content...
In probability theory and statistics, the Poisson distribution is a fundamental discrete probability distribution that models the likelihood of a given number of events occurring within a fixed interval of time, space, or any other continuous domain. This distribution is particularly powerful when events occur independently at a constant average rate.
The Poisson distribution is characterized by a single parameter λ (lambda), which represents the expected number of occurrences (mean rate) in the specified interval. The probability of observing exactly k events is given by the Poisson Probability Mass Function (PMF):
$$P(X = k) = \frac{\lambda^k \cdot e^{-\lambda}}{k!}$$
Where:
Key Properties of the Poisson Distribution:
Your Task: Implement a Python function that computes the probability of observing exactly k events given the average rate λ using the Poisson distribution formula. Your function should return the computed probability rounded to 5 decimal places for precision.
k = 3, lam = 50.14037With λ = 5 (expected 5 events on average) and k = 3 (observing exactly 3 events):
• λ^k = 5^3 = 125 • e^(-λ) = e^(-5) ≈ 0.006738 • k! = 3! = 6 • P(X = 3) = (125 × 0.006738) / 6 ≈ 0.14037
There is approximately a 14.04% chance of observing exactly 3 events when the average rate is 5.
k = 0, lam = 20.13534With λ = 2 (expected 2 events on average) and k = 0 (observing zero events):
• λ^k = 2^0 = 1 (any number raised to power 0 is 1) • e^(-λ) = e^(-2) ≈ 0.13534 • k! = 0! = 1 (by definition, 0 factorial equals 1) • P(X = 0) = (1 × 0.13534) / 1 ≈ 0.13534
There is approximately a 13.53% probability of observing no events when the expected average is 2. This represents the probability that in a given interval, nothing occurs despite expecting 2 occurrences on average.
k = 5, lam = 50.17547With λ = 5 (expected 5 events on average) and k = 5 (observing exactly 5 events):
• λ^k = 5^5 = 3125 • e^(-λ) = e^(-5) ≈ 0.006738 • k! = 5! = 120 • P(X = 5) = (3125 × 0.006738) / 120 ≈ 0.17547
When k equals λ, we are calculating the probability of observing exactly the expected number of events. This is the mode (most likely value) for integer λ, with approximately 17.55% probability.
Constraints