public class WeibullDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
WeibullDistribution()
This default constructor creates a new Weibull distribution with shape
parameter 1 and scale parameter 1.
|
WeibullDistribution(double k,
double b)
This general constructor creates a new Weibull distribution with spcified
shape and scale 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 denstiy function.
|
double |
getFailureRate(double x)
This method computes the failure rate function.
|
double |
getMaxDensity()
This method returns the maximum value of the density function.
|
double |
getMean()
The method returns the mean of the distribution.
|
double |
getMoment(double a,
int n)
This method returns the moment of a specified order about a specified point.
|
double |
getMoment(int n)
This method returns the moment of a specified order.
|
double |
getQuantile(double p)
This method returns the quantile function
|
double |
getScale()
This method returns the scale parameter.
|
double |
getShape()
This method returns the shape parameter.
|
double |
getVariance()
This method returns the variance of the distribution.
|
void |
setParameters(double k,
double b)
This method sets the shape and scale parameter.
|
void |
setScale(double b)
This method sets the scale parameter.
|
void |
setShape(double k)
This method sets the shape parameter.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
public WeibullDistribution(double k, double b)
k
- the shape parameterb
- the scale parameterpublic WeibullDistribution()
public void setParameters(double k, double b)
k
- the shape parameterb
- the scale parameterpublic 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 double getQuantile(double p)
getQuantile
in class Distribution
p
- a number in (0, 1)public double getFailureRate(double x)
getFailureRate
in class Distribution
x
- a number in the domain of the distributionpublic double getShape()
public void setShape(double k)
k
- the shape parameterpublic double getScale()
public void setScale(double b)
b
- the scale parameterpublic java.lang.String toString()
toString
in class Distribution