Glam Prestige Journal

Bright entertainment trends with youth appeal.

$\begingroup$

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.

$\endgroup$

1 Answer

$\begingroup$

Yes, very simple.

Start from the fact that

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

$\endgroup$ 3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy