# Simulation of a random variable given the moment generating function after exponential tilt

The random variable $S$ follows a distribution with moment generating function $$M_S(v)=\frac{\beta\mu v}{1+(1+\beta)\mu v-M_X(v)}$$ I have been looking in some books about this m.g.f and I found that the distribution of this random variable is called compound geometric, but I have not found detailed information about the Probability Distribution of this.

I need to simulate a random variable $S_{\theta}$ whose moment generating function is: $$M_{S_\theta}(v)=\frac{M_S(v+\theta)}{M_S(\theta)}$$

Since I don't know exactly the distribution of $S$ I can't generate the random variable $S_\theta$. I only know that $P(S\leq u)=1-\Psi(u)$ that is a value that I can compute becase I have an expresion for $\Psi$.

How to proceed?

• What's the distribution of the components? Why do you want to start from the mgf? – Glen_b -Reinstate Monica Apr 20 '18 at 11:12
• But I cannot see how to generate the random variable with such moment generating function, I am applying the exponential tilting technique. – Boris Apr 20 '18 at 14:38
• Again, to return to my initial comment, it's not clear why you would try to simulate using the mgf -- it's easy to simulate directly. Why is it necessary to use the mgf to simulate? (That's not to suggest that such a task is not possible, at least approximately, but it seems to be completely unnecessary in this case) – Glen_b -Reinstate Monica Apr 21 '18 at 1:32
• I can generate S but how to generate $S_\theta$? – Boris Apr 23 '18 at 22:30
• The mgf gives little to go on. It doesn’t even tell you explicitly what the support of the rv is. You can numerically invert Levy’s formula to get the cdf and use that - which I have actually had to do before - but that is very much a last resort. – guy Sep 11 '18 at 13:57