What is the most efficient and numerically stable algorithm for computing the inverse CDF $F^{-1}(y)$ of a probability function, assuming that both the PDF $f(x)$ and the CDF $F(x)$ are known analytically but the inverse CDF is not?
Clearly, this is the same as finding the root of the nonlinear function $G(x) \equiv F(x) - y$, with $x \in \mathbb{R}$ for a given $y \in (0, 1)$. We know/assume that $G(x)$ is:
- monotonically non-decreasing (being $F(x)$ a CDF);
- differentiable at least $k \ge 1$ times (its first derivative is $G^\prime(x) = f(x)$);
- continuous (we assume that $f(x)$ is not a delta function).
- I am particularly interested in the case in which the shape of the PDF is a generic mixture of Gaussian distributions multiplied by a polynomial of arbitrary degree (in this case, the CDF can be computed analytically).
There are several standard methods for root-finding of generic nonlinear functions (see for example Chapter 9 of Numerical Recipes). The method I would use is Brent's method, with perhaps a couple of steps of Newton-Raphson in the end to refine the root (if at all); but I wonder if there are better ways given the assumptions above.
Also, note that I need to compute the inverse CDF for a large number ($\sim 10^5$) of distinct CDFs within this class; a lookup table or pre-computation is not feasible.