I am comparing the sum of the results of a simple Poisson Distribution with the result of the Poisson Distribution Function (CDF). I thought the results were almost similar more or less. I'm using Python, but the question is clear enough regardless of using a programming language.
I want to calculate the probability having k equal to 4 or more and i'm testing the two ways. How can I get the same result with both the simple Poisson distribution and the Poisson Distribution Function (CDF)? If it is possible, I would like to place a limit of 10 on the Poisson Distribution Function (CDF), i.e. from 4 to 10
So with the simple Poisson Distribution, add from 4 to 10 (therefore imposing the maximum limit of 10):
from scipy.stats import poisson
four = poisson.pmf(4, 1.6)
five = poisson.pmf(5, 1.6)
six = poisson.pmf(6, 1.6)
seven = poisson.pmf(7, 1.6)
eight = poisson.pmf(8, 1.6)
nine = poisson.pmf(9, 1.6)
ten = poisson.pmf(10, 1.6)
a = four + five + six + seven + eight + nine + ten
print(a)
#result is 0.078
While with the Poisson Distribution Function (CDF), I write:
b = 1-poisson.cdf(k=4, mu=1.6)
print(b)
#result is 0.023
I understand that with the simple Poisson distribution I set the limit to 10, while with the Poisson Distribution Function (CDF) there is no limit, but still the results seem too different from each other. How can I get the same result with both the simple Poisson distribution and the Poisson Distribution Function (CDF)?
The result is 0.078 with the simple Poisson Distribution, while with the Poisson Distribution Function (CDF) it is 0.023
In the first case you calculate $P(X\geq 4)\approx P(X=4)+P(X=5)+P(X=6)+\ldots+P(X=10)= 0.078 $
Cut off at $10$ and rounded to 2 decimal places. In the second case you calculate
$$1-P(X\leq 4)=P(X=5)+P(X=6)+\ldots= 0.023$$
Rounded to 2 decimal places.
You see that you have the extra $P(X=4)$ in the first case. In the case of discrete random variables we have the relation $P(X\geq x)=1-P(X\leq x-1)$. That means to get almost the same result like in the first case you have to calculate $1-P(X\leq 3)=0.079$ (rounded to 2 decimal places). As you have already mentioned, the discrepancy of $0.001$ comes from the cut off at $X=10$ in the first case.