'Find a probability of Poisson distribution in R

Can somebody help me how can I calculate a probability p from the Poisson equation (programming in R)? I know that there is the ppois function, but I'm not sure if I'm able to use it here somehow ... The equation:

the photo of equation



Solution 1:[1]

Perhaps you can try uniroot + ppois like below to solve p

> (p <- uniroot(function(p) ppois(5, 650 * p) - 0.5, c(0, 1), tol = 1e-10)$root)
[1] 0.008723325

and you can verify

> ppois(5, 650 * p)
[1] 0.5

or

> sum(dpois(0:5, 650*p))
[1] 0.5

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1