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

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
      extended by net.sf.doodleproject.numerics4j.statistics.distribution.BetaDistribution
All Implemented Interfaces:
Distribution

public class BetaDistribution
extends ContinuousDistribution

The Beta distribution (1).

References:

  1. Eric W. Weisstein. "Beta Distribution." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/BetaDistribution.html

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

Constructor Summary
BetaDistribution()
          Default constructor.
BetaDistribution(double a, double b)
          Create a distribution with the given alpha and beta values.
 
Method Summary
 double cumulativeProbability(double x)
          The CDF for this distribution.
 double getAlpha()
          Access the alpha parameter.
 double getBeta()
          Access the beta parameter.
 double inverseCumulativeProbability(double p)
          The inverse CDF for this distribution.
 void setAlpha(double a)
          Modify the alpha parameter.
 void setBeta(double b)
          Modify the beta parameter.
 
Methods inherited from class net.sf.doodleproject.numerics4j.statistics.distribution.ContinuousDistribution
findInverseCumulativeProbability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BetaDistribution

public BetaDistribution()
Default constructor. Alpha and beta are both set to 1.


BetaDistribution

public BetaDistribution(double a,
                        double b)
Create a distribution with the given alpha and beta values.

Parameters:
a - the alpha parameter.
b - the beta parameter.
Method Detail

cumulativeProbability

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

Specified by:
cumulativeProbability in class ContinuousDistribution
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.

getAlpha

public double getAlpha()
Access the alpha parameter.

Returns:
the alpha parameter.

getBeta

public double getBeta()
Access the beta parameter.

Returns:
the beta parameter.

inverseCumulativeProbability

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

Specified by:
inverseCumulativeProbability in class ContinuousDistribution
Parameters:
p - the cumulative probability.
Returns:
x
Throws:
NumericException - if the inverse cumulative probability can not be computed.

setAlpha

public void setAlpha(double a)
Modify the alpha parameter.

Parameters:
a - the new alpha value.

setBeta

public void setBeta(double b)
Modify the beta parameter.

Parameters:
b - the new beta value.


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