|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.stat.InverseCdf
Inverse of user-supplied cumulative distribution function.
Class InverseCdf
evaluates the inverse of a continuous,
strictly monotone function. Its most obvious use is in evaluating inverses
of continuous distribution functions that can be defined by a user-supplied
function, which implements the InverseCdf
interface.
The inverse is computed using regula falsi and/or
bisection, possibly with the Illinois modification (see Dahlquist and Bjorck
1974). A maximum of 100 iterations are performed.
Nested Class Summary | |
static class |
InverseCdf.DidNotConvergeException
The iteration did not converge |
Constructor Summary | |
InverseCdf(CdfFunction cdf)
Constructor for the inverse of a user-supplied cummulative distribution function. |
Method Summary | |
double |
eval(double p,
double guess)
Evaluates the inverse CDF function. |
void |
setTolerance(double tolerance)
Sets the tolerance to be used as the convergence criterion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InverseCdf(CdfFunction cdf)
cdf
- is a CdfFunction
object that contains the user-supplied function
to be inverted. The cdf function must be continuous and
strictly monotone.Method Detail |
public double eval(double p, double guess) throws InverseCdf.DidNotConvergeException
p
- a double
scalar value representing the point
at which the inverse CDF is desiredguess
- a double
scalar value representing an initial
estimate of the inverse at p
double
scalar value representing the inverse
of the CDF at the point p. Cdf(inverseCdf) is "close" to p.
InverseCdf.DidNotConvergeException
public void setTolerance(double tolerance)
tolerance
- a double
scalar value representing the
convergence criterion. When the relative change from
one iteration to the next is less than tolerance,
convergence is assumed. The default value for tolerance
is 0.0001.
|
JMSLTM Numerical Library 4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |