# Poisson probability models
In contrast to the Binomial distribution, in which we are counting the number of successes in a fixed, *pre-established*, number of trials, there are situations where we want to model a random count, but it is not well articulated in terms of successes and failures. For example, suppose I want to study the number of customers arriving at a coffee shop between 9 am and noon on a given Monday. There are two Binomial perspectives on how to model this, but they are both a little cumbersome.
- We *could* take every person in the city and assign a probability that they would visit the coffee show. In this case it is true that we could treat each person's arrival at the coffee shop as a success (they stopped by 😄) or a failure (they went elsewhere 😢), but the assumption the trials are identically distributed is not met: some people live close; some live far; some drink coffee; some have other favorite morning drinks.
- Also an alternative, we could look from the perspective of each minute between 9 am and noon and ask, "Did someone show up between 9:00 and 9:01?" then "Did someone show up between 9:01 and 9:02" and so on. This is a sequence of successes and failures as well, and if we assume that time of day does not severely affect the probability that someone has arrived, this perspective could work.
It turns out that the the second perspective can be made rigorous and if we conduct one of the most productive techniques in all of mathematics -- studying more and more intervals that are shorter and shorter in duration -- there is a limiting distribution that is universal in some sense: the Poisson distribution.
>[!QUOTE] Poisson Random Variable
>We say that a random variable $X$ is Poisson distributed with mean $\mu$, denoted $X \sim \mathrm{Pois}(\mu),$ if for each $x \in \mathbb{Z}_{\geq 0}$ we have
>$
>P(X = x) = \frac{e^{-\mu} \mu^x}{x!}.
>$
>The key properties of the Poisson distribution are:
>$
>E(X) = \mu \, \text{ and } \mathrm{Var}(X) = \mu.
>$
Here are two examples of the Poisson distribution, with means 5 and 50 respectively. In the first figure the region associated with $\mathbb{P}(X \leq 3)$ is shaded in orange.
![[pmf-Poisson5.png]]
![[pmf-Poisson50.png]]
We use the Poisson distribution as the most basic model for population counts in which the presence/non-presence of individuals have no impact on each other. For example, suppose that customers arrive at a store with rate $\lambda$ individuals per hour. Then, if we assume that the arrival times of some individuals have no influence of the arrival times of others, we use the probability model $X \sim \mathrm{Pois}(\lambda t)$ for the number of customers that arrive over a span of $t$ minutes. Below are five random samples of a Poisson process with rate $\lambda = 5$ over an interval of time $[0,10]$. The expected number of arrivals is 50, but as we see above, reasonable outcomes range from 30 to 70.
![[PoissonArrivals_l5_t10.png]]
In an ecological setting, if we assume that the locations of critters in a landscape are independent of each other, then we can use a Poisson distribution for the number of critters in an area $A$ by setting the mean parameter $\mu$ to the product of the critter density times the area of study.
### Derivation from Bernoulli trials
The Poisson distribution can be derived as a special limit of Binomial random variables where there are more and more trials $(n \to \infty)$, but with lower and lower success probabilities $(p_n \to 0)$. Let’s think about this from the perpective of independent arrivals of customers to a store.
Suppose that we want model how many customers arrive to a store between the hours of 9 am and noon. We will assume that the rate of arrivals ($\lambda$ per hour) is constant throughout the time period.
The **1/n-Binomial model for arrivals** is constructed as follows. We divide our total time duration $t$ into $n$ equal intervals of duration $t/n$. Then for each tiny subinterval we define a Bernoulli trial representing the event that an arrival might occur during the interval. Mathematically, we write for the $i$th interval:
$
Y_i = \begin{cases} 1, & \text{with probability } 1 - e^{-\lambda t/n}; \\ 0, & \text{with probability } e^{-\lambda t/n}. \end{cases}
$
Let $X_n$ represent the number of arrivals when there are $n$ subintervals. So $X_n = \sum_{i = 1}^n Y_i$ and $X_n \sim \mathrm{Binom}\big(n, p = 1 - e^{-\lambda t/n}\big)$.
An interesting thing happens as we divide the interval $[t_0, t_0 + t]$ into smaller and smaller subintervals. The probability that an arrival occurs in any particular subinterval gets smaller and smaller, but this is balanced by the total number of intervals getting larger and larger. The balance can be expressed in terms of the overall expected number of arrivals.
First, we will need an assist from calculus, which gives us the following Taylor series form for the exponential function:
$
\begin{aligned}
\lim_{n \to \infty} E(X_n) &= \lim_{n \to \infty} n \big(1 - e^{-\lambda t/n}\big)\\
&= \lim_{n \to \infty} n \left(1 - \left(1 - \frac{\lambda t}{n} + \frac{1}{2} \frac{\lambda^2 t^2}{n^2} + R\Big(\frac{\lambda t}{n}\Big)\right)\right) \\
&= \lambda t
\end{aligned}
$
In the following proposition, we learn that such a sequence of Binomials converges to a Poisson random variable in the limit. In the end, the Poisson model for arrivals states that if the rate of arrivals is a constant $\lambda > 0$, then the number of arrivals during an interval $[t_0, t_0 + t]$ has distribution
$
X \sim \mathrm{Pois}\big(\mu = \lambda t\big).
$
>[!NOTE] Proposition: Poisson as a limit of Binomials
>Let $\{p_n\}_{n \in \mathbb{N}}$ be a sequence of values between 0 and 1 such that
>$
>p_n \to 0 \, \text{ and } n p_n \to \mu \text{ as } n \to \infty.
>$
>If $\{X_n\}_{n \in \mathbb{N}}$ is a sequence of independent random variables with $X_n \sim \mathrm{Binom}(n, p_n),$ then
>$
>X \coloneqq \lim_{n \to \infty} X_n \text{ exists, and } X \sim \mathrm{Pois}(\mu).
>$
^poisson-from-binomials
The proof is given [[#Proof of the Poisson distribution as a limit of Binomial random variables|below]].
#### Mean, Variance, and Standard Deviation from the Binomial Limit
Given this derivation of the Poisson distribution from Binomial experiments, we can readily compute the mean, variance and standard deviation of the Poisson distribution.
Assuming, as in the preceding proposition, that we have a sequence of probabilities satisfying $n p_n \to \mu$, then the mean and the variance of limiting random variable follow quickly.
$
E(X) = \lim_{n \to \infty} E(X_n) = \lim_{n \to \infty} n p_n = \mu
$
and
$
\mathrm{Var}(X) = \lim_{n \to \infty} \mathrm{Var}(X_n) = \lim_{n \to \infty} n p_n (1-p_n) = \mu
$
where, in the last equality, we have observed that $p_n \to 0$ implies that $(1 - p_n) \to 1$ as $n \to \infty.$
By the standard square root rule, we have that $\mathrm{SD}(X) = \sqrt{\mu}.$
---
## Expression in terms of point processes
A spatial point process is a stochastic model for a random distribution of dots in a given landscape. For a one-dimensional process, the locations of the dots might represent the arrival times of customers to a store. For a two-dimensional process, the locations of the dots might represent the GPS coordinates of individual animals in a landscape.
>[!QUOTE] Definition (informal): Spatial point processes
>A spatial point process in a domain $\mathcal{O}$ is a collection of points, $\mathbf{X} = (X_1, X_2, \ldots X_N)$, where both the number of points $N$ and the locations of the points $X_i \in \mathcal{O}$ are random. We often require that no two points can be in the exact same place.
>
>Mathematically speaking, point processes are commonly expressed in terms of their corresponding counting measures. Namely, we say that $\mathcal{N}$ is a spatial point process if for any set $A \subset \mathcal{O},$ $\mathcal{N}(A) = \sum_{i=1}^N 1_{X_i \in A},$ i.e. $\mathcal{N}(A)$ is the number of points in the process that are located in the set $A.$
The rigorous mathematical definition of spatial point processes is quite technical. For a fuller story, check out the Wikipedia page here: [https://en.wikipedia.org/wiki/Point_process](https://en.wikipedia.org/wiki/Point_process.)
While natural processes arise from a wide array of interactions and environmental cues, we always need a null model as a base point for comparison. For example, we can only assess the degree of clustering in a population if we understand what non-clustered populations look like. Therefore we would like to propose a model that observes the following independence principle.
>[!QUOTE] Assumption: Spatial (or temporal) independence
>Suppose that $\mathcal{N}$ is a spatial point process on $\mathcal{O}.$ We say that $\mathcal{N}$ satisfies _spatial independence_ if for any collection of disjoint sets $A_1, A_2, \ldots, A_k$ in the domain, the random variables $\mathcal{N}(A_1), \mathcal{N}(A_2), \ldots, \mathcal{N}(A_k)$ are independent of each other.
>
>In the one-dimensional case where the domain is an interval meant to represent time, we call this property _temporal independence._
>[!quote] Definition: Poisson point processes
>A spatial point process $\mathcal{N}$ is called a _Poisson point process_ if
> - it satisfies spatial independence, and
> - there is an intensity (or rate) parameter $\lambda$ such that for any set $A \subset \mathcal{O},$ we have that $\mathcal{N}(A) \sim \mathrm{Pois}(\lambda |A|)$ where $|A|$ is the volume (area, or length) of the set $A$.
>
> A spatial point process that satisfies spatial independence is called a _Poisson process_.
---
## Technical details
#### Proof of the Poisson distribution as a limit of Binomial random variables
This proof of [[#^bc5a43 |this proposition]] follows from the application of two general facts.
First, we use an extension of the definition of $e$. by definition, $e \coloneqq \lim_{n \to \infty} \big(1 + \frac{1}{n}\big)^n.$ In fact,
$
\text{if } c_n \to c, \text{ then } \lim_{n \to \infty} \Big(1 + \frac{c_n}{n}\Big)^n = e^c.
$
Second, we will need [Stirling’s approximation](https://en.wikipedia.org/wiki/Stirling%27s_approximation) for $n!$, which can be written in the form
$
n! = \sqrt{2 \pi n}\left(\frac{n}{e}\right)^n \big(1 + s_n\big), \text{ where } \lim_{n \to \infty} n s_n = \frac{1}{12}.
$
To proceed with the proof, let $p_n$ be a vanishing sequence of values in $(0,1)$ such that $\lim_{n \to \infty} n p_n = \mu$. It follows that we can rewrite $p_n$ as a sequence of the form $p_n = \frac{\mu}{n} + a_n$ where $\lim_{n \to \infty} n a_n = 0$:
$
\begin{aligned}
\lim_{n \to \infty} P(X_n = k) &= \lim_{n \to \infty} \binom{n}{k} \, p_n^k \,(1 - p_n)^{n-k} \\
&= \frac{1}{k!} \frac{n!}{(n-k)!} \frac{p_n^k}{(1-p_n)^k} (1-p_n)^n
\end{aligned}
$
Since the limit of a product is a product of the limits (when the limiting factors are all finite), we can treat the factors separately. First notice what happens if we take the last factor and re-express in terms of $a_n.$
$
\lim_{n \to \infty} (1 - p_n)^n = \lim_{n \to \infty} \Big(1 - \frac{\mu + n a_n}{n}\Big)^n = e^{-\mu}.
$
Now, using Stirling’s approximation, we can write
$
\frac{n!}{(n-k)!} = \sqrt{\frac{n}{n-k}} e^{-k} \left(\frac{n}{n-k}\right)^{n-k} n^k \frac{1 + s_n}{1 + s_{n-k}}.
$
Two of these factors will not contribute in the $n \to \infty$ limit,
$
\lim_{n \to \infty} \sqrt{\frac{n-k}{n}} = 1, \, \text{ and } \lim_{n \to \infty} \frac{1 + s_n}{1 + s_{n-k}} = 1.
$
Meanwhile
$
\left(\frac{n}{n-k}\right)^{n-k} = \frac{1}{\big(1 - \frac{k}{n}\big)^n} \Big(1 + \frac{k}{n}\Big)^k = e^k
$
which cancels with the factor $e^{-k}$ that appears earlier in the product. Finally, if we pull $n^k$ out and apply it to the third factor in the original product, we have
$
\frac{(n p_n)^k}{1 - p_n^k} = \mu^k
$
Altogether we have that
$
\lim_{n \to \infty} P(X_n = k) = \frac{e^{-\mu}{\mu^k}}{k!}
$
as desired. ~~~