As a test example for my assertion, I applied a Monte Carlo inversion method to generate random deviates for the case of the Erlang-distribution, whose cumulative distribution can be expressed as:
$F(x) = 1- \sum\limits^{k-1}_{n = 0} \frac{1}{n!} exp(-λx)(λx)^n$
Or, for example, in the case k=3, one can write:
$(1- F(x))exp(λx) = 1 + λx + 1/2(λx)^2$
Following the standard process for the Monte Carlo inversion method to simulate an Erlang random deviate, one can set 1-F(x) = U, a generated Uniform random deviate. Further, taking the natural log of both side (log transform is apparently required for convergence):
$ Ln(U) + λx = ln(1 + λx + 1/2(λx)^2)$
Implementing a numerical analysis Newton-Raphson method (NRM) to derive a solution for 'x' yielding a Erlang distribution random deviate, I define a function g(x), which should approach zero with an exact solution value for ‘x’, as:
$g(x) = ln(U) + λx - ln(1 + λx + 1/2(λx)^2) -> 0$
One also needs the derivative of g(x) with respect to x for the implementing the NRM:
$g’(x) = λ - ( λ + λ^2 x)/(1 + λx + 1/2(λx)^2)$
With the NRM, the next iterative value is given by:
$ x_{i+1} = x_{i} - g(x_i)/g’(x_i) $
where I employed the random uniform deviate (U) as the initial starting guess value for 'x' and repeated six cycles where it was evident that $g(x_{i+1})$ did, in fact, approach zero.
Per a worksheet implementation, I witnessed successful convergence of g(x) to 0.0000xxxx or better for all 100 generated Erlang random deviates in test runs. In particular, when k=3 and λ=1.5, observed, for example, a sample mean of 2.45 (expected 2.00) and a variance of 1.14 (expected 1.333).
When I performed a related analysis for k=2, I generally observed more precision in estimates of mean and variance, and even a greater accuracy for the expected ratio of the sample mean to variance (which should be λ).
So, for other seemingly non-invertible CDF, this numerical analysis based methodology may be of assistance. Further, I suspect this method may actually perform better than other ad hoc methods in both efficiency and accuracy in generating random deviates.
Support for my supposition, per the cited Wikipedia source on the Erlang distribution, on generating Erlang-distributed random variates, the approximate suggested methodology is the sum of minus the natural log of k uniform random deviates, scaled by the inverse of λ, which first employs multiple uniform random deviates and clearly is but an approximation.