public class ContinuousUniformDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED| Constructor and Description |
|---|
ContinuousUniformDistribution()
This default constructor creates a new uniform distribuiton on (0, 1).
|
ContinuousUniformDistribution(double a,
double b)
This general constructor creates a new uniform distribution on a specified interval.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function in terms of the parameters.
|
double |
getDensity(double x)
This method computes the probability density function.
|
double |
getLowerBound()
This method gets the lower bound of the domain of the distribution.
|
double |
getMaxDensity()
This method computes the maximum value of the density function, which is any
value, since the density function is constant.
|
double |
getMean()
This method computes the mean of the distribution in terms of the parameters.
|
double |
getMGF(double t)
This method computes the moment generating function in terms of the parameters.
|
double |
getMoment(double a,
int n)
'
This method computes the moment of a specified order about a specified point, in
terms of the parameters.
|
double |
getQuantile(double p)
This method computes the quantile function in terms of the parameters.
|
double |
getUpperBound()
This method returns the upper bound of the domain.
|
double |
getVariance()
This method computes the variance of the distribution in terms of the parameters.
|
void |
setLowerBound(double a)
This method sets the lower bound of the domain.
|
void |
setParameters(double a,
double b)
This method sets the parameters: the minimum and maximum values of the interval.
|
void |
setUpperBound(double b)
This method sets the upper bound of the domain.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
public ContinuousUniformDistribution(double a,
double b)
a - the left endpointb - the right endpointpublic ContinuousUniformDistribution()
public void setParameters(double a,
double b)
a - the left enpdointb - the right endpointpublic double getDensity(double x)
getDensity in class Distributionx - a number in the domain of the distributionpublic double getMaxDensity()
getMaxDensity in class Distributionpublic double getMean()
getMean in class Distributionpublic double getVariance()
getVariance in class Distributionpublic double getMoment(double a,
int n)
getMoment in class Distributiona - the centern - the orderpublic double getMGF(double t)
getMGF in class Distributiont - a real numberpublic double getCDF(double x)
getCDF in class Distributionx - a number in the domain of the distributionpublic double getQuantile(double p)
getQuantile in class Distributionp - a probability in (0, 1)public void setLowerBound(double a)
a - the lower boundpublic double getLowerBound()
public void setUpperBound(double b)
b - the upper boundpublic double getUpperBound()
public java.lang.String toString()
toString in class Distribution