# Infinity in Quantile value of Poisson distribution

Here, the quantile of Poisson distribution for the last two values of X creates an infinity value.
I am not able to digest it. I will be glad if you can help out in getting these two values. It is supposed to be approx to them i.e. 119 and 139.
Thanks

``````x=c(2.54,5.08,7.62,7.62, 10.16,12.70,15.24,15.24 , 17.78,
20.32,22.86,25.40,27.94 ,27.94,30.48 ,30.48,33.02,35.56,38.10,
40.64,43.18 ,45.72, 48.26,58.42,68.58,88.90,93.98,119.38,139.70)
m=mean(x)
a=ppois(x,lambda = mean(x))
qpois(a, lambda = mean(x))

``````
``````> .Machine\$double.eps
[1] 2.220446e-16
> qpois(1- .Machine\$double.eps, m)
[1] Inf
> qpois(1- .Machine\$double.eps*2, m)
[1] 95
``````

A computer has finite precision. When you're close enough to 1, it's considered the same as 1, and of course the quantile q such that P(x < q) = 1 is infinite.

``````> a
[1] 8.703564e-15 9.383387e-12 3.613564e-10 3.613564e-10 3.285659e-08 4.062868e-07
[7] 9.897512e-06 9.897512e-06 6.012026e-05 5.971635e-04 2.171715e-03 1.101788e-02
[13] 2.701248e-02 2.701248e-02 8.112321e-02 8.112321e-02 1.880264e-01 2.904809e-01
[19] 4.746620e-01 6.006540e-01 7.652391e-01 8.483505e-01 9.305907e-01 9.982444e-01
[25] 9.999905e-01 1.000000e+00 1.000000e+00 1.000000e+00 1.000000e+00
> a[29] == 1
[1] TRUE
> a[28] == 1
[1] TRUE
> a[27] == 1
[1] FALSE
``````

You can even see how the last 2 probabilities are considered `== 1` by a computer with limited precision.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.