0
$\begingroup$

I have an exercise in a basic simulation course asking me to use the inverse function method to describe an algorithm to generate a sample of a random variable whose distribution function is given.

The method is sampling a uniform variable $U\sim U(0,1)$ and then return $F^{-1}(u)$ where $u$ is the sampled value.

I'm having a technical difficulty finding the inverse of the distribution function, which is defined differently on different intervals and on $[0,1]$ is defined by $$\frac{1}{2}x^{3}+\frac{1}{2}(1-e^{-x})$$

I tried to solve $$\frac{1}{2}x^{3}+\frac{1}{2}(1-e^{-x})$$

and got stuck at $$x^{3}-e^{-x}=2y-1$$

I would appreciate help continuing further

  • 0
    We are doing this numerically, right?2017-02-03
  • 0
    @SimplyBeautifulArt - I don't think so, until now all examples just managed to isolate $x$ from the above (the examples were simpler), and the course does not assume numerical analysis knowledge (or teaches it).2017-02-03
  • 0
    If it were $x$ and not $x^3$, you could use the Lambert W function.2017-02-03
  • 0
    Of course, I haven't seen the whole problem. Also, don't know if you are still interested in this. But have you considered you may have a 50:50 mixture of two distributions? One with density $f_1(x) = c_1 x^2$ and one with density $f_2(x) = c_2 e^{-x},$ both defined on $(0,1)$ Both densities lead to easily invertable CDFs. Generate the two separately and mix them.2017-02-10

0 Answers 0