Skip to content
Prev 43601 / 63424 Next

An extreme quantile of the geometric distribution

On Jun 30, 2012, at 12:13 , <michael.baudin at contrib.scilab.org> <michael.baudin at contrib.scilab.org> wrote:

            
Yes, but you were suggesting that non-use of log1p caused the problem, and the source clearly uses it, so I assumed that you didn't check.
I never implied that there wasn't a problem.

The gist of the comment it is that we want to ensure that (for moderate i at least)

qgeom(pgeom(i,.1),.1)==i

and that slightly lower values should also give i, whereas higher values give i+1:
[1] 1
[1] 1
[1] 2

However, floating point calculations being what they are, we don't trust equality, so we move the cutpoint a little -- apparently a little too much.