For what value of k onwards is it pointless for a computer to compute the probability mass function of the Poisson distribution

58 Views Asked by At

I am asking my computer to compute the probability mass function of $X \sim \text{Pois}(\lambda)$, a Poisson random variable. The function is:

$$\Pr(X = k) = \frac{{e^{-\lambda} \lambda^k }}{k!}$$

I know that for some value of $k$, the probability $\Pr(X = k)$ will be negligibly small, say, smaller than $1 \times 10^{-16}$. Is there a function of $\lambda$ that approximates what this value of $k$ should be?

1

There are 1 best solutions below

4
On BEST ANSWER

You can certainly define one. Let $IP(\lambda, p)$ be the smallest $k$ such that $\frac {e^{-\lambda}\lambda^k}{k!} \lt p$. It will do funny things when $\lambda$ is large because no bin may have much content or when $p$ is not small, but will do what you expect in the range of interest.

To compute it, you can use Stirling's approximation on the factorial to say $\frac {e^{-\lambda}\lambda^k}{k!}\approx \frac {e^{-\lambda}(e\lambda)^k}{k^k\sqrt{2 \pi k}}$ This can't be solved for $k$ analytically (except using the W function) but it is easy to solve numerically. For $p=1E-16$ I find $$\begin {array} {c|c} \lambda&k\\ \hline 0.01&6.404739\\0.1&9.702412\\1&17.81112\\2&22.66661\\3&26.52406\\4&29.88898\\5&32.94789\\10&45.87589\\20&66.85164\\30&85.16933\\40&102.1354\\50&118.2484\\\end {array}$$ For small $\lambda$ the $\lambda^k$ term will do most of the work bringing down $p$, for moderate $\lambda$ it will be the $k!$ and for large $\lambda$ it will be the $e^{-\lambda}$