JSci.maths.statistics
Class BetaDistribution

java.lang.Object
  extended by JSci.maths.statistics.ProbabilityDistribution
      extended by JSci.maths.statistics.BetaDistribution

public final class BetaDistribution
extends ProbabilityDistribution

The BetaDistribution class provides an object for encapsulating beta distributions.


Constructor Summary
BetaDistribution(double dgrP, double dgrQ)
          Constructs a beta distribution.
 
Method Summary
 double cumulative(double X)
          Cumulative beta distribution function.
 double getDegreesOfFreedomP()
          Returns the degrees of freedom p.
 double getDegreesOfFreedomQ()
          Returns the degrees of freedom q.
 double inverse(double probability)
          Inverse of the cumulative beta distribution function.
 double probability(double X)
          Probability density function of a beta distribution.
 
Methods inherited from class JSci.maths.statistics.ProbabilityDistribution
checkRange, checkRange, findRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetaDistribution

public BetaDistribution(double dgrP,
                        double dgrQ)
Constructs a beta distribution.

Parameters:
dgrP - degrees of freedom p.
dgrQ - degrees of freedom q.
Method Detail

getDegreesOfFreedomP

public double getDegreesOfFreedomP()
Returns the degrees of freedom p.


getDegreesOfFreedomQ

public double getDegreesOfFreedomQ()
Returns the degrees of freedom q.


probability

public double probability(double X)
Probability density function of a beta distribution.

Specified by:
probability in class ProbabilityDistribution
Returns:
the probability that a stochastic variable x has the value X, i.e. P(x=X).

cumulative

public double cumulative(double X)
Cumulative beta distribution function.

Specified by:
cumulative in class ProbabilityDistribution
Returns:
the probability that a stochastic variable x is less then X, i.e. P(x<X).

inverse

public double inverse(double probability)
Inverse of the cumulative beta distribution function.

Specified by:
inverse in class ProbabilityDistribution
Returns:
the value X for which P(x<X).