The Poisson Distribution¶

The Poisson random variable describes the probability that a given number of events occurs within a fixed time interval. It is a discrete random variable with a single parameter \(\lambda\).
Probability Mass Function¶
The Poisson distribution has the PMF
where \(k=0,1,2,\ldots\)
Expectation¶
The mean of a Poisson random variable is
Proof
Variance¶
The variance of a Poisson distribution with parameter \(\lambda\) is
Proof
To calculate the variance, we use
The first term is
Binomial versus Poisson Distributions¶
We will show that the Poisson distribution is the limit of the binomial distribution as \(n\rightarrow\infty\) and \(p\rightarrow0\) while holding \(\lambda\) constant, with \(\lambda=np\).
First, we divide the fixed time interval into \(n\) subintervals so that the probability of getting 2 or more arrivals in one subinterval is negligible. Each subinterval can be described by a Bernoulli random variable and the probability of an arrival is \(p=\frac{\lambda}{n}\). The number of arrivals for the entire time interval is then described by a binomial random variable with the PMF
We can rewrite this equation, rearrange the terms as
and take the limit as \(n\rightarrow\infty\). Note that
so that
We also have
Lastly, from the definition of an exponential function, we have
We have shown that the Poisson distribution is the limit of the binomial distribution when the number of trials becomes infinitely large and the probability of success or arrival becomes very small, i.e.,
Monte Carlo Simulation¶
library(tidyverse)
# Set the parameters
p <- 0.01
n <- 300
# lambda = p*n
B <- 10000 # Number of replications
num_arrivals <- replicate(B, {
arrival <- sample(c(0,1), size = n, replace = TRUE, prob = c(1-p,p))
sum(arrival)
})
# Plot the distribution
data.frame(num_arrivals) %>%
ggplot(aes(num_arrivals, y = ..prop..)) +
geom_bar(width = 0.5, color = "dodgerblue", fill = "dodgerblue") +
labs(x="Number of Arrivals", y="Probability")
