net.sf.doodleproject.numerics4j.statistics.distribution
Class ContinuousDistribution

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
All Implemented Interfaces:
Distribution
Direct Known Subclasses:
BetaDistribution, CauchyDistribution, ChiSquaredDistribution, ExponentialDistribution, FDistribution, GammaDistribution, LaplaceDistribution, LogisticDistribution, LogNormalDistribution, NormalDistribution, RayleighDistribution, TDistribution, UniformDistribution, WeibullDistribution

public abstract class ContinuousDistribution
extends java.lang.Object
implements Distribution

Base continuous distribution.

Version:
$Revision: 1.2 $ $Date: 2007/10/25 04:44:10 $

Constructor Summary
ContinuousDistribution()
           
 
Method Summary
abstract  double cumulativeProbability(double x)
          The CDF for this distribution.
protected  double findInverseCumulativeProbability(double p, double lower, double initial, double upper)
          Generic means to compute inverse cumulative probability values.
abstract  double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContinuousDistribution

public ContinuousDistribution()
Method Detail

cumulativeProbability

public abstract double cumulativeProbability(double x)
                                      throws NumericException
The CDF for this distribution. This method returns P(X < x).

Parameters:
x - the value at which the CDF is evaluated.
Returns:
CDF for this distribution.
Throws:
NumericException - if the cumulative probability can not be computed.

inverseCumulativeProbability

public abstract double inverseCumulativeProbability(double p)
                                             throws NumericException
The inverse CDF for this distribution. This method returns x such that, P(X < x) = p.

Parameters:
p - the cumulative probability.
Returns:
x
Throws:
NumericException - if the inverse cumulative probability can not be computed.

findInverseCumulativeProbability

protected double findInverseCumulativeProbability(double p,
                                                  double lower,
                                                  double initial,
                                                  double upper)
                                           throws NumericException
Generic means to compute inverse cumulative probability values. This method uses the bisection method to find inverse CDF values.

Parameters:
p - the cumulative probability.
lower - the global lower bound of the inverse CDF value.
initial - an initial guess at the inverse CDF value.
upper - the global upper bound of the inverse CDF value.
Returns:
x such that P(X < x) = p
Throws:
NumericException - if the inverse cumulative probability can not be computed.


Copyright 2004-2004-2007 DoodleProject. All Rights Reserved.