The Poisson formula is a fundamental probability distribution used to model the number of events occurring within a fixed interval of time or space, given that these events occur with a known constant mean rate and independently of the time since the last event.
It's particularly useful for situations where the probability of an event is low, and the number of trials is very large. Common applications include:
The number of customers arriving at a store per hour.
The number of emails received per minute.
The number of defects in a manufactured item per square meter.
The number of phone calls received by a call center per hour.
The number of radioactive decays in a given time interval.
The Formula
The probability mass function (PMF) for the Poisson distribution is:
P(X=k) = (λ^k * e^-λ) / k!
Where:
P(X=k) is the probability that exactly k events occur.
λ (lambda) is the average number of events in the given interval (the rate parameter). It must be a positive real number.
k is the actual number of events observed or hypothesized. It must be a non-negative integer (0, 1, 2, …).
e is the base of the natural logarithm, approximately 2.71828.
k! (k factorial) is the product of all positive integers up to k. (e.g., 5! = 5 * 4 * 3 * 2 * 1 = 120). By definition, 0! = 1.
How This Calculator Works
This calculator takes your specified average rate (λ) and the number of events (k) you're interested in. It then applies the Poisson formula to calculate the probability of observing exactly k events when the average rate is λ. The result is a probability value between 0 and 1.
Example Usage
Let's say a certain website receives an average of 5 visitors per minute (λ = 5). What is the probability that exactly 2 visitors will arrive in a given minute (k = 2)?
Using the calculator with λ = 5 and k = 2:
P(X=2) = (5^2 * e^-5) / 2!
P(X=2) = (25 * 0.006738) / 2
P(X=2) = 0.16845 / 2
P(X=2) ≈ 0.0842
So, there is approximately an 8.42% chance of exactly 2 visitors arriving in a given minute.
function factorial(n) {
if (n 1; i–) {
result *= i;
}
return result;
}
function calculatePoisson() {
var lambda = parseFloat(document.getElementById("lambda").value);
var k = parseInt(document.getElementById("k").value);
var resultDiv = document.getElementById("result");
if (isNaN(lambda) || isNaN(k)) {
resultDiv.innerHTML = "Please enter valid numbers for both fields.";
resultDiv.style.backgroundColor = "#ffc107"; // Warning yellow
resultDiv.style.display = "block";
return;
}
if (lambda <= 0) {
resultDiv.innerHTML = "Average Rate (λ) must be positive.";
resultDiv.style.backgroundColor = "#dc3545"; // Danger red
resultDiv.style.display = "block";
return;
}
if (k =0 check should prevent this)
resultDiv.innerHTML = "Error calculating factorial.";
resultDiv.style.backgroundColor = "#dc3545"; // Danger red
resultDiv.style.display = "block";
return;
}
var probability = (lambdaPowK * ePowLambda) / kFactorial;
resultDiv.innerHTML = "P(X=" + k + ") = " + probability.toFixed(6);
resultDiv.style.backgroundColor = "var(–success-green)"; // Success green
resultDiv.style.display = "block";
}