Suppose you have a cdf
$$ F(X)=\frac{1}{2} (x-1)^3 + \frac{1}{2} $$
$$ 0\leq x\leq 2 $$
How, would one find the inversion to create random variants?
I tried rearranging and inverting the equation into
$$ X=(2u-1)^\frac{1}{3}+1 $$
$$ 0\leq u\leq 1 $$
Graphing this inverted equation clearly only show half of the equation. I am not sure how to get the second half. Thanks :D
You inverted the equation correctly. Unfortunately you didn’t show the graph you obtained that seemed to indicate a problem, so it’s hard to say what went wrong. Just in case you used Wolfram|Alpha to plot the inverse function, note that by default the principal root is used, which yields this graph, but when you click on “Use the real-valued root instead” you get this graph, which is what you want for the inversion method.