|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.probdist.ContinuousDistribution umontreal.iro.lecuyer.probdist.PowerDist
public class PowerDist
Extends the class ContinuousDistribution
for
the power distribution with shape parameter
c > 0, over the interval [a, b], where a < b.
It has density
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
---|
decPrec |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution |
---|
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PowerDist(double a, double b, double c)
public PowerDist(double b, double c)
public PowerDist(double c)
Method Detail |
---|
public double density(double x)
ContinuousDistribution
density
in class ContinuousDistribution
x
- value at which the density is evaluated
public double cdf(double x)
Distribution
x
- value at which the distribution function is evaluated
public double barF(double x)
ContinuousDistribution
barF
in interface Distribution
barF
in class ContinuousDistribution
x
- value at which the complementary distribution function is evaluated
public double inverseF(double u)
ContinuousDistribution
inverseF
in interface Distribution
inverseF
in class ContinuousDistribution
u
- value at which the inverse distribution function is evaluated
public double getMean()
ContinuousDistribution
getMean
in interface Distribution
getMean
in class ContinuousDistribution
public double getVariance()
ContinuousDistribution
getVariance
in interface Distribution
getVariance
in class ContinuousDistribution
public double getStandardDeviation()
ContinuousDistribution
getStandardDeviation
in interface Distribution
getStandardDeviation
in class ContinuousDistribution
public 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 evaluated
public 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 evaluated
public 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 evaluated
public 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 evaluated
public 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 interval
public 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 parameter
public static double getVariance(double a, double b, double c)
a
- left limit of intervalb
- right limit of intervalc
- shape parameter
public 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 String toString()
toString
in class Object
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |