All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class maths.statistics.ProbabilityDistribution

java.lang.Object
   |
   +----maths.statistics.ProbabilityDistribution

public abstract class ProbabilityDistribution
extends Object
The ProbabilityDistribution superclass provides an object for encapsulating probability distributions.

Version:
1.0
Author:
Jaco van Kooten

Constructor Index

 o ProbabilityDistribution()
Constructs a probability distribution.

Method Index

 o checkRange(double)
Check if the range of the argument of the distribution method is between 0 and 1.
 o checkRange(double, double, double)
Check if the range of the argument of the distribution method is between lo and hi.
 o cumulative(double)
Cumulative distribution function.
 o findRoot(double, double, double, double)
This method approximates the value of X for which P(x<X)=prob.
 o inverse(double)
Inverse of the cumulative distribution function.
 o probability(double)
Probability density function.

Constructors

 o ProbabilityDistribution
 public ProbabilityDistribution()
Constructs a probability distribution.

Methods

 o probability
 public abstract double probability(double X)
Probability density function.

Returns:
the probability that a stochastic variable x has the value X, i.e. P(x=X)
 o cumulative
 public abstract double cumulative(double X)
Cumulative distribution function.

Returns:
the probability that a stochastic variable x is less then X, i.e. P(x<X)
 o inverse
 public abstract double inverse(double probability)
Inverse of the cumulative distribution function.

Returns:
the value X for which P(x<X)
 o checkRange
 protected void checkRange(double x,
                           double lo,
                           double hi)
Check if the range of the argument of the distribution method is between lo and hi.

 o checkRange
 protected void checkRange(double x)
Check if the range of the argument of the distribution method is between 0 and 1.

 o findRoot
 protected double findRoot(double prob,
                           double guess,
                           double xLo,
                           double xHi)
This method approximates the value of X for which P(x<X)=prob. It applies a combination of a Newton-Raphson procedure and bisection method with the value guess as a starting point. Furthermore, to ensure convergency and stability, one should supply an inverval [xLo,xHi] in which the probalility distribution reaches the value prob. The method does no checking, it will produce bad results if wrong values for the parameters are supplied - use it with care.


All Packages  Class Hierarchy  This Package  Previous  Next  Index