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
-
ProbabilityDistribution()
- Constructs a probability distribution.
-
checkRange(double)
- Check if the range of the argument of the distribution method is between 0 and 1.
-
checkRange(double, double, double)
- Check if the range of the argument of the distribution method is between lo and hi.
-
cumulative(double)
- Cumulative distribution function.
-
findRoot(double, double, double, double)
- This method approximates the value of X for which P(x<X)=prob.
-
inverse(double)
- Inverse of the cumulative distribution function.
-
probability(double)
- Probability density function.
ProbabilityDistribution
public ProbabilityDistribution()
- Constructs a probability distribution.
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)
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)
inverse
public abstract double inverse(double probability)
- Inverse of the cumulative distribution function.
- Returns:
- the value X for which P(x<X)
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.
checkRange
protected void checkRange(double x)
- Check if the range of the argument of the distribution method is between 0 and 1.
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