Package com.imsl.stat

Class InverseCdf

java.lang.Object
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:
  • Constructor Details

    • 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 Details

    • 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.
    • 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