Simulation of an Exponential RV

51 Views Asked by At

Random variable X has a hazard rate function $\lambda(t)$ if $P(X \geq x) = e^{− \int_0^{x} \lambda(t)dt}$. Provide a simulation procedure to generate a random variable X with hazard rate function given by λ(t) = t^3.

From what I understood, when we are simulating a variable we are trying to construct it from a distribution that is easy to sample from (e.g. Unif(0, 1) and which has random generators already implemented), because a non-typical distribution (defined by its cdf) may not have already implemented methods. Right?

My issue is that after calculating the integral I get: $P(X \geq x) = e^{-\frac {x^4} {4}}$, subsequently $P(X \leq x) = 1 - e^{-\frac {x^4} {4}}$. Is this correct? (Equality signs specifically $P (X \geq x) = 1 - P (X < x)$ typically, so how can I introduce the "$\leq$" to get the correct cdf basically?

After this point, a technique that I've seen repeatedly is trying to get the inverse of the cdf. $F^{-1}(x)$.

Thus I get: $1 - e^{\frac {-x^4} {4}} = y$, and subsequently $x = \sqrt[4] {-4 ln(1-y)}$.

(So I can recover x for any y sampled from the Unif(0,1).) Is this considered a complete and correct simulation process?