JMSLTM Numerical Library 5.0.1

com.imsl.stat
Class InverseCdf

java.lang.Object
  extended by com.imsl.stat.InverseCdf
All Implemented Interfaces:
Serializable

public class InverseCdf
extends Object
implements Serializable

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.

See Also:
Example, Serialized Form

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

InverseCdf

public InverseCdf(CdfFunction cdf)
Constructor for the inverse of a user-supplied cummulative distribution function.

Parameters:
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

eval

public double eval(double p,
                   double guess)
            throws InverseCdf.DidNotConvergeException
Evaluates the inverse CDF function.

Parameters:
p - a double scalar value representing the point at which the inverse CDF is desired
guess - a double scalar value representing an initial estimate of the inverse at p
Returns:
a double scalar value representing the inverse of the CDF at the point p. Cdf(inverseCdf) is "close" to p.
Throws:
InverseCdf.DidNotConvergeException

setTolerance

public void setTolerance(double tolerance)
Sets the tolerance to be used as the convergence criterion.

Parameters:
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 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.