# Poisson distribution calculate event from probability

I know if I have the average $\lambda$ of the number of times an event occurs in a time interval and the number of occurred events $k$ then I can calculate the probability $p$ for a Poisson distribution.

To get the number of events that occurred for a certain probability $p$ while also having the average number of times an event occurs $\lambda$ since for this probability something is unusual and by knowing the number of events, I can observe and if the number of events occurred $k$ I am informed and can do something about it.

Now, the real question is: Is there is a way (an inverse equation, for example) that I can go for to calculate the number of events $k$ given $p$ and $\lambda$? Or this can only be done by using trial and error and by increasing the number of events $k$ until I reach the desired probability $p$? Thanks.

• Welcome to Cross Validated! Please take a moment to view our tour. In regards to your question, it depends. Some software have inverse Poisson, some don't. In the end, you can usually program such a function. What method are you hoping to use to solve your problem? Commented Mar 4, 2017 at 21:19
• Going back through your question, are you trying to solve for $p$ or $k$? You end up asking both rather interchangeably at the end. Commented Mar 4, 2017 at 21:25
• I am solving for k. hoping to use inverse if there is one Commented Mar 4, 2017 at 21:27

## 1 Answer

Given the way $k$ enters in the Poisson pmf (i.e. through $k!$), I believe you can do it only through a simple computational program: Since $k$ is an integer, if shouldn't be too timeconsuming, and the solution is unique: a not very elegant R solution could be:

lambda=5; p=0.146 which(round(dpois(seq(0:100), lambda),3)==p)

which returns $k=6$. Of course, your actual problem may be more complicated than this.

On the other hand, usually obtaining $k$ is not of interest per se, as you may want to obtain the expected number of events. So, your question is a bit obscure on that regard.