I have a p-value definition as follows and I would like to implement it.
However, I am not sure how to programmatically write the possion approximation (as it goes upto infinity).
The values of n1, n2, n3, n4, n5 and N are as follows.
n1 = 102
n2 = 95
Calculating λ:
n3 = 1350
n4 = 3588
n5 = 886
N = 10382
So my λ would be 421.41
I followed scipy.stats.poisson
documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.poisson.html
from scipy.stats import poisson
poisson.pmf(x, mu)
However, as I understand the calculation happens at 1 point. Therefore, I am not sure how to adapt it into my scenario. i.e. calculating from i = n1+n2, ..., ∞. (please bear with me as my understanding of statistics is very low). I would really appreciate any help in this regard.
I am happy to provide more details if needed.
Thank you.
-Emi