public class PowerDist extends ContinuousDistribution
ContinuousDistribution for
the power distribution with shape parameter
c > 0, over the interval [a, b], where a < b.
It has density
decPrec| Constructor and Description |
|---|
PowerDist(double c)
Constructs a PowerDist object with parameters
a = 0, b = 1 and c = c.
|
PowerDist(double b,
double c)
Constructs a PowerDist object with parameters
a = 0, b = b and c = c.
|
PowerDist(double a,
double b,
double c)
Constructs a PowerDist object with parameters
a = a, b = b and c = c.
|
| Modifier and Type | Method and Description |
|---|---|
double |
barF(double x)
Returns the complementary distribution function.
|
static double |
barF(double a,
double b,
double c,
double x)
Computes the complementary distribution function.
|
double |
cdf(double x)
Returns the distribution function F(x).
|
static double |
cdf(double a,
double b,
double c,
double x)
Computes the distribution function.
|
double |
density(double x)
Returns f (x), the density evaluated at x.
|
static double |
density(double a,
double b,
double c,
double x)
Computes the density function.
|
double |
getA()
Returns the parameter a.
|
double |
getB()
Returns the parameter b.
|
double |
getC()
Returns the parameter c.
|
static PowerDist |
getInstanceFromMLE(double[] x,
int n,
double a,
double b)
Creates a new instance of a power distribution with parameters a and b,
with c estimated using the maximum likelihood method based on the
n observations x[i],
i = 0,…, n - 1.
|
double |
getMean()
Returns the mean.
|
static double |
getMean(double a,
double b,
double c)
Returns the mean
a + (b - a)c/(c + 1) of the power distribution
with parameters a, b and c.
|
static double[] |
getMLE(double[] x,
int n,
double a,
double b)
Estimates the parameter c of the power distribution from the n
observations x[i],
i = 0, 1,…, n - 1, using the maximum
likelihood method and assuming that a and b are known.
|
double[] |
getParams()
Return a table containing the parameters of the current distribution.
|
double |
getStandardDeviation()
Returns the standard deviation.
|
static double |
getStandardDeviation(double a,
double b,
double c)
Computes and returns the standard deviation
of the power distribution with parameters a, b and c.
|
double |
getVariance()
Returns the variance.
|
static double |
getVariance(double a,
double b,
double c)
Computes and returns the variance
(b - a)2c/[(c + 1)2(c + 2)]
of the power distribution with parameters a, b and c.
|
double |
inverseF(double u)
Returns the inverse distribution function
x = F-1(u).
|
static double |
inverseF(double a,
double b,
double c,
double u)
Computes the inverse of the distribution function.
|
void |
setParams(double a,
double b,
double c)
Sets the parameters a, b and c for this object.
|
java.lang.String |
toString() |
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsuppublic PowerDist(double a,
double b,
double c)
public PowerDist(double b,
double c)
public PowerDist(double c)
public double density(double x)
ContinuousDistributiondensity in class ContinuousDistributionx - value at which the density is evaluatedpublic double cdf(double x)
Distributionx - value at which the distribution function is evaluatedpublic double barF(double x)
ContinuousDistributionbarF in interface DistributionbarF in class ContinuousDistributionx - value at which the complementary distribution function is evaluatedpublic double inverseF(double u)
ContinuousDistributioninverseF in interface DistributioninverseF in class ContinuousDistributionu - value at which the inverse distribution function is evaluatedpublic double getMean()
ContinuousDistributiongetMean in interface DistributiongetMean in class ContinuousDistributionpublic double getVariance()
ContinuousDistributiongetVariance in interface DistributiongetVariance in class ContinuousDistributionpublic double getStandardDeviation()
ContinuousDistributiongetStandardDeviation in interface DistributiongetStandardDeviation in class ContinuousDistributionpublic static double density(double a,
double b,
double c,
double x)
a - left limit of intervalb - right limit of intervalc - shape parameterx - the value at which the density is evaluatedpublic static double cdf(double a,
double b,
double c,
double x)
a - left limit of intervalb - right limit of intervalc - shape parameterx - the value at which the distribution is evaluatedpublic static double barF(double a,
double b,
double c,
double x)
a - left limit of intervalb - right limit of intervalc - shape parameterx - the value at which the complementary distribution is evaluatedpublic static double inverseF(double a,
double b,
double c,
double u)
a - left limit of intervalb - right limit of intervalc - shape parameteru - the value at which the inverse distribution is evaluatedpublic static double[] getMLE(double[] x,
int n,
double a,
double b)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parametersa - left limit of intervalb - right limit of intervalpublic static PowerDist getInstanceFromMLE(double[] x, int n, double a, double b)
x - the list of observations to use to evaluate parametersn - the number of observations to use to evaluate parametersa - left limit of intervalb - right limit of intervalpublic static double getMean(double a,
double b,
double c)
a - left limit of intervalb - right limit of intervalc - shape parameterpublic static double getVariance(double a,
double b,
double c)
a - left limit of intervalb - right limit of intervalc - shape parameterpublic static double getStandardDeviation(double a,
double b,
double c)
public double getA()
public double getB()
public double getC()
public void setParams(double a,
double b,
double c)
a - left limit of intervalb - right limit of intervalc - shape parameterpublic double[] getParams()
public java.lang.String toString()
toString in class java.lang.ObjectTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.