public class BetaDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
BetaDistribution()
This default constructor creates a beta distribution with left and right parameters
equal to 1.
|
BetaDistribution(double a,
double b)
This general constructor creates a beta distribution with specified left and right
parameters.
|
Modifier and Type | Method and Description |
---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function.
|
double |
getDensity(double x)
This method computes the probability density function.
|
double |
getLeft()
This method gets the left paramter.
|
double |
getMaxDensity()
This method computes the maximum value of the density function.
|
double |
getMean()
This method compute the mean in terms of the parameters.
|
double |
getMoment(double a,
int n)
This method returns the moment a specified order about a specified point.
|
double |
getMoment(int n)
This method returns the moment of a specified order.
|
double |
getRight()
This method gets the right parameter.
|
double |
getVariance()
This method computes the variance in terms of the parameters.
|
void |
setLeft(double a)
This method sets the left parameter.
|
void |
setParameters(double a,
double b)
This method sets the parameters, computes the normalizing constant c, and specifies the
default domain.
|
void |
setRight(double b)
This method sets the right parameter.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
getDomain, getFailureRate, getMedian, getMGF, getPGF, getQuantile, getSD, getType, setDomain, setDomain, simulate
public BetaDistribution(double a, double b)
a
- the left parameterb
- the right parameterpublic BetaDistribution()
public void setParameters(double a, double b)
a
- the left parameterb
- the right parameterpublic void setLeft(double a)
a
- the left parameterpublic void setRight(double b)
b
- the right parameterpublic double getLeft()
public double getRight()
public double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distributionpublic double getMaxDensity()
getMaxDensity
in class Distribution
public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getMoment(int n)
getMoment
in class Distribution
n
- the orderpublic double getMoment(double a, int n)
getMoment
in class Distribution
a
- the centern
- the orderpublic double getCDF(double x)
getCDF
in class Distribution
x
- a number in the domain of the distributionpublic java.lang.String toString()
toString
in class Distribution