What is the closed-form expression for inverse of geometric distribution CDF?

1k Views Asked by At

The pmf of geometric distribution is given by $p(1-p)^{x-1}$.

I want to generate the samples for a random variable which has geometric distribution.

So, the formula I found is $X=F^{-1}(u)$ where $F$ is the cdf of geometric distribution.

Is it possible to find the mathematical expression for $F^{-1}(u)$ so that by I can easily calculate the sample.

1

There are 1 best solutions below

3
On

Yes, very simple.

Start from the fact that

$$F_X(x)=1-(1-p)^x$$